Skip to main content
Glama
README.md
# Kanka MCP Tool

Local MCP tool for the Kanka worldbuilding API. Runs on your machine via stdio — no remote server needed.

## Prerequisites

- Node.js 20+.
- A Kanka API token (get one at [kanka.io/en/settings/api](https://kanka.io/en/settings/api)).

## Install

```bash
npm install
```

## Usage

### MCP client configuration (Claude Desktop, Cursor, etc.)

Add this to your MCP client config:

```json
{
  "mcpServers": {
    "kanka": {
      "command": "node",
      "args": ["<ABSOLUTE_PATH_TO_REPO>/index.js"],
      "env": {
        "KANKA_API_TOKEN": "<YOUR_KANKA_TOKEN>"
      }
    }
  }
}
```

Notes:
- Replace `<ABSOLUTE_PATH_TO_REPO>` with the full path to this repository.
- On Windows, prefer forward slashes (`C:/Users/...`) or escaped backslashes (`C:\\Users\\...`).
- Restart the MCP client after editing the config.

### Run directly

```bash
KANKA_API_TOKEN=your_token npm start
```

### Install globally

```bash
npm install -g .
KANKA_API_TOKEN=your_token kanka-mcp
```

## Available tools

The tool exposes 82 MCP tools for interacting with Kanka:

- **list_campaigns** — List all campaigns
- **search** — Search entities within a campaign
- For each entity type (Character, Location, Family, Organization, Item, Note, Event, Calendar, Timeline, Creature, Race, Quest, Map, Journal, Ability, Entity):
  - `list_<entities>` — List all
  - `get_<entity>` — Get details
  - `create_<entity>` — Create new
  - `update_<entity>` — Update existing
  - `delete_<entity>` — Delete existing

## Contributing

Community contributions are welcome.

- Read [CONTRIBUTING.md](CONTRIBUTING.md) for workflow, coding standards, and PR checklist.
- Review [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before participating.

### Local quality checks

```bash
npm run lint
npm run format:check
npm test
```

TDQS

C2.4/5.0

Scored across 77 tools

Disambiguation4/5

Each entity type has a clear list/get/create/update/delete set, so tools are mostly distinguishable by resource and action. The main confusion points are the organisations/organization spelling mismatch and campaigns having only list_campaigns, but there is no genuine functional overlap.

Naming Consistency4/5

Tool names follow a consistent list_plural/get_singular/create_singular/update_singular/delete_singular snake_case pattern across nearly all entities. Minor deviations like `list_organisations` vs `get_organization` and the bare `search` prevent a perfect score.

Tool Count2/5

77 tools is far beyond the typical well-scoped MCP surface and will impose a heavy context burden on agents. While the repetition is systematic, covering 15 entity types with full CRUD creates excessive bloat for what is ultimately a single domain.

Completeness4/5

The server covers full CRUD for most major Kanka entity types, which is strong domain coverage. The notable gap is campaigns: only list_campaigns exists, with no get/create/update/delete, and some secondary Kanka features like tags or relations are absent.

Maintenance

ActivityInactive
ResponsivenessNo issues