YouTrack MCP Server for AI Assistants
Integrate YouTrack with AI assistants using an MCP server to enable context-aware issue tracking, search, and updates.
npx -y @tonyzorin/youtrack-mcpOverview
This MCP (Model Context Protocol) server connects YouTrack to AI assistants so models can fetch issue context, run searches, and apply changes programmatically. It implements a set of MCP-compatible endpoints and “tools” that an assistant can call to answer questions about projects, summarize or triage issues, and perform updates (comments, state changes, assignments) while preserving YouTrack authentication and query semantics.
For developers building AI integrations, the server provides a lightweight bridge between an LLM-capable agent and YouTrack’s REST API. It centralizes common operations (search, fetch issue, list projects, update fields) and translates them into stable JSON RPC-like tool calls that follow MCP conventions, removing the need for each assistant integration to speak directly to YouTrack.
Features
- Exposes MCP-compatible tools for YouTrack operations (search, get, update, create, comment, attachments)
- Translates natural-language search into YouTrack query parameters (when used with a language model)
- Authenticated requests using YouTrack permanent tokens
- Local and containerized deployment (Node.js + Docker)
- Simple JSON-based tool payloads and responses suitable for chained LLM tool use
- Optional rate limiting and request logging for safe automation
Installation / Configuration
Prerequisites:
- Node.js 18+ (or a compatible runtime)
- A YouTrack instance and a personal access token with appropriate scopes
Clone and install:
Create a .env file (or set environment variables) with at least these values:
YOUTRACK_BASE_URL=https://youtrack.yourcompany.com
YOUTRACK_TOKEN=perm:XXXXXXXXXXXXXXXXXXXXX
MCP_HOST=0.0.0.0
MCP_PORT=8080
LOG_LEVEL=info
Run locally:
# or for development
Run with Docker:
# build image
# run container
Sample Docker Compose snippet:
version: "3.8"
services:
youtrack-mcp:
image: youtrack-mcp:latest
environment:
- YOUTRACK_BASE_URL=https://youtrack.yourcompany.com
- YOUTRACK_TOKEN=perm:XXXXXXXXXXXXXXXX
ports:
- "8080:8080"
Security notes:
- Keep YOUTRACK_TOKEN secret and store it in a secure secret manager in production.
- Use TLS termination in front of the MCP server for encrypted transport.
Available Tools
The server exposes a set of MCP tools (JSON endpoints) intended to be called by an assistant. Each tool accepts a JSON payload and returns a JSON result. Below is a summary table:
| Tool name | HTTP method & path | Purpose |
|---|---|---|
| searchIssues | POST /tool/searchIssues | Run a YouTrack query and return matching issues (supports limit, sort, fields) |
| getIssue | POST /tool/getIssue | Fetch full issue details by ID |
| createIssue | POST /tool/createIssue | Create a new issue in a project |
| updateIssue | POST /tool/updateIssue | Modify fields, state, assignee for an issue |
| addComment | POST /tool/addComment | Add a comment to an issue |
| listProjects | GET /tool/listProjects | Return available projects and basic metadata |
| getUser | POST /tool/getUser | Lookup user by login or email |
| attachFile | POST /tool/attachFile | Attach binary content to an issue (multipart or base64) |
Example: searchIssues payload
Response includes a list of simplified issue objects or full issue JSON depending on the fields requested.
Use Cases
Context-aware issue summarization
- Scenario: An assistant receives a user question “What are the open frontend bugs blocking release?”
- Flow:
- Assistant calls searchIssues with a query like
project: FRONEND state: Open priority: High. - MCP returns issues with summary and state.
- Assistant generates a consolidated summary and suggested next steps.
- Assistant calls searchIssues with a query like
Triage and automated field updates
- Scenario: A bot triages incoming issues and assigns them to owners.
- Flow:
- Assistant calls getIssue to inspect the new ticket.
- Based on rules or an LLM prompt, assistant calls updateIssue to set an assignee and update the priority.
- Assistant adds a comment describing triage rationale via addComment.
Natural-language search and navigation
- Scenario: “Show me all tasks assigned to Alice last week with tag regression.”
- Flow:
- Assistant translates natural language to a YouTrack query (e.g.,
assignee: alice created: {last week} tag: regression) then calls searchIssues. - Returns a short list that the user can expand or ask follow-up questions about.
- Assistant translates natural language to a YouTrack query (e.g.,
Creating issues from chat
- Scenario: A user reports a bug in a chat channel.
- Flow:
- Assistant collects title, description, priority and optionally attachments.
- Assistant calls createIssue and attachFile to create the YouTrack ticket and attach logs/screenshots.
- Assistant returns the new issue ID and URL in chat.
Tips and Best Practices
- Limit the fields requested in search to reduce payload size; request full issue details only when needed.
- Implement server-side rate limiting to avoid hitting YouTrack API quotas.
- Use role-scoped tokens for automated bots and restrict scopes to only the needed permissions.
- Log tool calls for traceability, but avoid logging secrets or full token values.
For full API semantics and example requests/responses, consult the repository’s code and OpenAPI/MCP manifest (if included) to tailor the tool payloads to your assistant’s MCP implementation.