# Web-Algebra MCP server

> Lets AI clients load, query, and write RDF Linked Data and run SPARQL operations as composed JSON plans.

- Repository: https://github.com/AtomGraph/Web-Algebra
- Page: https://hostedmcp.org/servers/atomgraph/web-algebra
- Transport: stdio
- Stars: 49
- License: Apache-2.0
- Latest version: 2.0.4

## Install

### Claude Code

```sh
claude mcp add --env CERT_PASSWORD=<YOUR_CERT_PASSWORD> --env OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> web-algebra -- uvx web-algebra
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "web-algebra": {
      "command": "uvx",
      "args": [
        "web-algebra"
      ],
      "env": {
        "CERT_PASSWORD": "<YOUR_CERT_PASSWORD>",
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "web-algebra": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "web-algebra"
      ],
      "env": {
        "CERT_PASSWORD": "<YOUR_CERT_PASSWORD>",
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "web-algebra": {
      "command": "uvx",
      "args": [
        "web-algebra"
      ],
      "env": {
        "CERT_PASSWORD": "<YOUR_CERT_PASSWORD>",
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
      }
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```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>"
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "web-algebra": {
      "command": "uvx",
      "args": [
        "web-algebra"
      ],
      "env": {
        "CERT_PASSWORD": "<YOUR_CERT_PASSWORD>",
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CERT_PASSWORD` | no | yes | Password of the client certificate |
| `OPENAI_API_KEY` | no | yes | OpenAI API key, used by SPARQLString to write queries |
| `CERT_PASSWORD` | no | no |  |
| `CERT_PEM_PATH` | no | no |  |
| `CERT_PEM_PATH` | no | no | Path to the LinkedDataHub client certificate (PEM), for authenticated requests |

## FAQ

### 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.
