INDRA CoGEx MCP Server
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
INDRA Agent
MCP server for the INDRA CoGEx biomedical knowledge graph.
Gives AI agents access to 20M+ nodes spanning genes, diseases, drugs, pathways, and their causal relationships — assembled from scientific literature and curated databases by INDRA (Integrated Network and Dynamical Reasoning Assembler).
Replaces 100+ individual function tools with 9 composable tools that expose the full power of the knowledge graph while maintaining safety and usability.
Quick Start
Public server — no installation needed:
{
"mcpServers": {
"indra-cogex": {
"url": "https://discovery.indra.bio/mcp"
}
}
}Add this to your MCP client config (Claude Desktop, Claude Code, Cursor, etc.) and start asking questions about genes, diseases, and drugs.
Local installation — for development or private Neo4j instances:
pip install git+https://github.com/gyorilab/indra_agent.gitRelated MCP server: Redis Graph MCP Server
Connection Modes
Stdio (local) | HTTP (remote) | |
Use case | Claude Desktop, Cursor, Claude Code | Deployed server, shared access |
Config key |
|
|
Neo4j credentials | Required locally (env vars) | Configured server-side |
Scaling | Single process | Multi-worker (gunicorn) |
Stdio Mode (Default)
For local MCP clients:
# Via console script
indra-agent
# Or via module
python -m indra_agent.mcp_serverClaude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"indra-cogex": {
"command": "indra-agent",
"env": {
"INDRA_NEO4J_URL": "bolt://your-server:7687",
"INDRA_NEO4J_USER": "neo4j",
"INDRA_NEO4J_PASSWORD": "your-password",
"MCP_ALLOWED_HOSTS": "localhost",
"MCP_ALLOWED_ORIGINS": "http://localhost"
}
}
}
}HTTP Mode
For network deployments:
indra-agent --http
indra-agent --http --host 0.0.0.0 --port 8000
indra-agent --http --stateful --streamingProduction (gunicorn):
gunicorn indra_agent.mcp_server.server:app \
--bind 0.0.0.0:8778 \
--worker-class uvicorn.workers.UvicornWorker \
-w 4Tools
9 tools in two groups:
Gateway Tools (5 tools)
High-level graph navigation — most agents start here:
Tool | Purpose |
| Natural language to CURIE with semantic filtering. Supports single term or batch mode. |
| Given CURIEs, suggest reachable entity types and traversal functions |
| Execute any of 100+ autoclient functions with auto-grounding, caching, and xref fallback |
| Full edge map showing how entity types connect. Optional |
| Execute an endpoint for multiple entities in one call. Routes to native batch queries where available. |
Query Infrastructure (4 tools)
Low-level Cypher access for complex queries:
Tool | Purpose |
| Discover entity types, relationships, patterns |
| Run arbitrary Cypher with parameterization |
| Pre-flight safety validation |
| Add metadata at configurable disclosure levels |
call_endpoint Parameters
The primary query tool supports several optimization parameters:
Parameter | Type | Description |
| str | Function name (e.g., |
| str | JSON arguments. Entities as CURIE tuples |
| bool | Auto-ground string params to CURIEs (default: True) |
| str | Enrich results: |
| int | Pagination offset. Use |
| int | Max items per page. Auto-truncates to ~20k tokens if exceeded. |
| list | Project results to specific keys (e.g., |
| bool | Probe query cost before fetching. Returns count, token estimate, available fields, sample. |
| str |
|
| bool | Append suggested next traversal steps to results. |
batch_call Parameters
Parameter | Type | Description |
| str | Function name (e.g., |
| str | Which parameter to batch over (e.g., |
| list | Entity values to query (e.g., |
| list | Project results to specific keys per item |
| int | Max parallel queries (default: 10) |
| str |
|
For get_drugs_for_target and get_targets_for_drug, batch_call automatically routes to native batch functions that use a single Neo4j WHERE IN query instead of N separate queries.
Architecture
flowchart LR
Agent["Agent"]
subgraph Gateway["Gateway Tools"]
direction TB
Ground["ground_entity<br/><i>NL to CURIE</i>"]
Suggest["suggest_endpoints<br/><i>navigation hints</i>"]
Call["call_endpoint<br/><i>100+ functions</i>"]
NavSchema["get_navigation_schema<br/><i>edge map</i>"]
Batch["batch_call<br/><i>parallel execution</i>"]
end
subgraph Core["Query Infrastructure"]
direction TB
Schema["get_graph_schema<br/><i>progressive discovery</i>"]
Execute["execute_cypher<br/><i>arbitrary queries</i>"]
Validate["validate_cypher<br/><i>safety checks</i>"]
Enrich["enrich_results<br/><i>metadata layers</i>"]
end
subgraph Cache["Cache Layer"]
direction TB
DiskCache["diskcache<br/><i>LRU + TTL</i>"]
Coalesce["request coalescing<br/><i>dedup in-flight</i>"]
end
subgraph Data["Data Layer"]
direction TB
Neo[("Neo4j<br/>20M nodes")]
GILDA["GILDA API"]
end
Agent -->|"ground terms"| Ground
Agent -->|"explore edges"| Suggest
Agent -->|"call functions"| Call
Agent -->|"batch queries"| Batch
Agent -->|"discover schema"| Schema
Agent -->|"run Cypher"| Execute
Ground --> GILDA
Suggest --> Call
Call --> DiskCache
Batch --> Call
NavSchema --> Call
DiskCache -->|"miss"| Neo
DiskCache -->|"hit"| Call
Coalesce --> DiskCache
Schema --> Neo
Execute --> Validate
Validate --> Neo
classDef agent fill:#2C3E50,stroke:#1A252F,stroke-width:3px,color:#ECF0F1,font-weight:bold
classDef gateway fill:#9B59B6,stroke:#8E44AD,stroke-width:2px,color:#FFFFFF
classDef core fill:#3498DB,stroke:#2980B9,stroke-width:2px,color:#FFFFFF
classDef cache fill:#27AE60,stroke:#1E8449,stroke-width:2px,color:#FFFFFF
classDef data fill:#7F8C8D,stroke:#5D6D7E,stroke-width:2px,color:#ECF0F1
class Agent agent
class Ground,Suggest,Call,NavSchema,Batch gateway
class Schema,Execute,Validate,Enrich core
class DiskCache,Coalesce cache
class Neo,GILDA dataMost agents use Gateway Tools — ground natural language to CURIEs, then call pre-built functions. When predefined functions cannot express the query (graph algorithms, multi-hop traversals, conditional aggregations), agents drop down to Query Infrastructure.
Context-Aware Grounding
Parameter semantics encode entity type, eliminating cross-type ambiguity:
ground_entity(term="ALS", param_name="disease")
# → MESH:D000690 (Amyotrophic Lateral Sclerosis)
ground_entity(term="ALS", param_name="gene")
# → HGNC:396 (SOD1, formerly ALS1)
ground_entity(term="aspirin", param_name="drug")
# → CHEBI:15365Supported param_name filters: disease, gene, drug, pathway, tissue, cell_line, cell_type, side_effect.
Batch mode grounds multiple terms in one call:
ground_entity(terms=["SIRT3", "PRKN", "MAPT"], param_name="gene")
# → {mappings: {"SIRT3": {curie, name, score}, ...}, failed: [...]}Organism context accepts common names or taxonomy IDs:
ground_entity(term="LRRK2", organism="human") # resolved to 9606
ground_entity(term="LRRK2", organism="9606") # passthrough
ground_entity(term="Trp53", organism="mouse") # resolved to 10090Cross-Reference Fallback
When a grounded query returns zero results, call_endpoint automatically looks up equivalent identifiers via xref relationships in the graph and retries. This handles cases where GILDA grounds to one namespace (e.g., MESH) but the relevant data is indexed under another (e.g., DOID).
Caching
All call_endpoint results are cached via a diskcache.FanoutCache:
Cross-process safe — SQLite backend, works with gunicorn multi-worker
LRU eviction — configurable max size (default 2GB)
Per-key TTL — default 1 hour, schema cached for 24 hours
Request coalescing — concurrent identical requests share a single Neo4j query
Cache stores raw results; sort, field projection, and pagination are applied post-cache
Safety
Validation layer prevents all write/mutate operations (DELETE, CREATE, MERGE, SET, REMOVE, DROP, DETACH)
Parameterized queries prevent injection attacks
Neo4j
execute_read()enforces read-only semantics at the driver level
Token-Aware Pagination
Large result sets are automatically truncated with continuation hints:
{
"results": [...],
"pagination": {
"total": 1500,
"returned": 127,
"has_more": true,
"next_offset": 127
}
}Use estimate=True to probe query cost before fetching:
call_endpoint("get_drugs_for_target", '{"target": "EGFR"}', estimate=True)
# → {result_count: 78, token_estimate_full: 15200, fields_available: [...], sample: [...]}Then fetch with projection:
call_endpoint("get_drugs_for_target", '{"target": "EGFR"}', fields=["db_ns", "db_id", "name"], limit=50)Configuration
Neo4j Credentials
export INDRA_NEO4J_URL="bolt://localhost:7687"
export INDRA_NEO4J_USER="neo4j"
export INDRA_NEO4J_PASSWORD="your-password"Or configure in ~/.config/indra/config.ini (the standard INDRA config file).
Transport Security (Required)
Variable | Required | Description |
| Yes | Comma-separated allowed hosts (e.g., |
| Yes | Comma-separated allowed origins (e.g., |
Cache
Variable | Default | Description |
|
| Cache directory path |
|
| Max cache size in MB (LRU eviction beyond this) |
|
| Default TTL in seconds |
|
| FanoutCache shards (higher = better concurrency, more file handles) |
HTTP Mode
Variable | Default | Description |
|
| Host to bind in HTTP mode |
|
| Port to bind in HTTP mode |
Development
git clone https://github.com/gyorilab/indra_agent.git
cd indra_agent
pip install -e ".[dev]"
# Run tests
pytest tests/
# Run specific test file
pytest tests/mcp_server/test_gateway_tools.py -vDependencies
indra_cogex— INDRA CoGEx knowledge graph clientmcp>=1.2.0— Model Context Protocol SDK (requires 1.2.0+ for transport security)gilda— Biomedical entity groundingdiskcache>=5.6— Persistent caching with LRU evictionpydantic>=2.0— Data validationclick>=8.0— CLI frameworkstarlette>=0.27.0— ASGI frameworkuvicorn>=0.20.0— ASGI server (HTTP mode)jinja2>=3.0.0— Template engine
License
BSD-2-Clause
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI clients to biomedical data and tools.
Knowledge graph ingestion, entity search, ontology analysis, and CoPass scoring.
Knowledge graph ingestion, entity search, ontology analysis, and CoSync scoring.
Search biomedical papers, inspect publication records, and traverse citation or semantic graphs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query clinical genomics databases, retrieve supporting literature, analyze population genetics, and visualize biological pathways.16MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs and AI agents to query a biomedical knowledge graph stored in RedisGraph, with tools for concept search, synonym enrichment, and study variable discovery through semantic relationships.-
- FlicenseBqualityDmaintenanceEnables AI agents to query free biomedical and pharmaceutical APIs for clinical trials, drug data, molecular structures, adverse events, and research literature.14-
- FlicenseNot gradedqualityCmaintenanceEnables LLMs and AI agents to search a biomedical knowledge graph for concepts and study variables, traverse semantic relationships, and look up BioData Catalyst PIC-SURE paths for cohort building.-