SPARQL LLM

v1.0.0โ€ขData Science & MLโ€ขstable

๐Ÿฆœโœจ Chat system, MCP server, and reusable components to improve LLMs capabilities when generating SPARQL queries

expasyllmmcpmcp-serversparql
Share:
109
Stars
0
Downloads
0
Weekly
0/5

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

SPARQL query generation
Semantic query building
Knowledge graph interaction
sib-swiss

Maintainer

LicenseMIT
Languagejupyter notebook
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx sparql-llm

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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"
    }
  }
}
2

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-llm
3

Create 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."
    }
  ]
}
4

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"
      }
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "sparql-llm": { "command": "npx", "args": ["-y", "sparql-llm"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide โ†’

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides