- Home
- MCP servers
- Cardiology Knowledge Graph
Cardiology Knowledge Graph
- python
0
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ryoureddy-cardiology-knowledge-graph-mcp": {
"command": "python",
"args": [
"/full/path/to/your/mcp_server.py"
],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_PASSWORD": "your-password",
"NEO4J_USERNAME": "neo4j",
"OPENAI_API_KEY": "your-openai-key"
}
}
}
}You run a Cardiology Knowledge Graph MCP Server that ingests cardiology text or PDFs, extracts entities and relationships with AI, and stores them in a Neo4j graph. You can then ask natural language questions to explore the graph, review and edit extractions before adding data, and retrieve graph analytics and insights.
How to use
To use the server, run it locally or connect it to an MCP client. Ingestion accepts documents or raw text, returns a draft of entities and relationships for your review, and then you can add the refined data to the graph. You can then query the graph with plain English questions and obtain statistics about the knowledge graph.
How to install
Prerequisites include Python and Neo4j. You will also need an OpenAI API key or an alternative LLM provider.
# Clone the project repository
git clone <your-repo>
cd "Cardiology Knowledge Graph MCP"
# Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Copy environment template and fill in values
cp .env.example .env
# Edit .env with your actual values for NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD, OPENAI_API_KEY
Start the MCP server once dependencies are installed and environment variables are set.
python mcp_server.py
Additional configuration and usage notes
Configure a local Claude Desktop integration to connect to your MCP server if you use Claude. The server runs as a stdio process and can be started with Python, with environment variables providing the connection details to Neo4j and the AI model.
Example Claude Desktop configuration (one MCP server named cardiology_kg) shows how to wire the local Python server with environment values.
Example usage patterns
Ingest documents or raw text to extract cardiology entities and relationships. After ingestion you will review a draft JSON and edit as needed before adding to the graph.
Graph queries and management
Ask natural language questions to explore the knowledge graph, such as medications that treat a condition, how anatomical structures relate to cardiac function, or which procedures diagnose a disease. You can also retrieve statistics about the graph or clear it (with caution).
Troubleshooting and tips
If you encounter connection issues, ensure the Neo4j database is running and that your environment variables are set correctly. For API key errors, verify your OPENAI_API_KEY. If the MCP server does not appear in Claude, confirm the full path to mcp_server.py in your config and restart Claude Desktop.
Security and data handling
Handle patient data and medical information in accordance with applicable privacy and data protection regulations. Use access controls to protect Neo4j and API keys, and review human-in-the-loop changes before committing data to the graph.
Glossary of commands and snippets
The server starts with a standard Python invocation and relies on environment variables for connection details to Neo4j and the AI provider.
Configuration examples
{
"mcpServers": {
"cardiology_kg": {
"command": "python",
"args": ["/full/path/to/your/mcp_server.py"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "your-password",
"OPENAI_API_KEY": "your-openai-key"
}
}
}
}
Available tools
Document Ingestion
Ingest documents (PDFs or raw text) to extract cardiology entities and relationships such as conditions, medications, procedures, and anatomy.
LLM-Powered Extraction
Use an AI model to identify entities and relationships and generate a draft JSON for review.
Human-in-the-Loop Review
Review and edit the extracted entities and relationships before adding them to the knowledge graph.
Graph Storage and Relationships
Store entities and relationships in a Neo4j graph with proper links and provenance.
Natural Language Queries
Query the knowledge graph using plain English to retrieve insights and connections.
Graph Analytics
Obtain statistics and insights about the cardiology knowledge graph.