# ALTWEB Context Loader MCP server

> Loads signed and verifiable context capsules into AI agents while refusing unsigned or untrusted content to prevent context poisoning.

- Repository: https://github.com/danielsoimu/altweb
- Page: https://hostedmcp.org/servers/danielsoimu/altweb
- Transport: stdio
- Stars: 0
- License: AGPL-3.0
- Latest version: 1.1.2

## Install

### Claude Code

```sh
claude mcp add altweb -- npx -y altweb-context
```

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

```json
{
  "mcpServers": {
    "altweb": {
      "command": "npx",
      "args": [
        "-y",
        "altweb-context"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "altweb": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "altweb-context"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"altweb","type":"stdio","command":"npx","args":["-y","altweb-context"]}'
```

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

```json
{
  "mcpServers": {
    "altweb": {
      "command": "npx",
      "args": [
        "-y",
        "altweb-context"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add altweb -- npx -y altweb-context
```

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

```toml
[mcp_servers.altweb]
command = "npx"
args = ["-y", "altweb-context"]
```

### Gemini CLI

```sh
gemini mcp add -s user altweb npx -- -y altweb-context
```

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

```json
{
  "mcpServers": {
    "altweb": {
      "command": "npx",
      "args": [
        "-y",
        "altweb-context"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `ALTWEB_TRUST_FILE` | no | no | Override the local trust file of allowed signer public keys (default: ~/.altweb/trusted-keys.json). A missing or empty trust file refuses every capsule. |

## FAQ

### What is an ALTWEB capsule?

A capsule is a markdown file compiled into a single, self-contained .altweb.html file or URL that can be compressed, encrypted, and signed.

### How does the server handle untrusted context?

The server refuses to load any capsule that is unsigned, tampered with, or lacks a signer whose public key is in your local trust file.

### How do I trust a new signer?

You must add the signer's full public key to your local trusted-keys.json file.
