home / mcp / knowledge graph mcp server
Provides a knowledge-graph MCP service to create, query, and manage graphs, nodes, edges, and resources for AI-assisted insights.
Configuration
View docs{
"mcpServers": {
"aiuluna-knowledge-graph-mcp": {
"command": "npx",
"args": [
"-y",
"@aiuluna/knowledge-graph-mcp",
"--client",
"claude"
],
"env": {
"KNOWLEDGE_GRAPH_DIR": "\"/path/to/your/knowledge_graph/dir\""
}
}
}
}You can create, manage, and analyze knowledge graphs with this MCP server. It supports multiple graph types, strong error handling, resource management, and versioned graph states, making it easy to drive AI assistants with structured knowledge.
You will run the MCP server as a local process and connect your MCP client (Cursor or Claude Desktop) to it. The server exposes a set of graph, node, edge, and resource management commands that you can invoke from your client to create graphs, add nodes and edges, attach resources, and publish or archive graphs. Use the client’s MCP integration to trigger prompts that query and summarize knowledge graph data, then incorporate those results into your conversations.
Prerequisites you need on your system before installation are Node.js and pnpm.
# Ensure Node.js is installed (version 16.0.0 or newer)
node -v
# Ensure pnpm is installed (version 7.0.0 or newer)
pnpm -vCreate a directory to store knowledge graph data. This directory is referenced by the server as its storage location.
mkdir ~/knowledge_graphConfigure the MCP server in Cursor to run the MCP client you are using. Save this as part of your Cursor config.
{
"mcpServers": {
"knowledge-graph": {
"command": "npx",
"args": [
"-y",
"@aiuluna/knowledge-graph-mcp",
"--client",
"claude"
],
"env": {
"KNOWLEDGE_GRAPH_DIR": "/path/to/your/knowledge_graph/dir"
}
}
}
}If you use Claude Desktop, add this configuration to your claude_desktop_config.json so Claude can connect to the MCP server.
{
"mcpServers": {
"knowledge-graph": {
"command": "npx",
"args": [
"-y",
"@aiuluna/knowledge-graph-mcp"
],
"env": {
"KNOWLEDGE_GRAPH_DIR": "/path/to/your/knowledge_graph/dir"
}
}
}
}Prompts are used to query the knowledge graph and generate summaries that merge with your ongoing conversation. In Agent mode, trigger knowledge graph queries with the designated command (for example, a slash command or editor shortcut) to have the agent analyze the current context and retrieve relevant graph nodes.
You can manage graphs, nodes, edges, and resources through the MCP tool list. This includes creating graphs, listing graphs with optional status and type filters, publishing graphs, adding and updating nodes and edges, and managing resources like SVGs and Markdown files associated with nodes.
Prompt files reside under the prompts directory and should be copied to your client’s expected location. Use the graph-query prompt to drive knowledge graph queries from your agent.
The service provides clear error messages and handling guidance for common issues. If an error occurs, check the log files and verify that the storage directory exists and is accessible by the MCP server.
Development tasks for the MCP server use standard tooling: install dependencies, run in development mode, build the project, run tests, and perform linting.
Create a new knowledge graph with a name, description, and type (topology, timeline, changelog, requirement, kb, ontology).
List all graphs with optional filters for status and type.
Publish a graph by its Graph ID, changing its status from draft to published.
Add a node to a specified graph with type, name, and optional description, file path, and metadata.
Update node attributes such as name, description, file path, or metadata for a given node in a graph.
Delete a node from a graph with a delete confirmation flag.
Retrieve detailed information about a specific node within a graph.
Add an edge between two nodes with a type, label, weight, and optional metadata.
Update edge attributes like label, weight, or metadata.
Remove an edge from a graph with a delete confirmation flag.
Fetch guidelines for creating resources such as SVG and Markdown for graph nodes.
Save a resource (svg or markdown) associated with a graph or node.
Update an existing resource’s metadata or title.
Remove a resource with a delete confirmation flag.
Unlink a resource from a specific node in a graph.