MCP Server

MCP server exposing SPARQL query functionalities for LLMs

Local serverstdio

What is the MCP MCP server?

MCP MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. MCP server exposing SPARQL query functionalities for LLMs.

What you get

Add to your MCP configuration (e.g., ~/.config/claude/mcp.json):

What the assistant can call

Once MCP is connected, these are the calls the assistant has available:

  • sparql_query — Execute SPARQL SELECT queries (table or JSON output)
  • sparql_ask — Execute SPARQL ASK queries (boolean result)
  • sparql_construct — Execute SPARQL CONSTRUCT queries (Turtle or JSON-LD)
  • sparql_describe — Execute SPARQL DESCRIBE queries (Turtle or JSON-LD)
  • sparql_validate — Validate SPARQL query syntax without executing
  • sparql_list_graphs — List named graphs on a SPARQL endpoint
  • sparql_get_prefixes — Get common prefixes for a SPARQL endpoint
  • Examples — The Examples tool exposed by this server
  • Resources — The Resources tool exposed by this server

Setting it up

Installation goes through your MCP client rather than a global install: point it at mcp-sparql on PyPI and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Choosing this one

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MCP's toolset — sparql_query, sparql_ask, sparql_construct and 6 more — is a fair guide to whether it matches your workflow. It is maintained by daedalus; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 9 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch MCP.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
sparql_queryExecute SPARQL SELECT queries (table or JSON output)
sparql_askExecute SPARQL ASK queries (boolean result)
sparql_constructExecute SPARQL CONSTRUCT queries (Turtle or JSON-LD)
sparql_describeExecute SPARQL DESCRIBE queries (Turtle or JSON-LD)
sparql_validateValidate SPARQL query syntax without executing
sparql_list_graphsList named graphs on a SPARQL endpoint
sparql_get_prefixesGet common prefixes for a SPARQL endpoint
ExamplesThe Examples tool exposed by this server.
ResourcesThe Resources tool exposed by this server.

How to install the MCP MCP server

{
  "mcpServers": {
    "sparql": {
      "command": "uvx",
      "args": ["mcp-sparql"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use MCP to sparql query.
  • Use MCP to sparql ask.
  • Use MCP to sparql construct.

Frequently asked questions

It connects MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 9 tools (sparql_query, sparql_ask, sparql_construct, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP directly.