sparql-llm
by sib-swiss·★ 108·Score 47
MCP server that helps LLMs generate and validate SPARQL queries for biological knowledge graphs.
Overview
SPARQL-LLM is a comprehensive solution that combines an MCP server, chat system, and reusable components to enhance LLM capabilities when generating SPARQL queries for biological databases. It exposes tools for retrieving relevant documents, class schemas, and executing SPARQL queries against endpoints like UniProt and Bgee. The system integrates Retrieval-Augmented Generation with SPARQL query validation through endpoint schemas to ensure accuracy in query generation on large-scale knowledge graphs.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this MCP server if you work with biological data endpoints and need LLM assistance generating validated SPARQL queries against knowledge graphs.
When NOT to choose this
Don't choose this if you're working with non-biological data endpoints, as it's specifically designed for SIB biodata resources like UniProt and Bgee.
Tools this server exposes
3 tools extracted from the READMEretrieve_relevant_documentsRetrieve relevant documents to help writing SPARQL queries for SIB biodata resources
retrieve_relevant_classes_schemaRetrieve relevant class schema to help writing SPARQL queries for SIB biodata resources
execute_sparql_queryExecute a SPARQL query against a specified endpoint
Comparable tools
Installation
Installation
pip install sparql-llmOr with uv:
uv add sparql-llmClaude Desktop Configuration
Add this to your mcp.json file:
{
"servers": {
"expasy-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"sparql-llm"
]
}
}
}Using HTTP Server
The public HTTP server is available at: https://chat.expasy.org/mcp
In your VSCode mcp.json:
{
"servers": {
"expasy-mcp-http": {
"url": "https://chat.expasy.org/mcp/",
"type": "http"
}
}
}FAQ
- What biological endpoints does this MCP server support?
- The server supports multiple SIB biodata resources including UniProt, Bgee, OMA, SwissLipids, and Cellosaurus through their SPARQL endpoints.
- How do I validate my SPARQL queries with this system?
- You can use the validation function that checks if predicates/types used are compliant with the VoID description in your target SPARQL endpoint. It supports federated queries and path patterns.
Compare sparql-llm with
Last updated · Auto-generated from public README + GitHub signals.