GETLABSCO SUMMARY
The unit of work is a program, not a tool call.
Most RDF servers make the agent step through query, read, decide, write — paying a round trip each time. Here ForEach and Filter live inside the JSON, so a SELECT can feed a loop that creates a resource per row in a single execution. The trade is that the agent has to get the whole program right before anything runs.
What it is
A composable operation system for Linked Data and SPARQL, exposed both as MCP tools and as a JSON DSL that nests operations inside each other.
What you get
- Linked Data verbs over HTTP — GET, PUT, POST and PATCH against RDF resources
- SPARQL operations — SELECT, CONSTRUCT and DESCRIBE, plus Substitute, Values and SPARQLString for building queries programmatically
- Schema extraction — ExtractClasses, ExtractDatatypeProperties, ExtractObjectProperties and ExtractOntology
- URI and string handling — ResolveURI, EncodeForURI, Concat, Replace, Str, STRUUID and URI
- Control flow inside the program — ForEach, Filter, Bindings, Current, Variable, Value, Merge and Execute, so a result set can drive the next step without a round trip
- LinkedDataHub operations such as ldh-CreateContainer, ldh-CreateItem, ldh-AddFile, ldh-AddSelect, ldh-AddResultSetChart and ldh-GeneratePortal
Requirements
uv, then uv venv and uv sync. Run it over stdio with uv run python -m web_algebra, or over Streamable HTTP with uvicorn at http://127.0.0.1:8000/mcp. Nothing is required for plain RDF work; OPENAI_API_KEY is needed only for the natural-language entry point, and CERT_PEM_PATH with CERT_PASSWORD only when authenticating to LinkedDataHub.
Setup effort
Build from source — git clone https://github.com/AtomGraph/Web-Algebra
USE CASES
Running a SPARQL query against a public endpoint
Compose the query with Substitute and Values, run the SELECT, and read the bindings back.
Creating one resource per row of a result set
Wrap the creation step in ForEach over the query results — the whole loop executes as one program.
Working out what a dataset actually contains
Pull the classes and the datatype and object properties out of the data, or extract the ontology whole.
Writing changes back to a Linked Data resource
PUT or PATCH the resource over HTTP, with URIs built by ResolveURI rather than string-concatenated by hand.
Building out a LinkedDataHub site
Create containers and items, attach files, and add selects, views and charts from the same program.
43 tools
Listed in project docs. Your client may show a different list.
PATCHPOSTPUTCONSTRUCTDESCRIBESELECTSubstituteValuesSPARQLStringExtractClassesExtractDatatypePropertiesExtractObjectPropertiesExtractOntologyResolveURIEncodeForURIConcatReplaceStrSTRUUIDURIValueVariableForEachFilterBindingsCurrentExecuteMergeldh-CreateContainerldh-CreateItemldh-Listldh-AddFileldh-AddGenericServiceldh-AddResultSetChartldh-AddSelectldh-AddViewldh-AddObjectBlockldh-AddXHTMLBlockldh-RemoveBlockldh-GeneratePortalldh-GenerateClassContainersldh-GenerateOntologyViewsBEFORE YOU INSTALL
What to know first
Tools you get
43 tools named in the project's documentation.
Requires
- Python 3.10+
- uv on PATH
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/AtomGraph/Web-Algebra
cd Web-Algebra
uv venv
uv syncMCP Clients
Claude Desktop
Point --directory at the src folder of your clone. The README notes the path to uv may need to be absolute in Claude Desktop, and that CERT_PEM_PATH and CERT_PASSWORD are optional env values, needed only to authenticate to LinkedDataHub.
{
"mcpServers": {
"Web Algebra": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_WEB_ALGEBRA>/src",
"run",
"--with",
"mcp[cli]",
"--with",
"rdflib",
"--with",
"openai",
"python",
"-m",
"web_algebra"
]
}
}
}MCP Inspector
git clone https://github.com/AtomGraph/Web-Algebra
cd Web-Algebra
uv venv
uv syncStart the server over Streamable HTTP:
uv run uvicorn web_algebra.server:app --reloadIn a second terminal, start the inspector:
npx @modelcontextprotocol/inspectorOpen the URL the inspector prints, set Transport Type to Streamable HTTP and URL to http://127.0.0.1:8000/mcp.