MGnify MCP Server
Enables interaction with MGnify metagenomics resources and tools through the Model Context Protocol. Provides access to MGnify's API for querying and analyzing metagenomic datasets and related biological information.
README
MGnify MCP Server
This repository implements an MCP server that exposes MGnify resources and tools over the Model Context Protocol.
Prerequisites
- Python 3.10+ recommended (the
mcpSDK requires Python >= 3.10). The project metadata uses a marker to skip installingmcpon older Python, but the server cannot run without it. - pip >= 21
- Optional: Docker
Quick start (Python 3.10+)
-
Create and activate a virtual environment
- macOS/Linux: python3 -m venv .venv source .venv/bin/activate
- Windows (PowerShell): py -3.10 -m venv .venv .venv\Scripts\Activate.ps1
-
Install the package (editable) and dependencies pip install -e .
-
Configure environment (optional)
- Copy .env.example to .env and adjust values as needed cp .env.example .env
- Available variables:
- MG_BASE_URL: Override the MGnify API base URL (default: https://www.ebi.ac.uk/metagenomics/api/v1)
- MG_API_KEY: If you have an API token, it will be sent as Bearer auth
- BIND, PORT: Only used if you enable the HTTP transport in server.py
-
Optional: Run a local smoke test (no MCP client needed) python scripts/smoke_test.py
- This will call the MGnify API via the included client to ensure things work locally.
-
Run the MCP server (stdio transport) mgnify-mcp
- The server will run over stdio until the client disconnects. Use an MCP-compatible client/tooling to connect.
Using with Claude Desktop (example)
- Add to your
claude_desktop_config.jsonor the UI where MCP servers are configured: { "mcpServers": { "mgnify": { "command": "/path/to/venv/bin/mgnify-mcp", "env": { "MG_BASE_URL": "https://www.ebi.ac.uk/metagenomics/api/v1" } } } } Replace the command with the absolute path to your venv script.
Alternative: Docker
- Build docker build -t mgnify-mcp .
- Run (stdio is not practical via docker). If you want HTTP transport, uncomment serve_http in mgnify_mcp/server.py and rebuild, then: docker run --rm -p 8173:8173 --env-file .env mgnify-mcp Then configure your client to connect to http://localhost:8173
Troubleshooting
- pip cannot find mcp / versions ignored require Python >=3.10 Upgrade to Python 3.10 or newer. The server relies on the mcp SDK.
- SSL or network errors to MGnify API Check MG_BASE_URL and your network. The public API should be reachable without an API key; some endpoints may rate-limit.
- Rate limiting The server surfaces 429 as an error with retry-after from MGnify. Back off and retry.
Development tips
- Run unit/lint tools you prefer. The code uses Pydantic v2 for input schemas and Requests for HTTP.
- Entry point is defined in pyproject.toml: mgnify-mcp -> mgnify_mcp.server:main
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.