kegg-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kegg-mcp-serversearch pathways for glycolysis in human"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kegg-mcp-server-python
An unofficial Python Model Context Protocol (MCP) server for the KEGG bioinformatics database. It exposes 34 tools, 9 resource templates, and 4 guided prompts to any MCP-compatible client (Claude Desktop, Claude Code, Cursor, etc.). Developed by Elytron Biotech.
Built with FastMCP, returns structured Pydantic JSON (not raw text), and includes per-operation TTL caching, request retry with exponential backoff, KEGG-friendly concurrency limits, structured JSON stderr logging, and batch helpers out of the box. No API key required -- uses the free KEGG REST API.
Responses are token-aware by default: get_*_info tools return a compact EntrySummary (entry id, name, class, description, counts of linked entities) unless you pass detail_level="full". Errors are returned as a typed ErrorResult the model can reason about, not raised as exceptions.
Note: This is a community non-official project and is not affiliated with or endorsed by KEGG or Kanehisa Laboratories.
Quick start
With uvx (no install)
uvx kegg-mcp-serverWith pip
pip install kegg-mcp-server
kegg-mcp-serverClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"kegg": {
"command": "uvx",
"args": ["kegg-mcp-server"]
}
}
}OS | Path |
macOS |
|
Windows |
|
Linux |
|
Claude Code
claude mcp add kegg-mcp-server -- uvx kegg-mcp-serverOr install as a plugin (includes skill metadata):
claude plugin install Lucas-Servi/kegg-mcp-server-pythonMCPB bundle (Claude Desktop, no Python required)
Download the latest .mcpb from the releases page and drag it onto Claude Desktop. The bundle vendors all Python dependencies and runs with Claude Desktop's embedded Python.
What's included
34 Tools
Category | Tools | Examples |
Database |
| Get KEGG release stats, list all ~26k organisms |
Pathways |
| Search by keyword, get full pathway details |
Genes |
| Find genes in any organism, cross-species orthologs |
Compounds |
| Search by name/formula/mass, find reactions |
Reactions |
| Equation, enzymes, pathways for any reaction |
Enzymes |
| EC number lookup, substrates, genes |
Diseases |
| Disease genes, drugs, pathways |
Drugs |
| Drug targets, DDI screening |
Modules |
| Functional module definitions |
Orthology |
| KEGG Orthology entries |
Glycans |
| Glycan composition, reactions |
BRITE |
| Functional hierarchies |
Cross-database |
| Bulk fetch (up to 50), ID mapping (UniProt, NCBI, ChEBI, PubChem) |
Visualization |
| ASCII art rendering of pathway topology (chain or grid mode) |
9 Resource Templates
Direct URI-based access to KEGG entities:
kegg://pathway/{pathway_id} e.g. kegg://pathway/hsa00010
kegg://gene/{gene_id} e.g. kegg://gene/hsa:1956
kegg://compound/{compound_id} e.g. kegg://compound/C00002
kegg://reaction/{reaction_id} e.g. kegg://reaction/R00756
kegg://disease/{disease_id} e.g. kegg://disease/H00004
kegg://drug/{drug_id} e.g. kegg://drug/D00001
kegg://organism/{org_code} e.g. kegg://organism/hsa
kegg://pathway/{pathway_id}/ascii e.g. kegg://pathway/hsa00010/ascii
kegg://search/{database}/{query} e.g. kegg://search/compound/glucose4 Guided Prompts
Prompt | Arguments | What it does |
|
| Maps a gene list to KEGG IDs, aggregates pathway associations, identifies enriched pathways |
|
| Drug lookup, target identification, pathway mapping, DDI screening |
|
| Compares gene/compound content of a pathway across species |
|
| Renders pathway as ASCII art (chain + grid), annotates key steps |
ASCII Pathway Renderer
The render_pathway_ascii tool converts KEGG pathway topology (from KGML XML) into LLM-friendly ASCII text. Two styles are available:
Chain mode (default) — linear reaction flow:
Glycolysis / Gluconeogenesis (hsa)
====================================
[alpha-D-Gl~] ──R01786──▶ [beta-D-Gl~] ──R01600──▶ [beta-D-F~]Grid mode — 2D spatial layout using KGML coordinates:
Glycolysis / Gluconeogenesis (hsa)
====================================
[Glc]────────▶[G6P]────────▶[F6P]
│
▼
[6PG]
Legend:
[Glc] = alpha-D-Glucose (cpd:C00267)
[G6P] = D-Glucose 6-phosphate (cpd:C00092)Transport options
# stdio (default -- for Claude Desktop, Claude Code, uvx)
kegg-mcp-server
# Streamable HTTP (for web/API deployment)
kegg-mcp-server --transport streamable-http --host 0.0.0.0 --port 8080
# python -m also works
python -m kegg_mcp_serverDevelopment
git clone https://github.com/Lucas-Servi/kegg-mcp-server-python
cd kegg-mcp-server-python
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Lint
ruff check src/ tests/
# Debug with MCP Inspector
mcp dev kegg-mcp-serverProject structure
src/kegg_mcp_server/
server.py FastMCP instance, lifespan (httpx client + TTL cache), CLI
client.py KEGGClient: async KEGG REST with retry/backoff + KEGG-politeness semaphore
cache.py Per-op TTL cache (info 24h, list 1h, entry ops 5min)
parsers.py KEGG flat-file and tab-delimited response parsers + summarize_flat_entry
errors.py KEGGAPIError exception type
logging.py JSON stderr logger (stdout is reserved for MCP stdio framing)
resources.py 8 MCP resource templates
prompts.py 3 bioinformatics workflow prompts
models/ Pydantic models for all KEGG entity types + EntrySummary + ErrorResult
tools/ 13 tool modules, each with a register(mcp) function; _common.py has the
@kegg_tool error-boundary decorator and shared READ_ONLY annotationsAuthor
Developed by Lucas Servi (lucasservi@gmail.com) at Elytron Biotech using Claude Code.
Acknowledgments
Based on Augmented-Nature/KEGG-MCP-Server -- the original TypeScript implementation that served as the foundation for this Python rewrite
KEGG -- Kyoto Encyclopedia of Genes and Genomes (Kanehisa Laboratories)
Model Context Protocol -- Anthropic's open protocol for LLM tool use
License
MIT -- see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lucas-Servi/kegg-mcp-server-python'
If you have feedback or need assistance with the MCP directory API, please join our Discord server