← Back to search

io.github.daedalus/mcp-sparql

daedalus Scanned 18d ago

MCP server exposing SPARQL query functionalities for LLMs

B
89.4 / 100

Versions

0.1.0latest
first seen Jun 30, 2026
PermissionsTool SafetyAuthAnnotationsCode QualityStabilitySpecVuln HistoryAuthorTransparencyCommunity

Tools 7

sparql_query
annotations: none low

Execute a SPARQL SELECT query against a SPARQL endpoint. Runs a SELECT query and returns results as a Markdown table or JSON array. Supports custom HTTP headers for authenticated endpoints. For long-running queries (large datasets, complex joins), increase the timeout parameter — default is 30s, maximum is 3600s (1 hour). Args: params: Query parameters including endpoint URL, SPARQL query, timeout, output format, optional headers, and max rows limit. Returns: Query results formatted as a Markdown table or JSON string. Examples: >>> # Query Wikidata for items >>> sparql_query(SparqlQueryInput( ... endpoint="https://query.wikidata.org/sparql", ... query="SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q5 . ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = 'en') } LIMIT 5" ... )) "| `item` | `itemLabel` | | --- | --- | | `http://www.wikidata.org/entity/Q5` | `human` | ..." >>> # Query with authentication >>> sparql_query(SparqlQueryInput( ... endpoint="https://my-endpoint.example.com/sparql", ... query="SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 10", ... headers={"Authorization": "Bearer my-token"} ... ))

params SparqlQueryInput
sparql_ask
annotations: none low

Execute a SPARQL ASK query and return a boolean result. ASK queries test whether a pattern exists in the data, returning true or false. Args: params: Query parameters including endpoint URL, SPARQL ASK query, timeout, and optional headers. Returns: "true" if the pattern exists, "false" otherwise. Examples: >>> # Check if a specific item exists >>> sparql_ask(SparqlAskInput( ... endpoint="https://query.wikidata.org/sparql", ... query="ASK { wd:Q42 wdt:P31 wd:Q5 }" ... )) "true" >>> # Check if a relationship exists >>> sparql_ask(SparqlAskInput( ... endpoint="https://query.wikidata.org/sparql", ... query="ASK { wd:Q42 wdt:P27 wd:Q142 }" ... )) "true"

params SparqlAskInput
sparql_construct
annotations: none low

Execute a SPARQL CONSTRUCT query and return RDF triples. CONSTRUCT queries build an RDF graph from a template pattern. Results are returned as Turtle RDF or JSON-LD. For large-scale graph construction, increase the timeout parameter — default is 30s, maximum is 3600s (1 hour). Args: params: Query parameters including endpoint URL, SPARQL CONSTRUCT query, timeout, output format, optional headers, and max rows limit. Returns: RDF triples formatted as Turtle or JSON. Examples: >>> # Construct a subgraph >>> sparql_construct(SparqlConstructInput( ... endpoint="https://query.wikidata.org/sparql", ... query="CONSTRUCT { wd:Q42 rdfs:label ?name } WHERE { wd:Q42 rdfs:label ?name . FILTER(LANG(?name) = 'en') }" ... )) "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n..."

params SparqlConstructInput
sparql_describe
annotations: none low

Execute a SPARQL DESCRIBE query and return an RDF resource description. DESCRIBE queries return an RDF graph describing the specified resource(s). For resources with many properties, increase the timeout parameter — default is 30s, maximum is 3600s (1 hour). Args: params: Query parameters including endpoint URL, SPARQL DESCRIBE query, timeout, output format, optional headers, and max rows limit. Returns: RDF description formatted as Turtle or JSON. Examples: >>> # Describe a Wikidata entity >>> sparql_describe(SparqlDescribeInput( ... endpoint="https://query.wikidata.org/sparql", ... query="DESCRIBE wd:Q42" ... )) "@prefix ...> .\n<...> ..."

params SparqlDescribeInput
sparql_validate
annotations: none low

Validate SPARQL query syntax without executing it. Parses the query and reports whether it is syntactically valid. Useful for debugging query errors before running them against an endpoint. Args: params: Validation parameters containing the SPARQL query string. Returns: Validation result with status and error details if invalid. Examples: >>> # Valid query >>> sparql_validate(SparqlValidateInput(query="SELECT ?s WHERE { ?s ?p ?o }")) "Valid SPARQL query." >>> # Invalid query >>> sparql_validate(SparqlValidateInput(query="SELECT WHERE { }")) "Invalid SPARQL query: ..."

params SparqlValidateInput
sparql_list_graphs
annotations: none low

List available named graphs on a SPARQL endpoint. Queries the endpoint for all named graphs (contexts) available for querying. Args: params: Parameters including endpoint URL, timeout, and optional headers. Returns: List of named graph URIs. Examples: >>> sparql_list_graphs(SparqlListGraphsInput( ... endpoint="https://query.wikidata.org/sparql" ... )) "Found 3 named graphs:\n1. http://example.org/graph1\n..."

params SparqlListGraphsInput
sparql_get_prefixes
annotations: none low

Get commonly used prefixes for a SPARQL endpoint. Returns a combination of well-known standard prefixes (rdf, rdfs, owl, xsd, etc.) and any endpoint-specific prefixes discovered via the data. Args: params: Parameters including endpoint URL, timeout, and optional headers. Returns: Formatted list of prefix declarations for use in SPARQL queries. Examples: >>> sparql_get_prefixes(SparqlGetPrefixesInput( ... endpoint="https://query.wikidata.org/sparql" ... )) "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n..."

params SparqlGetPrefixesInput

Permissions 2

network medium
Server uses network capabilities via: httpx
filesystem low
Server uses filesystem capabilities via: os, pathlib, shutil

Scan Findings 21

low
Tool 'sparql_query' has no annotations annotation_checker · 100%
low
Tool 'sparql_ask' has no annotations annotation_checker · 100%
low
Tool 'sparql_construct' has no annotations annotation_checker · 100%
low
Tool 'sparql_describe' has no annotations annotation_checker · 100%
low
Tool 'sparql_validate' has no annotations annotation_checker · 100%
low
Tool 'sparql_list_graphs' has no annotations annotation_checker · 100%
low
Tool 'sparql_get_prefixes' has no annotations annotation_checker · 100%
info
Sandbox failed to start for behavioral verification behavioral_verifier · 100%
info
pyproject.toml metadata manifest_parser · 100%
info
Tool: sparql_get_prefixes manifest_parser · 90%
info
Sandbox failed to start for output poisoning scan output_poisoning · 100%
info
Tool: sparql_query manifest_parser · 90%
info
Tool: sparql_ask manifest_parser · 90%
info
Tool: sparql_construct manifest_parser · 90%
info
Tool: sparql_describe manifest_parser · 90%
info
Tool: sparql_validate manifest_parser · 90%
info
Tool: sparql_list_graphs manifest_parser · 90%
medium
Permission: network access detected permission_analyzer · 90%
low
Permission: filesystem access detected permission_analyzer · 90%
info
No dependency files found for SBOM generation sbom_generator · 100%
medium
No build provenance detected (SLSA L0) slsa_assessor · 90%