MathModDB MCP server for semantic ontology exploration and SPARQL querying.
Explore_Ontology: semantic schema discovery (classes/properties/qualifiers).SPARQL_Query: single SPARQL query execution.Batch_SPARQL_Query: batch SPARQL query execution.
The server runs as streamable-http on port 8000 by default.
See the MCP server in action in this example chat
- Python
3.12+(for local runs) - uv (for local runs)
OPENAI_API_KEY(required)- Docker (for containerized runs)
- Docker BuildKit enabled (required by the Dockerfile build secret)
uv sync --frozen
export OPENAI_API_KEY=your_key_here
uv run fastmcp run main.py --host 0.0.0.0 --port 8000 --transport streamable-httpThe Docker image initializes ontology/vector data during build, so the API key must be provided at build time as a Docker secret.
- Docker BuildKit enabled (
DOCKER_BUILDKIT=1) OPENAI_API_KEYpresent in your shell environment
DOCKER_BUILDKIT=1 docker build \
--secret id=OPENAI_API_KEY,env=OPENAI_API_KEY \
-t mathmoddb-mcp .docker run --rm --name mathmoddb-mcp -p 8000:8000 -e OPENAI_API_KEY="$OPENAI_API_KEY" mathmoddb-mcpYou can also use the included helper script:
./start.shAfter the server is running at http://127.0.0.1:8000/mcp, add this MCP entry in your Claude Desktop config:
"MathModDB": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8000/mcp"
],
"env": {}
}- Node.js / npm available locally (for
npx) mcp-remoterunnable vianpx