Lets AI clients load, query, and write RDF Linked Data and run SPARQL operations as composed JSON plans.
Auch bekannt als AtomGraph/Web-Algebra, web-algebra
- Stars
- 49
- Tools
- —
- Downloads, 30 Tage
- —
- Neueste Version
- 2.0.4
- Letzter Commit
- 3. Nov. 2026
- Lizenz
- Apache-2.0
Was ist Web-Algebra MCP?
Web-Algebra ist ein MCP server. Lets AI clients load, query, and write RDF Linked Data and run SPARQL operations as composed JSON plans.
Zusammenfassung generiert aus dem README des Projekts
Über Web-Algebra MCP server
Managing RDF Linked Data and SPARQL queries through natural language is what Web Algebra enables for developers working with semantic web technologies. This system allows AI agents to translate human instructions into optimized JSON bytecode, which executes complex workflows atomically rather than through a series of individual tool calls. It supports a wide range of operations including GET, POST, and PUT for Linked Data, as well as SELECT, CONSTRUCT, and DESCRIBE for SPARQL management.
Users can connect this server to AI clients like Claude Desktop using stdio or streamable HTTP transport. While many operations work independently, integration with LinkedDataHub requires a client certificate and password provided via environment variables. If an agent needs to generate specific SPARQL queries using the SPARQLString tool, an OpenAI API key must be configured. The system is designed to handle everything from simple URI manipulation and string operations to complex control flows like ForEach loops and filtering within semantic datasets.
Was du damit machen kannst
- 1Automated SPARQL query generationAsk an AI agent to write and execute a specific SPARQL query using natural language.
- 2Batch processing semantic dataInstruct an agent to iterate through a set of results and perform operations on each item.
- 3LinkedDataHub resource managementDirect an AI to create new items, containers, or views within a LinkedDataHub instance.
- 4Complex workflow compilationHave an AI agent compile a multi-step semantic workflow into a single executable JSON plan.
Geschrieben aus dem README des Projekts. Jeder Use Case wurde gegen ein Zitat daraus geprüft.
So installierst du Web-Algebra MCP
Formate geprüft am 10. Nov. 2026Web-Algebra MCP in Claude Code installieren
$ claude mcp add --env CERT_PASSWORD=<YOUR_CERT_PASSWORD> --env OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> web-algebra -- uvx web-algebraWeb-Algebra MCP in Cursor installieren
~/.cursor/mcp.json
{
"mcpServers": {
"web-algebra": {
"command": "uvx",
"args": [
"web-algebra"
],
"env": {
"CERT_PASSWORD": "<YOUR_CERT_PASSWORD>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}Web-Algebra MCP in VS Code installieren
.vscode/mcp.json
{
"servers": {
"web-algebra": {
"type": "stdio",
"command": "uvx",
"args": [
"web-algebra"
],
"env": {
"CERT_PASSWORD": "<YOUR_CERT_PASSWORD>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}Web-Algebra MCP in Claude Desktop installieren
claude_desktop_config.json
{
"mcpServers": {
"web-algebra": {
"command": "uvx",
"args": [
"web-algebra"
],
"env": {
"CERT_PASSWORD": "<YOUR_CERT_PASSWORD>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}Web-Algebra MCP in Codex installieren
~/.codex/config.toml
[mcp_servers.web-algebra] command = "uvx" args = ["web-algebra"] [mcp_servers.web-algebra.env] CERT_PASSWORD = "<YOUR_CERT_PASSWORD>" OPENAI_API_KEY = "<YOUR_OPENAI_API_KEY>"
Web-Algebra MCP in Gemini CLI installieren
~/.gemini/settings.json
{
"mcpServers": {
"web-algebra": {
"command": "uvx",
"args": [
"web-algebra"
],
"env": {
"CERT_PASSWORD": "<YOUR_CERT_PASSWORD>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}Konfiguration
CERT_PASSWORDSecretPassword of the client certificate
OPENAI_API_KEYSecretOpenAI API key, used by SPARQLString to write queries
CERT_PASSWORDCERT_PEM_PATHCERT_PEM_PATHPath to the LinkedDataHub client certificate (PEM), for authenticated requests
| Name | Beschreibung | Typ |
|---|---|---|
| CERT_PASSWORD | Password of the client certificate | Secret |
| OPENAI_API_KEY | OpenAI API key, used by SPARQLString to write queries | Secret |
| CERT_PASSWORD | — | |
| CERT_PEM_PATH | — | |
| CERT_PEM_PATH | Path to the LinkedDataHub client certificate (PEM), for authenticated requests |
Automatisierte Checks
Geluften am 13. Nov. 2026Vollständiger Bericht →Unsere automatisierten Checks bestanden. Das ist kein Security-Audit: Lies den Code und gib dem Server nur den minimal notwendigen Zugriff. Wie die Checks funktionieren
- Source Repository verknüpft und erreichbaratomgraph/web-algebra is public and reachablegithub.com/atomgraph/web-algebra ↗Bestanden
- Paket nennt dieses Repository als Quelleweb-algebra names atomgraph/web-algebra as sourcepypi.org/project/web-algebra/ ↗Bestanden
- Build-Herkunft (Sigstore-Attestierung)Sigstore attestation for web-algebrapypi.org/project/web-algebra/ ↗Bestanden
- Open Source Lizenz (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Bestanden
- Commit oder Release im letzten JahrLast commit or release 2026-11-03github.com/atomgraph/web-algebra ↗Bestanden
- OpenSSF ScorecardNicht geprüft
- Package-Name ähnelt keinem populären PackageNo popular package one edit away from web-algebraBestanden
- Kein kritischer Hinweis im Paket oder seinen Abhängigkeiten38 resolved dependencies checked; no critical advisoryosv.dev ↗Bestanden
- Keine versteckten Anweisungen an das Modell0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersBestanden
- Destruktive Tools sind markiertNicht geprüft
- Remote-Endpoint beantwortet den MCP-HandshakeNicht geprüft
README
Auf GitHub ansehenWeb-Algebra
A composable RDF operations system that translates natural language instructions into JSON-formatted domain-specific language operations for loading, querying, and writing RDF Linked Data.
Overview
This system implements generic operations for RDF Linked Data and SPARQL management, as well as some LinkedDataHub-specific operations. Operations can be consumed in two ways:
- Executable JSON format: Operations are composed into JSON structures and executed by the provided execution engine
- Model Context Protocol (MCP): Operations are exposed as tools for AI agents to use interactively
Instead of agents executing semantic workflows step-by-step through individual MCP tool calls, Web-Algebra enables agents to compile entire workflows into optimized JSON "bytecode" that executes atomically - enabling complex multi-operation compositions.
Demo
See WebAlgebra in action - translating natural language into RDF operations.
Architecture
The system is built around the Operation abstract base class that provides:
- Registry System: Auto-discovery of operations from
src/web_algebra/operations/ - JSON DSL: Operations use
@opkey withargsfor parameters, supporting nested operation calls - RDFLib Type System: Uses
URIRef,Literal,Graph, andResulttypes internally for proper RDF handling - Execution Engine: Both standalone execution and MCP server integration
- Context System: ForEach operations set row context for inner operations to access via
Value - URI Resolution: Proper semantic URI construction with
ResolveURIoperation
Key Components
- System Prompt: Complete operation definitions and JSON format specification
- Formal Semantics: Complete type system and operation catalog
- Operation Interface: Base class and JSON interpreter
- Operation Implementations: Directory containing all available operations
- Examples: Real-world plans over live Linked Data, each with its result and checks
Operations
The operations cover read-write Linked Data, SPARQL queries, URI manipulation, and LinkedDataHub-specific resource creation. Non-exhaustive list:
- Linked Data
GETPATCHPOSTPUT
- SPARQL
CONSTRUCTDESCRIBESELECTSubstituteValuesSPARQLString
- Schema
ExtractClassesExtractDatatypePropertiesExtractObjectPropertiesExtractOntology
- Reconciliation
Reconcile
- URI & String Operations
ResolveURIEncodeForURIConcatReplaceStrStrUUIDURI
- Date/Time
Now
- Control Flow & Variables
ValueVariableForEachIterateFilterBindingsCurrentPositionLastMerge
- LinkedDataHub-specific
ldh-CreateContainerldh-CreateItemldh-Listldh-AddFileldh-AddGenericServiceldh-AddResultSetChartldh-AddSelectldh-AddConstructldh-AddViewldh-AddObjectBlockldh-AddXHTMLBlockldh-RemoveBlockldh-GeneratePortalldh-GenerateClassContainersldh-GenerateOntologyViews
Usage
Pre-requisites
- Install uv
-
uv venv uv sync
Standalone
Natural language instruction
uv run python src/web_algebra/main.py
Then enter instruction, for example:
Select random 10 UK cities from DBpedia
See the instructions of the examples.
Currently requires OpenAI API access. OPENAI_API_KEY env value has to be set.
Execute JSON
uv run web-algebra --from-json ./examples/city-profiles/plan.json
See the examples: each has the instruction it answers, its plan, the result of a run, and checks.
With LinkedDataHub
- Run LinkedDataHub v6
- Give
web-algebrayour LDH's owner certificate and its password in theCERT_PEM_PATHandCERT_PASSWORDenvironment variables (or the--cert_pem_pathand--cert_passwordoptions, which override them). For example:
export CERT_PEM_PATH=../LinkedDataHub/ssl/owner/cert.pem
export CERT_PASSWORD="$(cat ../LinkedDataHub/secrets/owner_cert_password.txt)"
uv run web-algebra --from-json ./examples/northwind-category-catalogue/plan.json
Here and throughout this guide, the client certificate and its password are only required for authentication with LinkedDataHub. You don't need them if you're not using LinkedDataHub with Web Algebra.
As MCP server
Install
Requires uv. Add this to your MCP client configuration (e.g. claude_desktop_config.json):
{
"mcpServers": {
"web-algebra": {
"command": "uvx",
"args": ["--from", "web-algebra", "web-algebra-mcp"],
"env": {
"CERT_PEM_PATH": "/path/to/LinkedDataHub/ssl/owner/cert.pem",
"CERT_PASSWORD": "********"
}
}
}
}
or with Claude Code:
claude mcp add web-algebra -e CERT_PEM_PATH=/path/to/LinkedDataHub/ssl/owner/cert.pem -e CERT_PASSWORD=******** -- uvx --from web-algebra web-algebra-mcp
uvx web-algebra mcp runs the same server.
Environment variables:
| Name | Required | Description |
|---|---|---|
CERT_PEM_PATH |
No | Path to the LinkedDataHub owner certificate (PEM). Only needed for LinkedDataHub operations. |
CERT_PASSWORD |
No | Password for the certificate above. |
OPENAI_API_KEY |
No | OpenAI API key. Only needed for the SPARQLString tool, which asks a model to write the query. |
stdio transport
uv run web-algebra-mcp
Streamable HTTP transport
uv run uvicorn web_algebra.server:app --reload
with CERT_PEM_PATH and CERT_PASSWORD set, as above, for LinkedDataHub.
MCP Inspector config
You can the inspector like this:
npx @modelcontextprotocol/inspector
and then open on the URL printed in its console output, for example:
http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=b31e4b3d852b5a2445f45032c484e54e319bf16359585858cf88fe9a90816744
The MCP_PROXY_AUTH_TOKEN is required. If the link does not appear, you need to copy the session token from the console and paste it into inspector's Proxy Session Token config.
Web Algebra's settings:
Claude Desktop tool config from a local checkout
To run the MCP server from a local checkout instead of the published package, add a Web Algebra entry (that uses stdio transport) to the mcpServer configuration your claude_desktop_config.json file:
{
"mcpServers": {
"Web Algebra": {
"command": "uv",
"args": [
"--directory",
"/path/to/Web-Algebra",
"run",
"web-algebra-mcp"
],
"env": {
"CERT_PEM_PATH": "/path/to/LinkedDataHub/ssl/owner/cert.pem",
"CERT_PASSWORD": "********"
}
}
}
}
Leave the command as it is. Those uv run --with arguments are important, otherwise 3rd party packages cannot be found.
On my Mac, the path to uv has to be absolute, otherwise it doesn't work in Claude Desktop 🤷♂️.
CERT_PEM_PATH and CERT_PASSWORD env values are optional.
Web-Algebra MCP Fragen
Wie füge ich Web-Algebra MCP zu Claude Code hinzu?
Führe claude mcp add --env CERT_PASSWORD=<YOUR_CERT_PASSWORD> --env OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> web-algebra -- uvx web-algebra in deinem Terminal aus. Füge --scope user hinzu, damit der Server in jedem Projekt verfügbar ist.
Wie füge ich Web-Algebra MCP zu Cursor hinzu?
Öffne ~/.cursor/mcp.json und füge den Server unter mcpServers hinzu, mit der Cursor-Config aus dem Installationsabschnitt oben.
What operations does the Web-Algebra MCP server expose?
It exposes read-write Linked Data operations (GET, PATCH, POST, PUT), SPARQL operations (SELECT, CONSTRUCT, DESCRIBE), schema extraction, URI manipulation, control flow, and LinkedDataHub-specific resource creation tools.
How do I install the Web-Algebra MCP server?
Add it to your MCP client configuration with the uvx command, optionally setting CERT_PEM_PATH and CERT_PASSWORD for LinkedDataHub operations.
Does Web-Algebra require authentication?
A LinkedDataHub owner certificate and password are only needed for LinkedDataHub operations, and an OpenAI API key is only needed for the SPARQLString tool; otherwise the setup is optional.
Can Web-Algebra run predefined JSON plans?
Yes, you can execute a JSON plan file directly from the command line.
What transports does the MCP server support?
It supports stdio and Streamable HTTP transports.
