Skip to main content
Glama

Biomart MCP

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

特征

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可能会很有用
  • Loading...
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

与 Biomart 数据库接口的模型上下文协议服务器,允许模型发现生物数据集、探索属性/过滤器、检索生物数据以及在不同的生物标识符之间进行转换。

  1. 与 Biomart 接口的 MCP 服务器
    1. 安装
      1. 通过 Smithery 安装
      2. 克隆存储库
      3. 克劳德桌面
      4. 光标
      5. 格拉玛
      6. 发展
    2. 特征
      1. 贡献
        1. 未来的潜在功能

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that provides tools for connecting to and interacting with various database systems (SQLite, PostgreSQL, MySQL/MariaDB, SQL Server) through a unified interface.
            Last updated -
            3
            Python
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.
            Last updated -
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that provides comprehensive access to Microsoft SQL Server databases, enabling Language Models to inspect schemas, execute queries, manage database objects, and perform advanced database operations.
            Last updated -
            6
            Python
          • A
            security
            A
            license
            A
            quality
            A production-ready Model Context Protocol (MCP) server that provides comprehensive access to the BioOntology API for searching, annotating, and exploring over 1,200 biological ontologies.
            Last updated -
            10
            6
            JavaScript
            MIT License

          View all related MCP servers

          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