loading…
Search for a command to run...
loading…
A TypeScript MCP server for managing persistent knowledge graphs with entities, directional relations, and time-based observations. It enables users to create,
A TypeScript MCP server for managing persistent knowledge graphs with entities, directional relations, and time-based observations. It enables users to create, search, and track structured information with built-in concurrency control and JSON file storage.
An MCP (Model Context Protocol) server implemented in TypeScript for managing knowledge graphs with entities and relations. Track relationships between entities, record observations over time, and provide powerful search capabilities.
Add the server to your Kiro or other MCP client configuration file:
{
"mcpServers": {
"knowledge-graph": {
"command": "npx",
"args": [
"-y",
"github:YUChoe/knowledge-graph-mcp-server"
]
}
}
}
To specify a project path:
{
"mcpServers": {
"knowledge-graph": {
"command": "npx",
"args": [
"-y",
"github:YUChoe/knowledge-graph-mcp-server",
"C:\\Users\\user\\src\\projectdir"
]
}
}
}
<project-path>/knowledge-graph.json~/knowledge-graph.json (user home directory)The server provides 9 MCP tools:
Create new entities.
Parameters:
{
entities: Array<{
name: string; // Unique entity name
entityType: string; // Entity type
observations: string[]; // Initial observations
}>
}
Example:
{
"entities": [
{
"name": "TypeScript",
"entityType": "programming-language",
"observations": [
"Provides static type system",
"Superset of JavaScript"
]
}
]
}
Create relationships between entities.
Parameters:
{
relations: Array<{
from: string; // Source entity name
to: string; // Target entity name
relationType: string; // Relation type (active voice)
}>
}
Add observations to existing entities.
Parameters:
{
observations: Array<{
entityName: string; // Entity name
contents: string[]; // Observations to add
}>
}
Delete entities and all associated relations.
Parameters:
{
entityNames: string[] // Array of entity names to delete
}
Delete specific observations from entities.
Parameters:
{
deletions: Array<{
entityName: string; // Entity name
observations: string[]; // Observations to delete
}>
}
Delete specific relations.
Parameters:
{
relations: Array<{
from: string;
to: string;
relationType: string;
}>
}
Read the entire knowledge graph.
Parameters: None
Search for entities by name, type, or observations.
Parameters:
{
query: string // Search query string
}
Retrieve specific entities by name.
Parameters:
{
names: string[] // Array of entity names to retrieve
}
All errors are returned with both English and Korean messages:
Error: Entity with name "TypeScript" already exists
"TypeScript" 이름을 가진 엔티티가 이미 존재합니다
# Run all tests
npm test
# Test watch mode
npm run test:watch
src/
├── types.ts # Type definitions
├── graph-storage.ts # Storage layer
├── knowledge-graph-manager.ts # Business logic
├── mcp-server.ts # MCP server implementation
└── bin/
└── index.ts # CLI entry point
tests/
├── unit/ # Unit tests
├── property/ # Property-based tests
└── integration/ # Integration tests
The project uses a dual testing approach:
MIT
Issues and pull requests are welcome.
TypeScript로 구현된 MCP(Model Context Protocol) 서버로, 엔티티와 관계로 구성된 지식 그래프를 관리합니다. 엔티티 간의 관계를 추적하고, 시간에 따른 관찰 내용을 기록하며, 강력한 검색 기능을 제공합니다.
Kiro 또는 다른 MCP 클라이언트의 설정 파일에 서버를 추가합니다:
{
"mcpServers": {
"knowledge-graph": {
"command": "npx",
"args": [
"-y",
"github:YUChoe/knowledge-graph-mcp-server"
]
}
}
}
특정 프로젝트 경로를 지정하려면:
{
"mcpServers": {
"knowledge-graph": {
"command": "npx",
"args": [
"-y",
"github:YUChoe/knowledge-graph-mcp-server",
"C:\\Users\\user\\src\\projectdir"
]
}
}
}
<project-path>/knowledge-graph.json~/knowledge-graph.json (사용자 홈 디렉토리)서버는 9개의 MCP 도구를 제공합니다:
새로운 엔티티를 생성합니다.
파라미터:
{
entities: Array<{
name: string; // 엔티티의 고유 이름
entityType: string; // 엔티티 타입
observations: string[]; // 초기 관찰 내용
}>
}
예제:
{
"entities": [
{
"name": "TypeScript",
"entityType": "programming-language",
"observations": [
"정적 타입 시스템을 제공합니다",
"JavaScript의 상위 집합입니다"
]
}
]
}
응답:
[
{
"name": "TypeScript",
"entityType": "programming-language",
"observations": [
"정적 타입 시스템을 제공합니다",
"JavaScript의 상위 집합입니다"
]
}
]
엔티티 간의 관계를 생성합니다.
파라미터:
{
relations: Array<{
from: string; // 시작 엔티티 이름
to: string; // 종료 엔티티 이름
relationType: string; // 관계 타입 (능동태)
}>
}
예제:
{
"relations": [
{
"from": "TypeScript",
"to": "JavaScript",
"relationType": "compiles-to"
}
]
}
응답:
[
{
"from": "TypeScript",
"to": "JavaScript",
"relationType": "compiles-to"
}
]
기존 엔티티에 관찰 내용을 추가합니다.
파라미터:
{
observations: Array<{
entityName: string; // 엔티티 이름
contents: string[]; // 추가할 관찰 내용
}>
}
예제:
{
"observations": [
{
"entityName": "TypeScript",
"contents": [
"Microsoft에서 개발했습니다",
"2012년에 처음 출시되었습니다"
]
}
]
}
엔티티와 관련된 모든 관계를 삭제합니다.
파라미터:
{
entityNames: string[] // 삭제할 엔티티 이름 배열
}
예제:
{
"entityNames": ["TypeScript"]
}
엔티티에서 특정 관찰 내용을 삭제합니다.
파라미터:
{
deletions: Array<{
entityName: string; // 엔티티 이름
observations: string[]; // 삭제할 관찰 내용
}>
}
예제:
{
"deletions": [
{
"entityName": "TypeScript",
"observations": ["2012년에 처음 출시되었습니다"]
}
]
}
특정 관계를 삭제합니다.
파라미터:
{
relations: Array<{
from: string;
to: string;
relationType: string;
}>
}
예제:
{
"relations": [
{
"from": "TypeScript",
"to": "JavaScript",
"relationType": "compiles-to"
}
]
}
전체 지식 그래프를 조회합니다.
파라미터: 없음
응답:
{
"entities": [
{
"name": "TypeScript",
"entityType": "programming-language",
"observations": ["정적 타입 시스템을 제공합니다"]
}
],
"relations": [
{
"from": "TypeScript",
"to": "JavaScript",
"relationType": "compiles-to"
}
]
}
이름, 타입, 관찰 내용으로 엔티티를 검색합니다.
파라미터:
{
query: string // 검색 쿼리 문자열
}
예제:
{
"query": "typescript"
}
응답:
[
{
"name": "TypeScript",
"entityType": "programming-language",
"observations": ["정적 타입 시스템을 제공합니다"]
}
]
특정 엔티티를 이름으로 조회합니다.
파라미터:
{
names: string[] // 조회할 엔티티 이름 배열
}
예제:
{
"names": ["TypeScript", "JavaScript"]
}
응답:
[
{
"name": "TypeScript",
"entityType": "programming-language",
"observations": ["정적 타입 시스템을 제공합니다"]
},
{
"name": "JavaScript",
"entityType": "programming-language",
"observations": ["동적 타입 언어입니다"]
}
]
모든 에러는 영문 메시지와 한국어 설명을 함께 제공합니다:
Error: Entity with name "TypeScript" already exists
"TypeScript" 이름을 가진 엔티티가 이미 존재합니다
# 모든 테스트 실행
npm test
# 테스트 watch 모드
npm run test:watch
src/
├── types.ts # 타입 정의
├── graph-storage.ts # 저장소 계층
├── knowledge-graph-manager.ts # 비즈니스 로직
├── mcp-server.ts # MCP 서버 구현
└── bin/
└── index.ts # CLI 진입점
tests/
├── unit/ # 단위 테스트
├── property/ # 속성 기반 테스트
└── integration/ # 통합 테스트
프로젝트는 이중 테스트 접근법을 사용합니다:
MIT
이슈와 풀 리퀘스트를 환영합니다.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"knowledge-graph-mcp-server": {
"command": "npx",
"args": []
}
}
}