# Azgaarnoth MCP Server
An MCP (Model Context Protocol) server that provides AI assistants with tools to query the Azgaarnoth D&D world repository (~4,200 markdown files).
## Installation
```bash
pnpm install
```
## Usage
### Run the MCP server
```bash
pnpm mcp
```
### Add to Claude Desktop
Command Line:
```bash
claude mcp add azgaarnoth -- pnpm --dir ~/path/to/azgaarnoth-mcp mcp
```
## Available Tools
| Tool | Description |
|------|-------------|
| `search_world` | Full-text search across all Azgaarnoth content |
| `get_document` | Retrieve a specific document by path or name |
| `browse_category` | List all items in a category (races, classes, nations, etc.) |
| `get_stat_block` | Get D&D creature stat blocks |
| `get_spell` | Get spell information |
| `get_related` | Find related documents via links/backlinks |
| `explore_region` | Get nation/city info with political relations |
| `index_status` | Check index statistics |
## Categories
- `races` - Playable races and subraces
- `classes` - Character classes and subclasses
- `feats` - Character feats
- `nations` - Political entities
- `geography` - Geographical regions
- `cities` - Major cities
- `organizations` - Mage schools, mercenary companies, guilds
- `creatures` - Monsters with stat blocks
- `magic` - Spells, items, runes, tattoos
- `people` - Named NPCs
- `religions` - Pantheons and faiths
- `history` - Timeline and historical events
- `conditions` - Game conditions
- `cultures` - Cultural backgrounds
- `equipment` - Armor, weapons, tools
## Configuration
The repository path is configured in `src/mcp/server.ts`:
```typescript
const REPO_PATH = '~/path/to/Azgaarnoth'
```