FlowTruxFlowTrux/Docs

YouTrack MCP Server

Read, create and update JetBrains YouTrack issues, fields, tags and activity history from workflows

The YouTrack MCP server connects workflows to JetBrains YouTrack. It provides 13 tools: read issues, their change history and projects; and write - create issues, comment, edit summary and description, change state and custom fields, assign, and tag.

Setup

  1. Get a permanent token from your YouTrack instance:
    • Open your YouTrack profile > Account Security > Tokens > New token.
    • Copy the token. Permanent tokens start with perm: (older YouTrack) or perm- (2024 and later). Session tokens and personal access tokens from other products do not work.
  2. Go to Resources > MCP Servers > Add Server (OWNER or ADMIN).
  3. Choose YouTrack.
  4. Give it a Name and fill in:
FieldRequiredDescription
Base URLYesYour instance, e.g. https://your-instance.youtrack.cloud - for self-hosted YouTrack include any path prefix (https://your-server/youtrack)
API KeyYesThe permanent token
  1. Under Available in workspaces, pick the workspaces, then click Add Server.

The token acts as the user who created it: that user's permissions decide what workflows can read and change.

Token and URL gotchas

  • Same instance. A token works only on the instance that issued it: a cloud token (*.youtrack.cloud) does not work against a self-hosted server, and vice versa.
  • Self-hosted path prefix. If YouTrack runs under a path, include it in Base URL. Without it you get login-page HTML instead of API answers.
  • Use the final HTTPS address. An HTTP-to-HTTPS redirect drops the token.
  • Reverse proxies and SSO. A proxy that intercepts unauthenticated requests answers with a login page (or "Restart login cookie not found"). Let everything under <Base URL>/api/ pass through unmodified.
  • Quick check: opening <Base URL>/api/users/me?fields=login,name with the token should name the token's owner.

Working with issues

  • Issue keys are project-prefixed, e.g. PROJ-123 (the idReadable field of every issue). Pass that key, not the internal id like 2-1234.
  • Field values must match exactly, case included - state names, priorities, types. Check an issue's custom fields and their values with get_issue first when unsure. An unknown value is rejected with an error, never ignored.
  • One change per call. A state change can be refused by the project's workflow rules even when the state exists; read the issue back with get_issue to confirm.
  • create_issue and its extras. If the issue is created but its type or tags cannot be applied, the tool still returns the new issue, with a warning saying what was not applied - so a retry does not create a duplicate. The warning is shown on the node.

Tools

Reading

get_issues

Fetch issues from YouTrack with optional search query.

ParameterTypeRequiredDescription
querystringNoYouTrack search query (e.g., 'State: Open', 'project: MYPROJ')
fieldsstringNoComma-separated fields to return. Default: "id,idReadable,summary,description,created,resolved,updated".
limitnumberNoMaximum number of issues to return. Default: 100.
skipnumberNoNumber of issues to skip (for pagination) Default: 0.

get_issue

Get a single issue by ID with full details.

ParameterTypeRequiredDescription
issueIdstringYesIssue ID (e.g., PROJ-123)
fieldsstringNoComma-separated fields to return. Default: "id,idReadable,summary,description,created,resolved,updated,customFields(name,value(name,text))".

get_issue_activities

Get activity/change history for an issue (status changes, field updates)

ParameterTypeRequiredDescription
issueIdstringYesIssue ID (e.g., PROJ-123)
categoriesstringNoActivity categories to filter (e.g., 'IssueStateCategory,IssueCreatedCategory') Default: "IssueStateCategory".
fieldsstringNoFields to return for activities. Default: "id,timestamp,author(login,name),field(name,customField(name)),added(name),removed(name)".

get_all_activities

Get all activities across issues (useful for bulk cycle time analysis)

ParameterTypeRequiredDescription
categoriesstringNoActivity categories to filter. Default: "IssueStateCategory".
startnumberNoStart timestamp (Unix ms)
endnumberNoEnd timestamp (Unix ms)
limitnumberNoMaximum activities to return (default 200, max 500)

get_projects

List all accessible projects.

ParameterTypeRequiredDescription
fieldsstringNoFields to return. Default: "id,name,shortName,description".

created, resolved and updated are Unix millisecond timestamps; resolved is null while an issue is open. Activity records carry timestamp, author, the changed field and added / removed values - enough to see when an issue entered and left each state. get_all_activities adds a target naming the issue.

Writing

create_issue

Create a new issue in a project (addressed by its shortName, e.g. 'PROJ'). Optionally set the Type field and tags in the same call.

ParameterTypeRequiredDescription
projectShortNamestringYesProject shortName / key, e.g. 'PROJ' (see get_projects)
summarystringYesIssue summary (title)
descriptionstringNoIssue description (Markdown)
typestringNoValue for the Type field, e.g. 'Bug', 'Task'.
tagsarray of stringNoTags to add to the new issue.

add_comment

Add a comment to an issue. Markdown is rendered by YouTrack.

ParameterTypeRequiredDescription
issueIdstringYesIssue key (e.g., PROJ-123)
textstringYesComment text (Markdown)

update_issue

Change an issue's summary and/or description. Pass only the fields to change.

ParameterTypeRequiredDescription
issueIdstringYesIssue key (e.g., PROJ-123)
summarystringNoNew summary (title)
descriptionstringNoNew description (Markdown)

set_state

Set an issue's State (e.g. Open, In Progress, Fixed). The value must match one of the project's state names exactly (case-sensitive).

ParameterTypeRequiredDescription
issueIdstringYesIssue key (e.g., PROJ-123)
statestringYesTarget state name, e.g. 'In Progress'.

set_field

Set any custom field on an issue by name (e.g. field 'Priority' value 'Critical', field 'Type' value 'Bug', field 'Fix versions' value '2.1'). The value must match one of the field's allowed values exactly.

ParameterTypeRequiredDescription
issueIdstringYesIssue key (e.g., PROJ-123)
fieldstringYesCustom field name as shown in YouTrack, e.g. 'Priority'.
valuestringYesValue to set, e.g. 'Critical'.

assign_issue

Assign an issue to a user by login, or unassign it by passing null or leaving login out.

ParameterTypeRequiredDescription
issueIdstringYesIssue key (e.g., PROJ-123)
loginstring or nullNoYouTrack user login (e.g. 'jdoe'). null or omitted → Unassigned.

add_tags

Add one or more tags to an issue. A tag that does not exist yet is created.

ParameterTypeRequiredDescription
issueIdstringYesIssue key (e.g., PROJ-123)
tagsarray of stringYesTag names, e.g. ['urgent', 'needs review'].

remove_tags

Remove one or more tags from an issue.

ParameterTypeRequiredDescription
issueIdstringYesIssue key (e.g., PROJ-123)
tagsarray of stringYesTag names to remove.

Example Workflows

Weekly engineering digest

  1. Trigger - Schedule (Monday 9:00).
  2. Action - youtrack:get_issues with query State: Open.
  3. Action - youtrack:get_all_activities over the past week.
  4. Agent - Compute cycle times, flag issues stuck in one state, summarize what shipped.
  5. Action - Send the digest with slack:send_message.

Ticket from a form

  1. Trigger - App (a form in Apps).
  2. Action - youtrack:create_issue with projectShortName SUP, summary {{trigger.data.fields.subject}} and description {{trigger.data.fields.message}}.
  3. Action - youtrack:add_tags with issueId {{steps.create.output.response.idReadable}} and tags ["from-form"].