MCP server exposing SPARQL query functionalities for LLMs
claude mcp add mcp-sparql -- python -m mcp-sparql{
"mcpServers": {
"mcp-sparql": {
"command": "python",
"args": ["-m", "mcp-sparql"]
}
}
}MCP Servers overview
**mcp-sparql** — MCP server exposing SPARQL query functionalities for LLMs.
[](https://pypi.org/project/mcp-sparql/)
[](https://pypi.org/project/mcp-sparql/)
[](https://github.com/astral-sh/ruff)
mcp-name: io.github.daedalus/mcp-sparql
## Install
```bash
pip install mcp-sparql
```
## Usage
### As an MCP Server
Add to your MCP configuration (e.g., `~/.config/claude/mcp.json`):
```json
{
"mcpServers": {
"mcp-sparql": {
"command": "mcp-sparql"
}
}
}
```
### Available Tools
| Tool | Description |
|------|-------------|
| `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
**Query Wikidata:**
```
sparql_query:
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"
```
**Check if an entity exists:**
```
sparql_ask:
endpoint: "https://query.wikidata.org/sparql"
query: "ASK { wd:Q42 wdt:P31 wd:Q5 }"
```
**Validate a query:**
```
sparql_validate:
query: "SELECT ?s WHERE { ?s ?p ?o }"
```
**List named graphs:**
```
sparql_list_graphs:
endpoint: "https://query.wikidata.org/sparql"
```
**Get common prefixes:**
```
sparql_get_prefixes:
endpoint: "https://query.wikidata.org/sparql"
```
### Resources
| Resource | URI | Description |
|----------|-----|-------------|
| Common Prefixes | `sparql://common-prefixes` | Standard SPARQL namespace prefixes |
## API
### `sparql_query`
Execute a SPARQL SELECT query.
**Parameters:**
- `endpoint` (str): SPARQL endpoint URL
- `query` (str): SPARQL SELECT query
- `timeout` (int, default=30): Query timeout in seconds
- `output_format` (str, default="table"): "table" for Markdown, "json" for JSON
- `headers` (dict, optional): HTTP headers for authentication
- `max_rows` (int, default=1000): Maximum result rows
### `sparql_ask`
Execute a SPARQL ASK query. Returns "true" or "false".
### `sparql_construct`
Execute a SPARQL CONSTRUCT query. Returns RDF triples.
**Additional parameters:**
- `output_format` (str, default="turtle"): "turtle" or "json"
### `sparql_describe`
Execute a SPARQL DESCRIBE query. Returns RDF description.
### `sparql_validate`
Validate SPARQL query syntax without executing.
### `sparql_list_graphs`
List available named graphs on a SPARQL endpoint.
### `sparql_get_prefixes`
Get commonly used prefixes for a SPARQL endpoint.
## Development
```bash
git clone https://github.com/daedalus/mcp-sparql.git
cd mcp-sparql
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint + type check
prospector --with-tool ruff --with-tool mypy --with-tool pylint src/
```
What people ask about mcp-sparql
What is daedalus/mcp-sparql?
+
daedalus/mcp-sparql is mcp servers for the Claude AI ecosystem. MCP server exposing SPARQL query functionalities for LLMs It has 0 GitHub stars and was last updated today.
How do I install mcp-sparql?
+
You can install mcp-sparql by cloning the repository (https://github.com/daedalus/mcp-sparql) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is daedalus/mcp-sparql safe to use?
+
daedalus/mcp-sparql has not been audited yet by our security agent. Review the original repository on GitHub before using it in production.
Who maintains daedalus/mcp-sparql?
+
daedalus/mcp-sparql is maintained by daedalus. The last recorded GitHub activity is from today, with 0 open issues.
Are there alternatives to mcp-sparql?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy mcp-sparql to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/daedalus-mcp-sparql)<a href="https://claudewave.com/repo/daedalus-mcp-sparql"><img src="https://claudewave.com/api/badge/daedalus-mcp-sparql" alt="Featured on ClaudeWave: daedalus/mcp-sparql" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。