kegg-mcp-server-python

An unofficial Python Model Context Protocol (MCP) server for the KEGG bioinformatics database. It exposes 35 tools, 9 resource templates, and 4 guided prompts to any MCP-compatible client (Claude Desktop, Claude Code, Cursor, etc.). Developed by Elytron Biotech.
Built on the official MCP Python SDK v2 (MCPServer), returns structured Pydantic JSON (not raw text), and includes per-operation TTL caching, request retry with exponential backoff, a three-request-per-second rate limit, structured JSON stderr logging, and batch helpers out of the box. No API key is required.
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". List- and mapping-shaped outputs are capped at 100 items and report the full count plus truncated. Failures are MCP tool errors (isError: true) whose text is a typed ErrorResult JSON (code, retryable, hint) the model can reason about.
0.5.0 changes output shapes: failures (including not-found) are now isError: true instead of a normal result; convert_identifiers maps each source ID to a list of targets; link/ortholog/pathway-gene/DDI outputs are capped with truncated; batch_entry_lookup returns summaries unless detail_level="full"; logging is configured with --log-level / --log-tracebacks instead of environment variables.
0.6.0 adds draw_pathway_map: a PNG pathway map with gene boxes coloured by KO/EC groups, redrawn from KGML (new dependency: Pillow). See Pathway map images.
Usage notice: This is a community project and is not affiliated with or endorsed by KEGG or Kanehisa Laboratories. KEGG states that its REST API is for academic use by academic users; non-academic users must follow KEGG's linked non-academic-use guidance. Users are responsible for ensuring that their use complies with those terms.
Quick start
With uvx (no install)
uvx kegg-mcp-server
With pip
pip install kegg-mcp-server
kegg-mcp-server
Requires the MCP Python SDK v2 (mcp>=2,<3, protocol revision
2026-07-28). Versions up to 0.3.1 ran on the 1.x SDK; because mcp 2.0 removed
mcp.server.fastmcp, that is a breaking dependency change, which is why this is
0.4.0 rather than a patch. Nothing changes for clients — an mcp 2.x server
answers every earlier protocol revision from the same app, so a host still on
the 1.x SDK connects unchanged and negotiates 2025-11-25.
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"kegg": {
"command": "uvx",
"args": ["kegg-mcp-server"]
}
}
}
Config file locations
| OS | Path |
|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Claude Code
claude mcp add kegg-mcp-server -- uvx kegg-mcp-server
Or install as a plugin (includes slash commands, agent, and skill):
claude plugin marketplace add Lucas-Servi/kegg-mcp-server-python
claude plugin install kegg-mcp-server@kegg-mcp-server
Or, in one step (Claude Code v2.1.292+), pointing install at the marketplace directly:
claude plugin install kegg-mcp-server --marketplace Lucas-Servi/kegg-mcp-server-python
The plugin starts a local (stdio) MCP server, so it works in Claude Code, Cowork, and Claude Desktop, but not in the claude.ai web app.
The plugin bundles:
| Type | Name | Description |
|---|
| Command | /kegg <query> | Quick search across all KEGG databases |
| Command | /kegg-pathway <id> | Pathway deep-dive with ASCII visualization |
| Command | /kegg-drug <name> | Drug targets, pathways, and interactions |
| Agent | kegg-bioinformatics | Auto-invoked for biological pathway/gene/drug questions |
| Skill | kegg-analysis | Multi-step workflow guide (enrichment, comparison, investigation) |
MCPB bundle (Linux x86-64 only, no Python install required)