FastMCP-based tool for writing prompts against data in the NMDC (National Microbiome Data Collaborative) database
Project description
NMDC MCP
A fastmcp-based tool for writing prompts against data in the NMDC database.
Installation
You can install the package from source using uv:
uv sync
Usage
You can use the CLI:
nmdc-mcp
Or import in your Python code: # TODO incorrect instructions
from nmdc_mcp.main import create_mcp
mcp = create_mcp()
mcp.run()
Or utilize the nmdc_mcp.client. This client uses OpenAI API and assumes you have API_KEY set in a .env file in the root directory of this repo. The BASE_URL and MODEL are also customizable in .env. For PNNL staff that want to run via this client - the BASE_URL and MODEL are specific. Contact Olivia Hess if you need help setting these values up.
uv run 'path/to/nmdc_mcp/client.py' 'path/to/nmdc_mcp/main.py'
Or using python
python 'path/to/nmdc_mcp/client.py' 'path/to/nmdc_mcp/main.py'
Development
Local Setup
# Clone the repository
git clone https://github.com/microbiomedata/nmdc-mcp.git
cd nmdc-mcp
# Install development dependencies
make dev
Development Workflow
The project uses a comprehensive Makefile for development tasks:
# Run all development checks (tests, formatting, linting, type checking)
make all
# Individual commands
make dev # Install development dependencies
make test-coverage # Run tests with coverage
make format # Format code with black
make lint # Lint with ruff
make mypy # Type checking
make deptry # Check for unused dependencies
make build # Build package
Testing
# Run all tests with coverage
make test-coverage
# Run specific test types
make test-unit # Unit tests only
make test-integration # Integration tests
make test-real-api # Tests against real NMDC API
make test-mcp # Test MCP protocol
MCP Integration
Claude Desktop Setup
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"nmdc-mcp": {
"command": "uvx",
"args": ["nmdc-mcp"]
}
}
}
Claude Code MCP Setup
claude mcp add -s project nmdc-mcp uvx nmdc-mcp
Goose Setup
goose session --with-extension "uvx nmdc-mcp"
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nmdc_mcp-0.6.0.tar.gz.
File metadata
- Download URL: nmdc_mcp-0.6.0.tar.gz
- Upload date:
- Size: 93.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af2268e63f5ef07f83044f146fe8da37c4990a5c626458a5f21e2711a5c859c4
|
|
| MD5 |
a31776d2bbdd81a8ed11a01188ca02bb
|
|
| BLAKE2b-256 |
0e350fa1dc3bc045266c722be818f8ac406d252c9aca0e46bc284fa6c71e2011
|
Provenance
The following attestation bundles were made for nmdc_mcp-0.6.0.tar.gz:
Publisher:
pypi_publish.yaml on microbiomedata/nmdc-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nmdc_mcp-0.6.0.tar.gz -
Subject digest:
af2268e63f5ef07f83044f146fe8da37c4990a5c626458a5f21e2711a5c859c4 - Sigstore transparency entry: 385725432
- Sigstore integration time:
-
Permalink:
microbiomedata/nmdc-mcp@c67bac57dadae0dac0e095b6d2be38d626d74246 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/microbiomedata
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_publish.yaml@c67bac57dadae0dac0e095b6d2be38d626d74246 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nmdc_mcp-0.6.0-py3-none-any.whl.
File metadata
- Download URL: nmdc_mcp-0.6.0-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef97e5995f9d955348805103d8f59d28d62ff594092805f97fce5b3d11525483
|
|
| MD5 |
b6b4f8e070f500dfdc7a65fc88c8808f
|
|
| BLAKE2b-256 |
86128e0d6cd8bcaa8aa343cbae7ea2a524913bbd9387bf97821a89dec50f8269
|
Provenance
The following attestation bundles were made for nmdc_mcp-0.6.0-py3-none-any.whl:
Publisher:
pypi_publish.yaml on microbiomedata/nmdc-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nmdc_mcp-0.6.0-py3-none-any.whl -
Subject digest:
ef97e5995f9d955348805103d8f59d28d62ff594092805f97fce5b3d11525483 - Sigstore transparency entry: 385725436
- Sigstore integration time:
-
Permalink:
microbiomedata/nmdc-mcp@c67bac57dadae0dac0e095b6d2be38d626d74246 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/microbiomedata
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_publish.yaml@c67bac57dadae0dac0e095b6d2be38d626d74246 -
Trigger Event:
release
-
Statement type: