mcp-metexplore
OfficialThis server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
mcp-metexplore
Metadata
authors: ludovic.cottret@inrae.fr with claude-opus-5-5
creation date:
2026-11-13main usage: MCP (Model Context Protocol) server to query MetExplore metabolic networks from LLM clients
Related MCP server: iLEAP MCP
Description
MCP (Model Context Protocol) server for querying the MetExplore API from any MCP-compatible client (Claude Desktop, Claude Code, VS Code...).
It lets users ask questions about MetExplore organisms, metabolites and reactions in natural language, the LLM client calling the MetExplore API through the tools exposed by this server.
It can be used as a shared remote server (Streamable HTTP transport,
nothing to install) or run locally (stdio transport).
Example questions
"In how many reactions is glucose involved in humans?" →
search_organisms("Homo sapiens"), thensearch_metabolites, thencount_reactions_for_metabolite."Give me all the metabolites with the formula C3H3O4 in Human-GEM V2." →
search_organisms("Human-GEM 2")thensearch_metabolites_by_formula."Which metabolites correspond to CHEBI:15422 in Human-GEM V2?" →
search_organisms("Human-GEM 2")thensearch_metabolites_by_external_id."Which metabolites of Human-GEM V2 are related to CHEBI:17234?" →
search_organisms("Human-GEM 2")thenmatch_chebi."I have this file of metabolite identifiers, map it onto Ralstonia and give me a report." →
search_organisms("Ralstonia")thenmap_metabolites."Map these E. coli genes and tell me which pathways are enriched." →
search_organisms("E. coli")thenmap_genes.
Features
search_organisms: search for a MetExplore organism/network, with disambiguation when several networks match (e.g. "Homo sapiens").search_metabolites: search for a metabolite in a network, with disambiguation (id, full name, chemical formula, cross-references).search_metabolites_by_formula: list every metabolite of a network with a given chemical formula, optionally ignoring hydrogens to catch all protonation states.search_metabolites_by_external_id: list every metabolite of a network cross-referenced to an external identifier (ChEBI, KEGG, HMDB, MetaNetX, PubChem, LipidMaps, InChI, BiGG, VMH...), after checking that the network contains identifiers from that database.match_chebi: match ChEBI identifiers to the metabolites of a network using the ChEBI ontology: exact matches, but also more generic/specific classes, conjugate acids/bases, tautomers and enantiomers, with their distance.count_reactions_for_metabolite: count/list the reactions involving a metabolite.map_metabolites: map a list of metabolite identifiers onto a network and produce a report (mapped / not found / ambiguous).map_genes: map a list of gene identifiers (exact or regular expression) onto a network and produce the same report, with pathway enrichment.get_quota_status: check the remaining API request quota for the current session.
API request quota
To avoid overloading the MetExplore API, the server limits the number of HTTP
requests actually sent to METEXPLORE_MAX_REQUESTS_PER_SESSION (20 by
default) per MCP session: the whole process lifetime in stdio mode, one MCP
session (one client connection) in HTTP mode. An in-memory, per-session cache
(network list, metabolites per network) avoids re-spending this quota on
repeated searches over the same data. The remaining quota can be checked with
the get_quota_status tool. Once the quota is reached, restart the server
(stdio) or reconnect the client to open a new session (HTTP).
Getting Started
The easiest way is to use the hosted remote server (no installation, no application key). The server can also be run locally (stdio).
Prerequisites
MCP client: any MCP-compatible client (Claude Code, Claude Desktop, VS Code...)
Remote use: nothing else
Local use:
Operating System: Linux, macOS or Windows
Node.js: version 18 or higher
npm
a MetExplore application key: ask for one by email at contact-metexplore@inrae.fr
Optional: a MetExplore user token (available in the MetExplore interface, in your account profile) to access your private networks
Deployment only: Docker
Installing
Option 1: use the remote server
No installation and no application key are needed: the server is hosted and already holds the MetExplore application key.
Claude Code (one command) — public networks only:
claude mcp add --transport http metexplore https://metexplore.toulouse.inrae.fr/metexplore-mcp/mcpWith your MetExplore user token, to also access your private networks:
claude mcp add --transport http metexplore https://metexplore.toulouse.inrae.fr/metexplore-mcp/mcp --header "X-MetExplore-Token: YOUR_METEXPLORE_USER-TOKEN"Add --scope user to make the server available in all your projects.
Other clients (.mcp.json, VS Code...):
{
"mcpServers": {
"metexplore": {
"type": "http",
"url": "https://metexplore.toulouse.inrae.fr/metexplore-mcp/mcp",
"headers": { "X-MetExplore-Token": "<your MetExplore user token>" }
}
}
}Omit headers to access public networks only.
Option 2: local use (stdio)
The server is published on npm as
@metexplore/mcp-metexplore:
npx downloads and runs it, nothing to install. Register it in your client,
e.g. for Claude Desktop (claude_desktop_config.json) or any client using the
mcpServers format:
{
"mcpServers": {
"metexplore": {
"command": "npx",
"args": ["-y", "@metexplore/mcp-metexplore"],
"env": {
"METEXPLORE_APP_KEY": "<your app key>"
}
}
}
}Or with Claude Code:
claude mcp add metexplore --env METEXPLORE_APP_KEY=<your app key> -- npx -y @metexplore/mcp-metexploreOther variables of the configuration table below can be added the same way
("env" block or --env). Check the connection with /mcp in Claude Code,
then ask one of the example questions.
From the sources
To run a modified version, install and build the server:
git clone https://forge.inrae.fr/metexplore/mcp/mcp-metexplore.git
cd mcp-metexplore
npm install
npm run build
cp .env.example .env
# edit .env: see the configuration table belowConfiguration (.env, or env block of the client configuration):
Variable | Required | Description |
| no (default | Base URL of the MetExplore API, no trailing slash |
| yes | Application token ( |
| no (stdio only) | A user token already obtained |
| no (stdio only, set together) | Credentials used to call |
| no (default | Max number of requests sent to the API per MCP session |
| no (default | Set to |
| no (default |
|
Without any user credentials, the API is queried with the app key only: only public networks are visible. HTTP-mode variables are described in Deployment.
Then register the built server (instead of npx) in your client, e.g. for
Claude Desktop / Claude Code (claude_desktop_config.json or equivalent):
{
"mcpServers": {
"metexplore": {
"command": "node",
"args": ["/absolute/path/to/mcp-metexplore/dist/index.js"]
}
}
}Environment variables can also be passed directly in this configuration block
("env": {...}) instead of via a .env file.
Or with Claude Code:
claude mcp add metexplore --env METEXPLORE_APP_KEY=<your app key> -- node /absolute/path/to/mcp-metexplore/dist/index.jsCheck the connection with /mcp in Claude Code, then ask one of the
example questions.
Running the tests
Unit tests use node:test with a mocked fetch (no MetExplore API needed):
npm testThey cover the tools (search, disambiguation, formula/external id matching, ChEBI ontology matching, mapping report), the API client, the configuration, the output formatting and the HTTP transport.
Deployment
Remote deployment (HTTP)
With MCP_TRANSPORT=http, the server exposes the MCP
Streamable HTTP
transport on /mcp, plus GET /health (used by the Docker healthcheck).
METEXPLORE_USER_* variables are ignored in this mode; only
METEXPLORE_APP_KEY is shared by all clients.
Variable | Default | Description |
|
| Listening address ( |
| empty (no check) | Comma-separated public hostnames accepted in the |
|
|
|
|
| Max HTTP requests per client IP per minute on |
|
| Max concurrent MCP sessions (503 beyond) |
|
| Idle sessions are closed after this delay |
Docker
docker build -t mcp-metexplore .
docker run --rm -p 127.0.0.1:3000:3000 \
-e METEXPLORE_APP_KEY=... -e METEXPLORE_API_URL=... \
-e MCP_ALLOWED_HOSTS=localhost mcp-metexplore
curl http://localhost:3000/healthOn the servers (see Continuous deployment),
the container is only bound to 127.0.0.1:${HOST_PORT}; TLS and the public
domain name are handled by the host's reverse proxy, which must keep the
original Host header and should not buffer responses. Example (nginx):
location /mcp {
proxy_pass http://127.0.0.1:8077;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_buffering off;
proxy_read_timeout 1h;
}Apache equivalent: ProxyPreserveHost On,
ProxyPass /mcp http://127.0.0.1:8077/mcp flushpackets=on timeout=3600.
Continuous deployment (GitLab CI)
.gitlab-ci.yml runs on the vm-metexplore-dev runner (docker executor).
The test and build jobs (docker:27-cli image) use the host's Docker daemon,
so the runner must mount its socket in /etc/gitlab-runner/config.toml:
[runners.docker]
volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]Deploy jobs run in alpine with openssh-client and only need SSH access
to the VMs.
Trigger | Jobs | Image | Target |
any branch / MR |
| — | — |
push on |
|
| environment |
tag |
|
| environment |
Versioning: the git tag is the single source of truth. package.json
and server.json stay at 0.0.0 in the repository; the CI
injects the tag as the image's version (--build-arg VERSION), as the npm
package's version (npm version X.Y.Z --no-git-tag-version, not committed)
and as the MCP registry version. Develop images report 0.0.0-develop.<sha>.
The publish:npm job publishes
@metexplore/mcp-metexplore
at the tag's version (a no-op if that version is already on npm).
The publish:mcp-registry job then lists that version in the
official MCP registry as
io.github.MetExplore/mcp-metexplore, from server.json (npm
package + hosted remote server), with a pinned mcp-publisher. The registry
checks that the npm package's mcpName (in package.json) equals
server.json's name. A no-op if that version is already in the registry.
The release job creates the GitLab release of the tag (Deploy > Releases),
using the ## X.Y.Z section of CHANGELOG.md as its description:
add that section before pushing the tag.
Deployment writes no file on the VM: the job pipes a script to ssh … sh -s
that pulls the image, replaces the mcp-metexplore container with
docker run (runtime configuration passed through --env-file /dev/stdin)
and waits for the container to be healthy. The VMs only need Docker.
Each environment can be managed from Operate > Environments:
Stop: runs the manual
stop:develop/stop:productionjob, which removes the container (docker rm -f mcp-metexplore).Re-deploy: re-runs the deploy job of the last deployment (same image tag), which restarts the service after a stop. A rollback is a re-deploy of an older deployment.
CI/CD variables. The SSH credentials are shared with other projects and defined at the group level, without environment scope:
Variable | Notes |
| SSH user on the VMs (must be allowed to run |
| Key authorized for |
| Develop VM (used as |
| Production VM (used as |
|
|
Everything else is defined at the project level (Settings > CI/CD >
Variables), scoped to the develop and production environments, so it
never affects other projects of the group. A project-level variable also
overrides a group-level one with the same name (e.g. a different SSH_USER
for one environment).
Variable | Notes |
| MetExplore API used by this environment |
| Masked + protected |
| Public hostname of this environment |
| Optional (default |
| Optional |
The publishing tokens are defined at the project level, without environment scope:
Variable | Notes |
| Masked + protected. npm granular access token (npmjs.com > Access Tokens > Generate New Token > Granular): read and write on the |
| Masked + protected. GitHub token of an Owner of the MetExplore organization (required to publish under |
Protected variables are only exposed on protected branches/tags: protect
develop and the release tags *.*.* (Settings > Repository).
Known limitations
HTTP sessions are kept in memory: a single container instance is assumed (no horizontal scaling without sticky sessions), and a restart closes all sessions (clients transparently re-initialize).
The quota is per MCP session; the per-IP rate limit is what bounds a client opening many sessions.
GET /networksandGET /metabolitesdon't support server-side filtering by name: searching happens client-side over the full (cached) list. For a very large network, the first metabolite search can be sizeable.
Contributing
We welcome contributions! Please open an issue or a merge request on the forge repository.
Development Guidelines
npm run dev # TypeScript compilation in watch mode
npm test # unit tests (node:test, mocked fetch)npm run dev only recompiles dist/; it does not start the server.
Testing with an LLM client (Claude Code)
Terminal 1, recompile on change:
npm run devTerminal 2, start the server in HTTP mode:
MCP_TRANSPORT=http npm start(listens on
http://127.0.0.1:3000/mcp; configureMETEXPLORE_API_URLin.env, e.g.http://localhost:1337)Connect Claude Code:
claude mcp add --transport http --scope local metexplore-dev http://127.0.0.1:3000/mcpCheck the connection with
/mcp, then ask a test question.
The server does not reload on change: restart it after each rebuild.
Remove the test entry with claude mcp remove metexplore-dev.
Testing with the MCP Inspector
npx @modelcontextprotocol/inspector
# connect to http://localhost:3000/mcp with the "Streamable HTTP" transport
# (server started as above)Put test configuration in .env rather than in shell VAR=value prefixes:
the server reads it via dotenv, and the inspector's --cli mode does not
forward the shell's custom environment variables.
Code Style
TypeScript (strict mode), ES modules
Tool inputs are validated with Zod
Changelog
All notable changes to this project will be documented in CHANGELOG.md. For the versions available, see the releases on this repository.
Authors
Ludovic Cottret - Design, prompting, and reviewing - MTH, INRAE, MetaToul
Claude code - Code generation - claude-opus-5-5 model
License
mcp-metexplore is distributed under the Apache License 2.0. Please refer to LICENSE file for further details.
Support & External resources
:book: MetExplore API documentation - MetExplore API
:scroll: MCP specification - Model Context Protocol
:bug: Bug Reports - Forge issues
:email: Email - contact-metexplore@inrae.fr
Acknowledgments
Built with the MCP TypeScript SDK
Relies on the MetExplore web server and API
Supported by MetaboHUB
Additional Resources
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to browse the Gene Ontology through the EBI QuickGO API, including keyword search for GO terms, retrieval of a term's name, aspect, definition and synonyms by id, and listing the GO annotations tied to a UniProt accession. Runs keyless over HTTP or as a local stdio server, with an optional gateway route that lets plain-English questions be answered without choosing tools manually.61 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query product footprints, inspect transport activity data, and submit events from iLEAP-conformant endpoints through natural language, using MCP tools over Streamable-HTTP or stdio.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables searching biomedical literature across PubMed, PubMed Central, and Europe PMC, fetching article metadata and full text, resolving citations and identifiers, and grounding queries in MeSH vocabulary. Runs over stdio or Streamable HTTP, exposing 11 tools, a database-info resource, and a research-plan prompt.9 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables searching PubMed and Europe PMC, fetching article metadata and full text via PMC/Europe PMC/Unpaywall, formatting citations, resolving partial references and identifiers, and grounding queries in MeSH vocabulary. Runs over stdio or Streamable HTTP, exposing these biomedical literature capabilities as MCP tools, a resource, and a prompt.9 npmMIT