sparql-llm
Verified Safeby sib-swiss
Overview
An LLM-powered agent for generating, validating, and executing SPARQL queries against biomedical knowledge graphs, utilizing Retrieval-Augmented Generation (RAG) with endpoint-specific metadata and schema for improved accuracy.
Installation
docker compose upEnvironment Variables
- CHAT_API_KEY
- LOGS_API_KEY
- OPENAI_API_KEY
- OPENROUTER_API_KEY
- LANGFUSE_HOST
- LANGFUSE_PUBLIC_KEY
- LANGFUSE_SECRET_KEY
- VECTORDB_URL
- AZURE_INFERENCE_CREDENTIAL
- AZURE_INFERENCE_ENDPOINT
- SETTINGS_FILEPATH
Security Notes
The system employs several security measures, including `DOMPurify` for HTML sanitization in the frontend (preventing XSS), `validate_sparql_with_void` for checking generated SPARQL queries against known endpoint schemas (mitigating SPARQL injection), and environment variables for API key management. However, potential risks exist inherent to dynamic query generation and external API interactions. A sophisticated LLM jailbreak could theoretically influence the `endpoint_url` passed to `query_sparql` or craft malicious queries that bypass incomplete VoID schema validations, leading to SSRF or unintended data access on controlled endpoints. Logging of user questions and feedback (potentially sensitive information) is protected by an API key.
Similar Servers
flexible-graphrag
The Flexible GraphRAG MCP Server integrates document processing, knowledge graph building, hybrid search, and AI query capabilities via the Model Context Protocol (MCP) for clients like Claude Desktop and MCP Inspector.
mcp-local-rag
Local RAG server for developers enabling private, offline semantic search with keyword boosting on personal or project documents (PDF, DOCX, TXT, MD, HTML).
Web-Algebra
Translates natural language instructions into JSON-formatted domain-specific language operations for loading, querying, and writing RDF Linked Data, consumable by AI agents.
concept-rag
This MCP server provides conceptual search, document analysis, and library exploration capabilities over a knowledge base using LanceDB and LLM-based concept extraction.