MCP Catalogs
Home

sparql-llm

by sib-swiss·108·Score 47

MCP server that helps LLMs generate and validate SPARQL queries for biological knowledge graphs.

ai-llmdeveloper-toolsknowledge-graph
18
Forks
3
Open issues
this month
Last commit
2d ago
Indexed

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:

you:Helping researchers write SPARQL queries to retrieve biological data from knowledge graphs
you:Validating SPARQL queries before execution against biological endpoints
you:Enabling LLM assistants to understand biological database schemas and query structures
you:What biological endpoints does this MCP server support?
you:How do I validate my SPARQL queries with this system?

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 README
  • retrieve_relevant_documents

    Retrieve relevant documents to help writing SPARQL queries for SIB biodata resources

  • retrieve_relevant_classes_schema

    Retrieve relevant class schema to help writing SPARQL queries for SIB biodata resources

  • execute_sparql_query

    Execute a SPARQL query against a specified endpoint

Comparable tools

graph-mcpsparql-mcpvoid-generator

Installation

Installation

pip install sparql-llm

Or with uv:

uv add sparql-llm

Claude 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.