SPARQL MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PROFILE | Yes | Profile to use: `wikipathyways` or `aopwiki`. | |
| MCP_HOST | No | HTTP bind address. | 127.0.0.1 |
| MCP_PORT | No | HTTP bind port. | 8080 |
| MCP_TRANSPORT | No | Transport mode: `stdio` or `http`. | stdio (http in the image) |
| MCP_SERVER_NAME | No | Server name reported in `initialize`. | <profile>-sparql |
| SPARQL_ENDPOINT | No | Profile endpoint override; points a profile at a mirror. | |
| MCP_ALLOWED_HOSTS | No | Comma-separated `Host` values to accept (DNS-rebinding protection); empty accepts any host when bound to a public interface. | |
| MCP_ALLOWED_ORIGINS | No | Comma-separated browser origins to accept, used with MCP_ALLOWED_HOSTS. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Answers questions about AOP-Wiki RDF by querying its public SPARQL endpoint (https://aopwiki.rdf.bigcat-bioinformatics.org/sparql). Call get_schema_card once before your first query, resolve named entities with resolve_entity instead of guessing IRIs, look for a curated example with search_examples, then run_sparql. Quote the dataset release (in every response's source) with any count you report.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_schema_cardA | Return the AOP-Wiki RDF schema card: the named graphs and what each holds, the classes with instance counts, every predicate used on the main classes with usage counts and an example value, the known pitfalls of this dataset, and the prefixes. Call this once before writing your first SPARQL query in a conversation. Built from the live endpoint, so its counts are current. |
| resolve_entityA | Look up the real IRIs of AOP-Wiki RDF entities from a name or identifier. Call this before writing any query that mentions a specific entity; never build these IRIs by hand. Kinds:
|
| run_sparqlA | Run a read-only SPARQL 1.1 query against https://aopwiki.rdf.bigcat-bioinformatics.org/sparql and return the rows as JSON. Writes, Virtuoso extensions (DEFINE, bif:, sql:), SERVICE and unanchored full scans are rejected; a missing LIMIT becomes LIMIT 100 and the ceiling is 1000 rows. Known prefixes are added when you forget them. Errors, timeouts and empty results come back with advice on how to repair the query: read it and try again rather than giving up. Orientation: All content is in GRAPH http://aopwiki.org/. Entities are identifiers.org IRIs: AOPs https://identifiers.org/aop/N, KEs https://identifiers.org/aop.events/N, KERs https://identifiers.org/aop.relationships/N, stressors https://identifiers.org/aop.stressor/N. AOP structure: aopo:has_molecular_initiating_event, aopo:has_key_event, aopo:has_adverse_outcome, aopo:has_key_event_relationship; KERs use aopo:has_upstream_key_event / aopo:has_downstream_key_event. Several metadata predicates are opaque ontology IRIs (ncit:C25664 = level of biological organisation, ncit:C54571 = stressor, ncbitaxon:131567 = taxonomic applicability); the schema card lists them all. |
| search_examplesA | Search the curated example SPARQL queries that AOP-Wiki RDF publishes on its endpoint, by words describing what you want (e.g. 'pathways for a gene', 'count by species'). Returns ids and descriptions; fetch the full query with get_example. Adapting a curated example is faster and more reliable than writing a query from scratch. |
| get_exampleA | Return the full SPARQL text and description of one curated example, by the id that search_examples gave. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| ask_aopwiki | Answer a question about AOP-Wiki RDF by querying its SPARQL endpoint. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| schema-card | Named graphs, class and predicate counts, pitfalls and prefixes, built from the live endpoint. |
TDQS
Scored across 5 tools
Each tool occupies a distinct slot in a clear workflow: schema orientation (get_schema_card), entity IRI resolution (resolve_entity), execution (run_sparql), and example discovery/retrieval (search_examples vs get_example). The search/fetch pair is a well-understood pattern with non-overlapping roles. No tool can plausibly be mistaken for another.
All five names follow the same lower_snake_case verb_noun pattern: get_schema_card, resolve_entity, run_sparql, search_examples, get_example. The verbs are accurate and consistent (get_ for retrieval, search_ for discovery, run_ for execution). No style mixing.
Five tightly scoped tools for a read-only SPARQL endpoint is right-sized; each one maps to a real step an agent must take (orient, resolve IRIs, query, find examples). Nothing feels padded or absent for the stated scope.
The surface covers the full query lifecycle: schema discovery, entity resolution, example search/fetch, and execution with self-repairing error feedback. Minor gaps remain — no result pagination/continuation beyond the 1000-row ceiling and no standalone prefix or graph-listing helper (both only indirectly available via the schema card) — but agents can work around these with SPARQL itself.