|
| 1 | +# Circleci MCP Server |
| 2 | + |
| 3 | +A specialized server implementation for the Model Context Protocol (MCP) designed to integrate with CircleCI's development workflow. This project serves as a bridge between CircleCI's infrastructure and the Model Context Protocol, enabling enhanced AI-powered development experiences. |
| 4 | + |
| 5 | +[What is an MCP Server?](https://www.anthropic.com/news/model-context-protocol) |
| 6 | + |
| 7 | +## Characteristics |
| 8 | +Attribute|Details| |
| 9 | +|-|-| |
| 10 | +**Image Source**|Official Image |
| 11 | +|**Author**|[CircleCI-Public](https://github.com/CircleCI-Public) |
| 12 | +**Repository**|https://github.com/CircleCI-Public/mcp-server-circleci |
| 13 | +**Dockerfile**|https://github.com/CircleCI-Public/mcp-server-circleci/blob/refs/pull/22/merge/Dockerfile |
| 14 | +**Docker Image built by**|Docker Inc. |
| 15 | +**Licence**|Apache License 2.0 |
| 16 | + |
| 17 | +## Available Tools |
| 18 | +Tools provided by this Server|Short Description |
| 19 | +-|- |
| 20 | +`find_flaky_tests`|This tool retrieves information about flaky tests in a CircleCI project.| |
| 21 | +`get_build_failure_logs`|This tool helps debug CircleCI build failures by retrieving failure logs.| |
| 22 | + |
| 23 | +--- |
| 24 | +## Tools Details |
| 25 | + |
| 26 | +#### Tool: `find_flaky_tests` |
| 27 | +|Description| |
| 28 | +|-| |
| 29 | +|This tool retrieves information about flaky tests in a CircleCI project. |
| 30 | + |
| 31 | + The agent receiving this output MUST analyze the flaky test data and implement appropriate fixes based on the specific issues identified. |
| 32 | + |
| 33 | + Input options (EXACTLY ONE of these two options must be used): |
| 34 | + |
| 35 | + Option 1 - Direct URL (provide ONE of these): |
| 36 | + - projectURL: The URL of the CircleCI project in any of these formats: |
| 37 | + * Project URL: https://app.circleci.com/pipelines/gh/organization/project |
| 38 | + * Pipeline URL: https://app.circleci.com/pipelines/gh/organization/project/123 |
| 39 | + * Workflow URL: https://app.circleci.com/pipelines/gh/organization/project/123/workflows/abc-def |
| 40 | + * Job URL: https://app.circleci.com/pipelines/gh/organization/project/123/workflows/abc-def/jobs/xyz |
| 41 | + |
| 42 | + Option 2 - Project Detection (ALL of these must be provided together): |
| 43 | + - workspaceRoot: The absolute path to the workspace root |
| 44 | + - gitRemoteURL: The URL of the git remote repository |
| 45 | + |
| 46 | + IMPORTANT: |
| 47 | + - Never call this tool with incomplete parameters |
| 48 | + - If using Option 1, the URLs MUST be provided by the user - do not attempt to construct or guess URLs |
| 49 | + - If using Option 2, BOTH parameters (workspaceRoot, gitRemoteURL) must be provided |
| 50 | + - If neither option can be fully satisfied, ask the user for the missing information before making the tool call| |
| 51 | + |
| 52 | +Parameters|Type|Description |
| 53 | +-|-|- |
| 54 | +`params`|`object`| |
| 55 | + |
| 56 | +--- |
| 57 | +#### Tool: `get_build_failure_logs` |
| 58 | +|Description| |
| 59 | +|-| |
| 60 | +|This tool helps debug CircleCI build failures by retrieving failure logs. |
| 61 | + |
| 62 | + Input options (EXACTLY ONE of these two options must be used): |
| 63 | + |
| 64 | + Option 1 - Direct URL (provide ONE of these): |
| 65 | + - projectURL: The URL of the CircleCI project in any of these formats: |
| 66 | + * Project URL: https://app.circleci.com/pipelines/gh/organization/project |
| 67 | + * Pipeline URL: https://app.circleci.com/pipelines/gh/organization/project/123 |
| 68 | + * Workflow URL: https://app.circleci.com/pipelines/gh/organization/project/123/workflows/abc-def |
| 69 | + * Job URL: https://app.circleci.com/pipelines/gh/organization/project/123/workflows/abc-def/jobs/xyz |
| 70 | + |
| 71 | + Option 2 - Project Detection (ALL of these must be provided together): |
| 72 | + - workspaceRoot: The absolute path to the workspace root |
| 73 | + - gitRemoteURL: The URL of the git remote repository |
| 74 | + - branch: The name of the current branch |
| 75 | + |
| 76 | + IMPORTANT: |
| 77 | + - Never call this tool with incomplete parameters |
| 78 | + - If using Option 1, the URLs MUST be provided by the user - do not attempt to construct or guess URLs |
| 79 | + - If using Option 2, ALL THREE parameters (workspaceRoot, gitRemoteURL, branch) must be provided |
| 80 | + - If neither option can be fully satisfied, ask the user for the missing information before making the tool call| |
| 81 | + |
| 82 | +Parameters|Type|Description |
| 83 | +-|-|- |
| 84 | +`params`|`object`| |
| 85 | + |
| 86 | +--- |
| 87 | +## Use this MCP Server |
| 88 | + |
| 89 | +```json |
| 90 | +{ |
| 91 | + "mcpServers": { |
| 92 | + "circleci": { |
| 93 | + "command": "docker", |
| 94 | + "args": [ |
| 95 | + "run", |
| 96 | + "-i", |
| 97 | + "--rm", |
| 98 | + "-e", |
| 99 | + "CIRCLECI_BASE_URL", |
| 100 | + "-e", |
| 101 | + "CIRCLECI_TOKEN", |
| 102 | + "mcp/circleci" |
| 103 | + ], |
| 104 | + "env": { |
| 105 | + "CIRCLECI_BASE_URL": "https://circleci.com", |
| 106 | + "CIRCLECI_TOKEN": "your-circleci-token" |
| 107 | + } |
| 108 | + } |
| 109 | + } |
| 110 | +} |
| 111 | +``` |
| 112 | + |
| 113 | +[Why is it safer to run MCP Servers with Docker?](https://www.docker.com/blog/the-model-context-protocol-simplifying-building-ai-apps-with-anthropic-claude-desktop-and-docker/) |
0 commit comments