A Model Context Protocol (MCP) server that provides tools for querying SPARQL endpoints.
Example usage for querying a single SPARQL endpoint or multiple endpoints defined in a configuration file.
"mcpServers": {
"mcp-server-sparql": {
"command": "uvx",
"args": ["mcp-server-sparql", "--endpoint", "https://query.wikidata.org/sparql"],
}
}To load multiple endpoints from a configuration file:
"mcpServers": {
"mcp-server-sparql": {
"command": "uvx",
"args": ["mcp-server-sparql", "--config", "config.json"],
}
}Execute a SPARQL query against the configured endpoint.
Parameters:
query_string: A valid SPARQL query string
Returns:
- The query results in JSON format
For configuring multiple endpoints see docs/config.md.