Official Anthropic knowledge graph MCP
## Knowledge Graph MCP Server: Semantic Data Relationships The **Knowledge Graph MCP Server** integrates knowledge graph capabilities into Google Antigravity. This enables building and querying semantic networks that capture relationships between entities, enhancing AI applications with structured knowledge. ### Why Knowledge Graph MCP? Knowledge graphs power intelligent applications: - **Semantic Understanding**: Capture entity relationships - **Graph Queries**: Traverse complex connections - **Reasoning**: Infer new knowledge from existing data - **LLM Enhancement**: Ground AI responses in facts - **Scalable**: Handle millions of relationships ### Key Features #### 1. Graph Construction ```python from knowledge_graph import KnowledgeGraph kg = KnowledgeGraph() # Add entities and relationships kg.add_entity("Python", type="ProgrammingLanguage", properties={"paradigm": "multi-paradigm"}) kg.add_entity("Django", type="Framework", properties={"type": "web"}) kg.add_relationship("Django", "written_in", "Python") kg.add_relationship("Django", "used_for", "WebDevelopment") ``` #### 2. Semantic Queries ```python # Find all frameworks written in Python results = kg.query(""" MATCH (f:Framework)-[:written_in]->(Python) RETURN f.name, f.type """) # Multi-hop queries results = kg.query(""" MATCH (company)-[:uses]->(framework)-[:written_in]->(language) WHERE language.name = 'Python' RETURN company.name, framework.name """) ``` #### 3. LLM Integration ```python # Ground LLM responses in knowledge graph from langchain.chains import GraphQAChain chain = GraphQAChain.from_llm( llm=ChatOpenAI(), graph=kg, verbose=True ) response = chain.run("What frameworks use Python for web development?") ``` ### Configuration ```json { "mcpServers": { "knowledge-graph": { "command": "npx", "args": ["-y", "@anthropic/mcp-knowledge-graph"], "env": { "NEO4J_URI": "bolt://localhost:7687", "NEO4J_USER": "neo4j", "NEO4J_PASSWORD": "password" } } } } ``` ### Use Cases **Enterprise Search**: Navigate complex organizational data relationships. **Recommendation**: Build sophisticated recommendation engines. **RAG Enhancement**: Combine vector search with graph context. The Knowledge Graph MCP Server brings semantic knowledge to Antigravity.
{
"mcpServers": {
"knowledge-graph": {
"mcpServers": {
"memory": {
"args": [
"-y",
"@modelcontextprotocol/server-memory"
],
"command": "npx"
}
}
}
}
}