# ya-wiki-mcp

MCP server for Yandex Wiki API. Works with Claude Code, Claude Desktop, and any MCP client.

## Quick Start

```bash
# Add to Claude Code
claude mcp add ya-wiki -e YA_WIKI_TOKEN=your-token -e YA_WIKI_ORG_ID=your-org-id -- uvx ya-wiki-mcp

# Or install and run manually
uvx ya-wiki-mcp
```

## Features

- **27 tools** — full CRUD for pages, grids (dynamic tables), resources
- **YFM syntax** — built-in Yandex Flavored Markdown reference
- **Markdown → YFM converter** — auto-converts standard Markdown to Wiki format
- **Prompt templates** — manage reusable page templates from chat

## Configuration

| Variable | Required | Description |
|----------|----------|-------------|
| `YA_WIKI_TOKEN` | Yes | OAuth token from https://oauth.yandex.ru/ |
| `YA_WIKI_ORG_ID` | Yes | Organization ID |
| `YA_WIKI_ORG_TYPE` | No | `cloud` (default) or `business` |

Create a `.env` file or pass via `-e` flags.

## Tools

### Pages
`get_page`, `get_page_content`, `create_page`, `update_page`, `delete_page`, `clone_page`, `append_content`

### Resources
`get_page_resources`, `get_page_grids`

### Grids (Dynamic Tables)
`create_grid`, `get_grid`, `update_grid`, `delete_grid`, `add_rows`, `delete_rows`, `add_columns`, `delete_columns`, `update_cells`, `move_rows`, `move_columns`, `clone_grid`

### Utilities
`convert_md_to_yfm` — converts Markdown tables, callouts, details to YFM

### Prompt Manager
`prompts_list`, `prompts_get`, `prompts_add`, `prompts_add_from_file`, `prompts_remove`

## License

MIT
