# Stuga MCP server

> Lets an AI client write, update, and query a self-hosted team wiki consisting of pages and tables with a built-in review workflow.

- Repository: https://github.com/stuga-dev/stuga
- Page: https://hostedmcp.org/servers/stuga-dev/stuga
- Transport: stdio, remote
- Stars: 6
- License: AGPL-3.0
- Latest version: 0.2.1

## Install

### Claude Code

```sh
claude mcp add --env 'STUGA_URL=<STUGA_URL>' stuga -- npx -y @stuga/mcp
```

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

```json
{
  "mcpServers": {
    "stuga": {
      "command": "npx",
      "args": [
        "-y",
        "@stuga/mcp"
      ],
      "env": {
        "STUGA_URL": "<STUGA_URL>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "stuga": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@stuga/mcp"
      ],
      "env": {
        "STUGA_URL": "<STUGA_URL>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"stuga","type":"stdio","command":"npx","args":["-y","@stuga/mcp"],"env":{"STUGA_URL":"<STUGA_URL>"}}'
```

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

```json
{
  "mcpServers": {
    "stuga": {
      "command": "npx",
      "args": [
        "-y",
        "@stuga/mcp"
      ],
      "env": {
        "STUGA_URL": "<STUGA_URL>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add stuga --env 'STUGA_URL=<STUGA_URL>' -- npx -y @stuga/mcp
```

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

```toml
[mcp_servers.stuga]
command = "npx"
args = ["-y", "@stuga/mcp"]

[mcp_servers.stuga.env]
STUGA_URL = "<STUGA_URL>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'STUGA_URL=<STUGA_URL>' stuga npx -- -y @stuga/mcp
```

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

```json
{
  "mcpServers": {
    "stuga": {
      "command": "npx",
      "args": [
        "-y",
        "@stuga/mcp"
      ],
      "env": {
        "STUGA_URL": "<STUGA_URL>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `STUGA_URL` | yes | no | The address you open Stuga at. |

## FAQ

### How does the AI update the wiki?

The AI finds the correct page, section, or table row to update and corrects existing sentences rather than just adding new ones.

### Does the server require its own AI key?

No, because each agent brings its own model, the node does not need an AI key.

### How can I import my existing notes?

You can import a Notion export or a zipped Obsidian vault/Markdown folder into a workspace.
