Query a Neo4j graph database containing a knowledge graph of German family businesses.
🏢 KnowledgeGraph-MCP - 专门为德国家族企业知识图谱构建的 Model Context Protocol (MCP) 服务器
本项目提供一个专业的 MCP 服务器,让 AI 助手(如 Claude、Cursor、Cline 等)能够直接访问和查询德国家族企业知识图谱数据库。通过 Neo4j 图数据库存储结构化知识,支持复杂的关系查询和语义搜索。
explain_database_structure
- 数据库结构解释器
run_cypher_query
- Cypher 查询执行器
克隆项目
git clone https://github.com/guangxiangdebizi/KnowledgeGraph-MCP.git
cd KnowledgeGraph-MCP
创建虚拟环境
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# 或
.venv\Scripts\activate # Windows
安装依赖
pip install -r mcp_requirements.txt
配置 Neo4j 数据库
# 确保 Neo4j 服务运行在 localhost:7687
# 修改 neo4j_mcp_server.py 中的连接配置
NEO4J_URI = "bolt://localhost:7687"
NEO4J_USERNAME = "neo4j"
NEO4J_PASSWORD = "your_password"
导入知识图谱数据
python import_to_neo4j.py
启动 MCP 服务器
python neo4j_mcp_server.py
在 Cursor 的 MCP 配置中添加:
{
"mcpServers": {
"neo4j-knowledge-graph": {
"url": "http://127.0.0.1:8000/sse",
"name": "Neo4j知识图谱",
"description": "德国家族企业知识图谱查询服务"
}
}
}
在 ~/.config/claude/mcp_servers.json
中添加:
{
"mcpServers": {
"neo4j-knowledge-graph": {
"url": "http://127.0.0.1:8000/sse",
"transport": "sse",
"name": "Neo4j知识图谱"
}
}
}
KnowledgeGraph-MCP/
├── neo4j_mcp_server.py # MCP 服务器主程序
├── import_to_neo4j.py # 数据导入脚本
├── setup_graphrag.py # GraphRAG 设置脚本
├── mcp_requirements.txt # MCP 依赖包
├── requirements.txt # 完整依赖包
├── knowledge_graph_nodes.csv # 节点数据
├── knowledge_graph_relationships.csv # 关系数据
├── 德国的家族企业/ # 原始文档
├── 德国的家族企业的PPT/ # 演示文档
├── README_MCP服务器使用说明.md # MCP 使用说明
├── README_Neo4j导入说明.md # 数据导入说明
├── cursor_config.json # Cursor MCP 配置
├── cline_config.json # Cline MCP 配置
└── 通用_mcp_config.json # 通用 MCP 配置
# AI 首先调用此工具了解知识图谱结构
explain_database_structure()
# AI 根据结构信息构造查询
run_cypher_query("""
MATCH (n:Node)
WHERE n.name CONTAINS '创新' AND n.type = 'section'
RETURN n.name, n.description
LIMIT 5
""")
# 查找层次关系
run_cypher_query("""
MATCH (parent)-[:INCLUDES]->(child)
WHERE parent.name CONTAINS '家族企业'
RETURN parent.name, child.name, child.type
""")
我们欢迎各种形式的贡献!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)http://127.0.0.1:8000
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详细信息。
如有问题或建议,请:
让 AI 助手成为德国家族企业知识领域的专家! 🚀
Allows LLMs to directly interact with a YugabyteDB database.
Query and analyze data with MotherDuck and local DuckDB
Integrates with Trino and Iceberg for advanced data exploration, querying, and table maintenance.
BigQuery database integration with schema inspection and query capabilities
Query a hybrid graph (Neo4j) and vector (Qdrant) database for powerful semantic and graph-based document retrieval.
Token Metrics integration for fetching real-time crypto market data, trading signals, price predictions, and advanced analytics.
An MCP server for Quickbase, enabling seamless integration with AI assistants like Claude Desktop.
A read-only MCP server for Google Sheets, enabling LLMs to query live data using the CData JDBC Driver.
Query the Materials Project database using the mp_api client. Requires an MP_API_KEY environment variable.
Deliver real-time investment research with extensive private and public market data.