SPARQL LLM
๐ฆโจ Chat system, MCP server, and reusable components to improve LLMs capabilities when generating SPARQL queries
What is SPARQL LLM?
SPARQL LLM is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐ฆโจ chat system, mcp server, and reusable components to improve llms capabilities when generating sparql queries
๐ฆโจ Chat system, MCP server, and reusable components to improve LLMs capabilities when generating SPARQL queries
This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- ๐ฆโจ Chat system, MCP server, and reusable components to impro
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx sparql-llmConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use SPARQL LLM
SPARQL LLM is an MCP server and Python toolkit from the SIB Swiss Institute of Bioinformatics that dramatically improves LLM accuracy when generating SPARQL queries against biomedical knowledge graphs. It exposes tools to retrieve relevant query examples and class schemas from endpoints like UniProt, Bgee, OMA, SwissLipids, and Cellosaurus, and to execute validated SPARQL queries directly. A publicly hosted MCP endpoint is available at chat.expasy.org/mcp, making it immediately usable without any local setup; it also supports local stdio deployment via uvx with configurable endpoint lists.
Prerequisites
- Python 3.10 or higher (for local stdio deployment via uvx)
- uv or pip package manager (uvx is part of uv)
- An MCP-compatible client: Claude Desktop, GitHub Copilot in VSCode, or any Streamable HTTP MCP client
- Familiarity with SPARQL query language is helpful but not required
Option A: Connect to the public hosted server (no installation needed)
The easiest approach is to point your MCP client at the publicly hosted Streamable HTTP endpoint. No API key, no local install โ just add the URL to your client configuration.
{
"servers": {
"expasy-mcp-http": {
"url": "https://chat.expasy.org/mcp/",
"type": "http"
}
}
}Option B: Install the sparql-llm package locally
For local stdio deployment โ for example when you want to point at your own SPARQL endpoints โ install sparql-llm via pip or uv.
pip install sparql-llm
# or with uv:
uv add sparql-llmCreate a settings file for your endpoints (local deployment only)
If you are using your own SPARQL endpoints, create a JSON settings file that lists them. The SETTINGS_FILEPATH environment variable tells the server where to find this file.
{
"app_org": "My Organization",
"app_topics": "proteins, genes, and chemical compounds",
"endpoints": [
{
"label": "UniProt",
"endpoint_url": "https://sparql.uniprot.org/sparql/",
"description": "UniProt protein sequence and annotation data."
}
]
}Configure your MCP client for stdio transport (local deployment)
Add the sparql-llm server to your client configuration using uvx as the command. Set SETTINGS_FILEPATH to the absolute path of the JSON settings file you created.
{
"servers": {
"expasy-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["sparql-llm"],
"env": {
"SETTINGS_FILEPATH": "/Users/you/sparql-mcp.json"
}
}
}
}Verify tools are available
Ask your AI client to list available MCP tools. You should see tools for retrieving relevant documents, retrieving class schemas, and executing SPARQL queries against configured endpoints.
SPARQL LLM Examples
Client configuration using the public HTTP endpoint (VSCode mcp.json)
Connect GitHub Copilot or any HTTP-capable MCP client to the public SIB expasy server with no local setup required.
{
"servers": {
"expasy-mcp-http": {
"url": "https://chat.expasy.org/mcp/",
"type": "http"
}
}
}Prompts to try
Use these prompts in your AI client to generate and execute SPARQL queries against biomedical knowledge graphs.
- "Find all human proteins related to Alzheimer's disease in UniProt"
- "Query UniProt for proteins with signal peptides and return their accession numbers"
- "What genes are expressed in the human brain according to Bgee?"
- "Write and run a SPARQL query to list cell lines from Cellosaurus that are derived from breast cancer tissue"
- "Help me write a federated SPARQL query that joins UniProt protein data with Bgee expression data"Troubleshooting SPARQL LLM
uvx sparql-llm fails with 'module not found' or package errors
Ensure you are using Python 3.10 or higher and that uv is installed (pip install uv). Run uvx --python 3.11 sparql-llm if your default Python is older. Alternatively install with pip install sparql-llm and run python -m sparql_llm.server.
SPARQL queries return no results or endpoint connection errors
Verify your settings JSON contains correct endpoint URLs and that the endpoints are publicly accessible from your machine. The public SIB endpoints (UniProt, Bgee) may be temporarily unavailable โ check their status pages. For custom endpoints, ensure VoID descriptions and SPARQL examples are loaded.
The public hosted MCP endpoint at chat.expasy.org/mcp is unreachable
The hosted server may be under maintenance. Fall back to local stdio deployment using uvx sparql-llm with the default SIB endpoint list, or check the sib-swiss/sparql-llm GitHub repository for status updates.
Frequently Asked Questions about SPARQL LLM
What is SPARQL LLM?
SPARQL LLM is a Model Context Protocol (MCP) server that ๐ฆโจ chat system, mcp server, and reusable components to improve llms capabilities when generating sparql queries It connects AI assistants to external tools and data sources through a standardized interface.
How do I install SPARQL LLM?
Follow the installation instructions on the SPARQL LLM GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with SPARQL LLM?
SPARQL LLM works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is SPARQL LLM free to use?
Yes, SPARQL LLM is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
SPARQL LLM Alternatives โ Similar Data Science & ML Servers
Looking for alternatives to SPARQL LLM? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
โ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
โ 3.1k๐ ๐ - MCP server that exposes RocketRide AI pipelines as t
Aix Db
โ 2.1kAix-DB ๅบไบ LangChain/LangGraph ๆกๆถ๏ผ็ปๅ MCP Skills ๅคๆบ่ฝไฝๅไฝๆถๆ๏ผๅฎ็ฐ่ช็ถ่ฏญ่จๅฐๆฐๆฎๆดๅฏ็็ซฏๅฐ็ซฏ่ฝฌๆขใ
NeMo Data Designer
โ 1.9k๐จ NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
โ 1.7kOpen source implementation and extension of Google Researchโs PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
โ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
Browse More Data Science & ML MCP Servers
Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up SPARQL LLM in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use SPARQL LLM?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.