# Web Algebra

Web Algebra lets an agent compose RDF and SPARQL operations into JSON plans. Use it to query or update Linked Data and build workflows for LinkedDataHub.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 46
- Author: AtomGraph
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/AtomGraph/Web-Algebra
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/web-algebra

## What it does

The server exposes operations for reading and writing Linked Data, querying SPARQL, and handling URIs. An agent can combine several operations in a JSON plan and run them as one workflow. LinkedDataHub-specific operations include creating resources and views.

You need `uv` to run the server. `OPENAI_API_KEY` is required for `SPARQLString`, which asks a model to write a query; LinkedDataHub operations require the owner certificate and its password. Those credentials are only relevant when using LinkedDataHub.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `CERT_PEM_PATH`, `CERT_PASSWORD`, `OPENAI_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env CERT_PEM_PATH=<CERT_PEM_PATH> --env CERT_PASSWORD=<CERT_PASSWORD> --env OPENAI_API_KEY=<OPENAI_API_KEY> --transport stdio web-algebra -- uvx web-algebra
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from web-algebra <command>

### Codex

**Platform CLI**
```bash
codex mcp add web-algebra --env CERT_PEM_PATH=<CERT_PEM_PATH> --env CERT_PASSWORD=<CERT_PASSWORD> --env OPENAI_API_KEY=<OPENAI_API_KEY> -- uvx web-algebra
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from web-algebra <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "web-algebra": {
            "command": "uvx",
            "args": [
                "web-algebra"
            ],
            "env": {
                "CERT_PEM_PATH": "<CERT_PEM_PATH>",
                "CERT_PASSWORD": "<CERT_PASSWORD>",
                "OPENAI_API_KEY": "<OPENAI_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from web-algebra <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "web-algebra": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "web-algebra"
            ],
            "env": {
                "CERT_PEM_PATH": "<CERT_PEM_PATH>",
                "CERT_PASSWORD": "<CERT_PASSWORD>",
                "OPENAI_API_KEY": "<OPENAI_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from web-algebra <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e CERT_PEM_PATH=<CERT_PEM_PATH> -e CERT_PASSWORD=<CERT_PASSWORD> -e OPENAI_API_KEY=<OPENAI_API_KEY> web-algebra uvx web-algebra
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from web-algebra <command>

## When to use it
- turn a natural-language request into a SPARQL query
- read or modify RDF Linked Data
- combine multiple data operations in one JSON plan
- create a resource or view in LinkedDataHub

## Example prompts
- Find some UK cities in Linked Data and return a random selection.
- Write a SPARQL query that retrieves the classes and properties in this schema.
- Create a container in LinkedDataHub and add an item to it.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
