Skip to main content

MCP server for Yandex Wiki - provides access to corporate wiki pages via Model Context Protocol

Project description

Yandex Wiki MCP Server

MCP (Model Context Protocol) server for accessing Yandex Wiki pages from AI assistants like Claude.

Features

  • page_get: Fetch wiki page content and metadata by slug (path)
  • page_get_url: Get web URL for a wiki page

Installation

Using uv (recommended)

uv run --directory /path/to/yandex-wiki-mcp yandex-wiki-mcp

Development setup

cd /path/to/yandex-wiki-mcp
uv sync
uv run yandex-wiki-mcp

Configuration

Environment Variables

Variable Required Description
WIKI_TOKEN Yes* Yandex OAuth token for Wiki API
TRACKER_TOKEN Yes* Fallback: Yandex OAuth token (same as Tracker)
WIKI_ORG_ID Yes* Yandex organization ID
TRACKER_ORG_ID Yes* Fallback: Yandex organization ID
WIKI_API_BASE_URL No API base URL (default: https://api.wiki.yandex.net/v1)
WIKI_WEB_BASE_URL No Web interface URL (default: https://wiki.yandex.ru)
REQUEST_TIMEOUT No Request timeout in seconds (default: 30)

*At least one token (WIKI_TOKEN or TRACKER_TOKEN) and one org ID (WIKI_ORG_ID or TRACKER_ORG_ID) must be set.

Token Fallback

The server supports token fallback for environments where Tracker is already configured:

  1. WIKI_TOKEN (highest priority)
  2. TRACKER_TOKEN (fallback)

Same applies for organization ID:

  1. WIKI_ORG_ID (highest priority)
  2. TRACKER_ORG_ID (fallback)

Getting an OAuth Token

  1. Go to https://oauth.yandex.ru/
  2. Click "Create app"
  3. Select "For API access or debugging"
  4. Enter app name and contact email
  5. Grant necessary permissions for Wiki access
  6. Copy the generated token

Finding Organization ID

  1. Open Yandex Tracker
  2. Go to Admin settings -> Organizations
  3. Copy the ID field value

MCP Configuration

Add to your Claude MCP configuration (~/.claude/mcp.json or project's .mcp.json):

{
  "mcpServers": {
    "yandex-wiki": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "--directory", "/path/to/yandex-wiki-mcp", "yandex-wiki-mcp"],
      "env": {
        "TRACKER_TOKEN": "${TRACKER_TOKEN}",
        "TRACKER_ORG_ID": "your-org-id"
      }
    }
  }
}

Usage Examples

Fetch a page

Use page_get with slug "teams/dev/onboarding"

Get page URL

Use page_get_url with slug "teams/dev/docs"

API Limitations

No Automatic Redirects

Yandex Wiki API does not follow redirects automatically. If a page has been moved and redirects to another location, the API will return a 404 error.

To handle this:

  1. Check the exact page path in the Yandex Wiki web interface
  2. Use the final destination path, not the redirect source

Permission-based Access

API requests carry the same access permissions as the authenticated user. If the user cannot access a page in the web interface, the API will also deny access.

Development

Project Structure

yandex-wiki-mcp/
├── mcp_wiki/
│   ├── __init__.py
│   ├── __main__.py
│   ├── settings.py
│   ├── mcp/
│   │   ├── __init__.py
│   │   ├── server.py
│   │   ├── context.py
│   │   └── errors.py
│   └── wiki/
│       ├── __init__.py
│       ├── client.py
│       └── proto/types/pages.py
├── pyproject.toml
└── README.md

Running locally

cd /path/to/yandex-wiki-mcp
export TRACKER_TOKEN="your-token"
export TRACKER_ORG_ID="your-org-id"
uv run yandex-wiki-mcp

Code style

The project uses:

  • ruff for linting and formatting
  • mypy for type checking
  • structlog for logging

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yandex_wiki_mcp-0.1.0.tar.gz (135.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yandex_wiki_mcp-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file yandex_wiki_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: yandex_wiki_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 135.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for yandex_wiki_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 491874d159668bde99e209ddd582028c6b9190f7d796fe8af07a09d864961ede
MD5 a62dab4902ce06e4996ee17db5eb5941
BLAKE2b-256 ccb1db45bd2b2002254dda4ea8ea80e73fd3781b250498e17281fc74ed812e72

See more details on using hashes here.

File details

Details for the file yandex_wiki_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yandex_wiki_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6853acd567bb5712d0f6644e210a2b6da9012e13e3468156149eb41784d565da
MD5 97a639077dee0374c295622d88e00197
BLAKE2b-256 f0cc105215dff43ff20ebd2539bbcda9500644a059bbc00b9d272a52ec861e34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page