Skip to main content
Glama
jzinno
by jzinno

Biomart MCP

铁匠徽章

与 Biomart 接口的 MCP 服务器

模型上下文协议(MCP) 是一个开放协议,它标准化了应用程序如何向Anthropic开发的 LLM 提供上下文。在这里,我们使用MCP python-sdk创建一个 MCP 服务器,该服务器通过pybiomart包与 Biomart 交互。

演示 biomart-mcp 的运行情况

有一个简短的演示视频展示了 MCP 服务器在 Claude Desktop 上的运行情况。

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Biomart MCP:

npx -y @smithery/cli install @jzinno/biomart-mcp --client claude

克隆存储库

git clone https://github.com/jzinno/biomart-mcp.git
cd biomart-mcp

克劳德桌面

uv run --with mcp[cli] mcp install --with pybiomart biomart-mcp.py

光标

通过 Cusror 的代理模式,其他模型也可以利用 MCP 服务器,例如来自 OpenAI 或 DeepSeek 的服务器。点击光标设置齿轮,导航至MCP ,将 MCP 服务器添加到全局配置,或通过在项目中添加.cursor/mcp.json将其添加到项目范围。

示例.cursor/mcp.json

{
    "mcpServers": {
        "Biomart": {
            "command": "uv",
            "args": [
                "run",
                "--with",
                "mcp[cli]",
                "--with",
                "pybiomart",
                "mcp",
                "run",
                "/your/path/to/biomart-mcp.py"
            ]
        }
    }
}

格拉玛

发展

# Create a virtual environment
uv venv

# MacOS/Linux
source .venv/bin/activate

# Windows
.venv\Scripts\activate

uv sync #or uv add mcp[cli] pybiomart

# Run the server in dev mode
mcp dev biomart-mcp.py

Related MCP server: Ensembl MCP Server

特征

Biomart-MCP 提供了几种与 Biomart 数据库交互的工具:

  • 集市和数据集发现:列出可用的集市和数据集,以探索 Biomart 数据库结构

  • 属性和过滤器探索:查看特定数据集的常见或所有可用属性和过滤器

  • 数据检索:使用特定属性和过滤器查询 Biomart 以获取生物数据

  • ID 翻译:在不同的生物标识符之间进行转换(例如,基因符号到 Ensembl ID)

贡献

欢迎提交 Pull 请求!开发过程中的一些小提示:

  • 我们在这里仅使用@mcp.tool() ,这是为了最大限度地提高与支持 MCP 的客户端的兼容性,如文档中所示。

  • 我们使用@lru_cache来缓存计算成本高昂或进行外部 API 调用的函数的结果。

  • 我们需要注意不要过度占用模型的上下文窗口,例如,你会在很多地方看到df.to_csv(index=False).replace("\r", "")代码。这种 csv 格式的返回比df.to_string()之类的方法(后者大多数 token 都是空格)更高效。还要注意,从染色体中提取所有基因或类似的大型请求,对于上下文窗口来说也会过大。

未来的潜在功能

当然,还有很多功能可以添加,有些功能可能超出了biomart-mcp这个名称的范围。以下是一些想法:

  • 使用bs4添加资源站点的网络抓取,例如,我们获得了 NOTCH1 的 Ensembl 基因 ID,那么在某些情况下,从UCSC 页面上的Comments and Description Text from UniProtKB可能会很有用

  • $...$

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Auditable MCP server for PubMed, Europe PMC, ClinicalTrials.gov, and bioRxiv/medRxiv queries

  • BGG MCP provides access to the BoardGameGeek API through the Model Context Protocol, enabling retr…

  • A Model Context Protocol server for Wix AI tools

View all MCP Connectors

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/jzinno/biomart-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server