The Model Context Protocol (MCP) lets an AI assistant call tools on a server. This server gives the assistant read-only access to the StagePortal SPARQL endpoint: it writes the queries itself and answers from live data, not from what it remembers.
SPARQL against StagePortal is easy to get wrong: fields that look like Dublin Core are OMV here, metadata is split across named graphs, and a query against the wrong graph returns zero rows with no error. So the server does more than pass queries through. It gives the assistant:
Why not retrieval (RAG)? The data here is highly structured: typed records in named graphs, linked by a fixed set of predicates. Questions about it are answered by exact joins, filters and counts, which SPARQL computes and similarity search cannot. And the vocabulary that matters, about 200 predicates across 13 graphs, fits in the assistant's context: retrieval over something that already fits can only lose the predicate it needed. The mistakes that actually happen (invented predicates, the wrong graph, queries too expensive for the endpoint) are fixed by a complete predicate list, ontology lookup, guardrails and a repair loop.
Each one targets a mistake AI assistants commonly make on StagePortal.
Content
Size and the current version
Categories, groups and licenses
People and organizations
Projects
Missing data and failed versions
https://mcp.agroportal.eu/
claude mcp add --transport http agroportal https://mcp.agroportal.eu/
opencode mcp add agroportal --url https://mcp.agroportal.eu/
{
"servers": {
"agroportal": {
"type": "http",
"url": "https://mcp.agroportal.eu/"
}
}
}
get_schema_card
Every metadata graph with its predicates and usage counts, the graph layout, categories, groups and worked query patterns.
resolve_ontology
An ontology name or acronym → its IRI and the named graph holding its current content.
run_sparql
Read-only, guarded execution. Returns rows, or a failure with repair advice.
list_terms
The subject categories or groups, with their IRIs.