Skip to main content
Glama
camilothorne

Knowledge Graph MCP Server

by camilothorne

Knowledge Graph MCP Server

An MCP server that exposes SPARQL-backed knowledge graph tools for DBpedia and DBLP. It uses the MCP Python SDK and serves Streamable HTTP.

Tools

  • query_dbpedia(query): Sends the supplied SPARQL query to DBpedia as a URL-encoded HTTP GET and returns SPARQL Results JSON.

  • query_dblp_topic(topic): Searches DBLP publication titles for the supplied topic and returns up to 10 results with citation counts.

  • query_arxiv(topic): Searches arXiv for papers matching the topic that were submitted during the current UTC calendar week, returning Atom XML.

DBpedia and DBLP use public SPARQL endpoints configured in settings.py. The arXiv tool uses the public arXiv API.

Related MCP server: wiki-formant

Run Locally

Requires Python 3.11 or later.

python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python server.py

The MCP Streamable HTTP endpoint is http://localhost:8080/mcp. The server uses the PORT environment variable when set, and defaults to port 8080.

Build and Run with Docker

docker build -t knowledge-graph-mcp .
docker run --rm -p 8080:8080 -e PORT=8080 knowledge-graph-mcp

Connect an MCP client to http://localhost:8080/mcp using Streamable HTTP.

Deploy to Cloud Run

The compile_and_test_gcp.yaml GitHub Actions workflow builds and pushes the image to Artifact Registry. It deploys when a push commit message contains [deploy] or when a pull request is merged. Configure the workflow's docker-env environment with the GCP_SA_KEY and GCP_PROJECT secrets.

The workflow configures the service to listen on port 8080 and disables unauthenticated access. Callers therefore need Cloud Run invoker permission and a valid Google identity token. The MCP endpoint is https://<cloud-run-service-url>/mcp.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    MCP server exposing SPARQL query functionalities for LLMs, enabling query execution, validation, and graph exploration across SPARQL endpoints.
    7
    25 PyPI
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Exposes remote, agent-facing MCP endpoints over Streamable HTTP for web search, webpage parsing, local knowledge-base retrieval and document creation, and delegation of tasks to configurable LLM providers. Also bundles an admin console with onboarding, provider/model configuration, API-key management, and call logging.
    MIT
  • F
    license
    Not graded
    quality
    A
    maintenance
    Enables clients to search and retrieve Artsdata entities in English or French, run SPARQL queries against the Artsdata endpoint, fetch the compiled Artsdata schema, and discover the download URL and version of the latest core-minus-provenance dump via the Databus. It exposes these capabilities as MCP-style tools and resources over HTTP, with configurable endpoints, timeouts, row limits, and CORS.
    -