MCP server exposing the UniProt protein knowledgebase to LLM clients.

MCP server exposing the UniProt protein knowledgebase to LLM clients.
GitHub repo:
fzlzjerry/uniprot-mcp· PyPI package & command:uniprotkb-mcp(the Python import package isuniprot_mcp).
A production-quality MCP server that exposes the UniProt REST API
to LLM clients (Claude Code, Claude Desktop, …) over stdio. Built with
FastMCP and managed with uv.
Tools return compact, token-efficient summaries by default and full payloads only on request, with robust error handling and an embedded UniProt query cheat-sheet so the model writes valid queries.
Published on PyPI — no clone, no install needed:
uvx uniprotkb-mcpThen point your MCP client at it (full config below):
{
"mcpServers": {
"uniprot": {
"command": "uvx",
"args": ["uniprotkb-mcp"],
"env": { "UNIPROT_MCP_CONTACT": "you@example.org" }
}
}
}| Tool | What it does |
|---|---|
search_uniprotkb | Search UniProtKB with native query syntax. reviewed / organism_id filters are added for you. Summary, FASTA, or TSV output. |
get_entry | One entry as a curated digest (function, names, organism, length, subcellular location, family/domains, key features, PTMs, keywords, PDB/AlphaFold/Ensembl/RefSeq/InterPro/GO cross-refs) or json/fasta/txt/gff. |
get_fasta | Raw FASTA for one accession or a batch. |
map_ids | Convert ids across databases via UniProt's async ID-mapping (e.g. RefSeq_Protein→UniProtKB, UniProtKB_AC-ID→PDB). Returns mapped pairs and unmapped ids; validates the db pair against the live config. |
get_taxonomy | Resolve an organism name or taxon id → taxon id, names, rank, lineage. Turn "human" into organism_id:9606. |
search_uniref | Search UniRef100/90/50 sequence-similarity clusters. |
search_proteomes | Search proteomes (whole-organism protein sets); reference-proteome filter. |
Plus an MCP resource resource://uniprot/query-cheatsheet documenting the
UniProtKB query syntax (gene:, organism_id:, reviewed:true,
length:[X TO Y], keyword:, ec:, boolean AND/OR/NOT, …).
.python-version)uvgit clone https://github.com/fzlzjerry/uniprot-mcp
cd uniprot-mcp
uv sync # creates .venv and installs fastmcp + httpx# stdio server (what MCP clients launch):
uv run uniprotkb-mcpUniProt asks API clients to identify themselves with a contact address. Set one
via the UNIPROT_MCP_CONTACT environment variable (it goes into the
User-Agent); otherwise a placeholder is used.
UNIPROT_MCP_CONTACT="you@example.org" uv run uniprotkb-mcpuvx (no clone / no sync)uvx (a.k.a. uv tool run) fetches, builds, and runs the console script in a
throwaway environment — nothing to install first. Pick whichever source you have:
# From PyPI (published):
uvx uniprotkb-mcp
# From a Git repo (note: repo is uniprot-mcp, command is uniprotkb-mcp):
uvx --from git+https://github.com/fzlzjerry/uniprot-mcp uniprotkb-mcp
# From a local checkout (this directory):
uvx --from /ABSOLUTE/PATH/TO/uniprot-mcp uniprotkb-mcp
# From a built wheel:
uvx --from ./dist/uniprotkb_mcp-0.1.0-py3-none-any.whl uniprotkb-mcpPin a version with uvx uniprotkb-mcp@0.1.0, or force a refresh of the cached
build with uvx --refresh --from <source> uniprotkb-mcp.
Edit claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json,
Windows: %APPDATA%\Claude\claude_desktop_config.json) and add:
{
"mcpServers": {
"uniprot": {
"command": "uvx",
"args": ["uniprotkb-mcp"],
"env": { "UNIPROT_MCP_CONTACT": "you@example.org" }
}
}
}This runs the published package straight from PyPI. To run unreleased code
instead, add a source: "args": ["--from", "git+https://github.com/fzlzjerry/uniprot-mcp", "uniprotkb-mcp"]
(git) or "args": ["--from", "/ABSOLUTE/PATH/TO/uniprot-mcp", "uniprotkb-mcp"]
(local checkout). Make sure uvx is on the PATH Claude Desktop sees (it ships
with uv; give the absolute path to uvx if needed, e.g. ~/.local/bin/uvx).
Restart Claude Desktop and the uniprot tools appear.
Prefer a cloned checkout instead of
uvx? Use"command": "uv", "args": ["run", "--directory", "/ABSOLUTE/PATH/TO/uniprot-mcp", "uniprotkb-mcp"].
Project-scoped via a .mcp.json in your project root (same shape):
{
"mcpServers": {
"uniprot": {
"command": "uvx",
"args": ["uniprotkb-mcp"],
"env": { "UNIPROT_MCP_CONTACT": "you@example.org" }
}
}
}Or from the CLI:
# via uvx (published / git / local source):
claude mcp add uniprot -e UNIPROT_MCP_CONTACT=you@example.org -- uvx uniprotkb-mcp
# via a local checkout with uv:
claude mcp add uniprot -e UNIPROT_MCP_CONTACT=you@example.org \
-- uv run --directory /ABSOLUTE/PATH/TO/uniprot-mcp uniprotkb-mcpExercises every tool against the live API and prints the output:
UNIPROT_MCP_CONTACT="you@example.org" uv run python -m tests.smokeDeveloping, testing, CI, and the release process (CI-driven PyPI Trusted
Publishing — no token) are documented in CONTRIBUTING.md.
TL;DR: uv sync, then uv run python -m tests.check_structure (offline) and
uv run python -m tests.smoke (live API).
httpx.AsyncClient with a descriptive User-Agent including
your contact.429 (honoring Retry-After) and 5xx; 400 surfaces
UniProt's own error message; no raw tracebacks reach the client (errors are
raised as ToolError).Link header / x-total-results; result sizes are
capped (≤ 500) and the total is always reported so you can narrow or page.POST /idmapping/run →
poll /idmapping/status/{job} (a 303 + Location signals completion) →
fetch results, automatically choosing the enriched UniProtKB results endpoint
vs. the simple-pair endpoint based on the target database.src/uniprot_mcp/
server.py # FastMCP instance, the 7 tools, cheat-sheet resource, main()
client.py # shared AsyncClient, retry/backoff, error mapping, header parsing
idmapping.py # async run/poll/results flow with target-aware routing
config.py # cached idmapping db config + from/to validation
formatting.py # JSON -> compact summary digests
cheatsheet.py # UniProt query cheat-sheet
tests/smoke.py # live-API smoke testA Node.js MCP server for searching and downloading academic papers from multiple sources, including arXiv, Web of Science, PubMed, Google Scholar, and 8 academic platforms in total. Requires API keys for some platforms configured via environment variables (e.g., WOS_API_KEY for Web of Science, PUBMED_API_KEY for PubMed, SEMANTIC_SCHOLAR_API_KEY for Semantic Scholar).
Deep Research 使用强大的 AI 模型快速生成深入的研究报告。支持 SSE API 和 MCP 服务器。需要在 .env 文件中配置环境变量以设置服务器端的 API 密钥和相关参数。
A simplified MCP server for arXiv paper retrieval and content parsing. Supports intelligent paper search, direct PDF link retrieval, and content parsing prioritizing HTML with PDF fallback.
MCP Server for Scientific Paper Harvesting from arXiv and OpenAlex, providing real-time access to scientific papers with metadata and full text extraction. No external data files required.
深度加密货币研究 - 免费且完全本地化。需要 Node.js (版本16或更高)。
一个基于 Node.js 的 MCP 服务器,用于搜索和下载来自多个来源的学术论文,包括 arXiv、Web of Science、PubMed、Google Scholar 以及总共 8 个学术平台。部分平台需要通过环境变量(如 WOS_API_KEY、PUBMED_API_KEY 和 SEMANTIC_SCHOLAR_API_KEY)在 .env 文件中配置的 API 密钥。
Read https://lobehub.com/mcp/fzlzjerry-uniprot-mcp/skill.md and follow the instructions to set up the LobeHub MCP Marketplace and install the MCP server.
Send this prompt to your agent to publish your MCP server to the marketplace
