Cover image
Try Now
2025-04-15

用于模型上下文协议(MCP)的专门服务器实现,旨在与CircleCi的开发工作流集成。该项目是Circleci的基础架构与模型上下文协议之间的桥梁,从而实现了增强的AI驱动开发体验。

3 years

Works with Finder

7

Github Watches

4

Github Forks

12

Github Stars

CircleCI MCP Server

GitHub CircleCI npm

Model Context Protocol (MCP) is a new, standardized protocol for managing context between large language models (LLMs) and external systems. In this repository, we provide an MCP Server for CircleCI.

This lets you use Cursor IDE, or any MCP Client, to use natural language to accomplish things with CircleCI, e.g.:

https://github.com/user-attachments/assets/3c765985-8827-442a-a8dc-5069e01edb74

Requirements

  • pnpm package manager - Learn more
  • Node.js >= v18.0.0
  • CircleCI API token - you can generate one through the CircleCI. Learn more or click here for quick access.

Installation

Cursor

Add the following to your cursor MCP config:

{
  "mcpServers": {
    "circleci-mcp-server": {
      "command": "npx",
      "args": ["-y", "@circleci/mcp-server-circleci"],
      "env": {
        "CIRCLECI_TOKEN": "your-circleci-token",
        "CIRCLECI_BASE_URL": "https://circleci.com" // Optional - required for on-prem customers only
      }
    }
  }
}

See the guide below for more information on using MCP servers with cursor: https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers

Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "circleci-mcp-server": {
      "command": "npx",
      "args": ["-y", "@circleci/mcp-server-circleci"],
      "env": {
        "CIRCLECI_TOKEN": "your-circleci-token",
        "CIRCLECI_BASE_URL": "https://circleci.com" // Optional - required for on-prem customers only
      }
    }
  }
}

To find/create this file, first open your claude desktop settings. Then click on "Developer" in the left-hand bar of the Settings pane, and then click on "Edit Config"

This will create a configuration file at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

See the guide below for more information on using MCP servers with Claude Desktop: https://modelcontextprotocol.io/quickstart/user

Claude Code

After installing Claude Code, run the following command:

claude mcp add circleci-mcp-server -e CIRCLECI_TOKEN=your-circleci-token -- npx -y @circleci/mcp-server-circleci

See the guide below for more information on using MCP servers with Claude Code: https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/tutorials#set-up-model-context-protocol-mcp

VS Code

Add the MCP server to your settings.json under mcp -> servers:

"circleci-mcp-server": {
  "command": "npx",
  "args": ["-y", "@circleci/mcp-server-circleci"],
  "env": {
    "CIRCLECI_TOKEN": "your-circleci-token",
    "CIRCLECI_BASE_URL": "https://circleci.com" // Optional - required for on-prem customers only
  }
}

See the guide below for more information on using MCP servers with VS Code: https://code.visualstudio.com/docs/copilot/chat/mcp-servers

Windsurf

Add the following to your windsurf mcp_config.json:

{
  "mcpServers": {
    "circleci-mcp-server": {
      "command": "npx",
      "args": ["-y", "@circleci/mcp-server-circleci"],
      "env": {
        "CIRCLECI_TOKEN": "your-circleci-token",
        "CIRCLECI_BASE_URL": "https://circleci.com" // Optional - required for on-prem customers only
      }
    }
  }
}

See the guide below for more information on using MCP servers with windsurf: https://docs.windsurf.com/windsurf/mcp

Features

Supported Tools

  • get_build_failure_logs

    Retrieves detailed failure logs from CircleCI builds. This tool can be used in two ways:

    1. Using CircleCI URLs:

    2. Using Local Project Context:

      • Works from your local workspace by providing:
        • Workspace root path
        • Git remote URL
        • Branch name
      • Example: "Find the latest failed pipeline on my current branch"

    The tool returns formatted logs including:

    • Job names
    • Step-by-step execution details
    • Failure messages and context

    This is particularly useful for:

    • Debugging failed builds
    • Analyzing test failures
    • Investigating deployment issues
    • Quick access to build logs without leaving your IDE
  • find_flaky_tests

    Identifies flaky tests in your CircleCI project by analyzing test execution history. This leverages the flaky test detection feature described here: https://circleci.com/blog/introducing-test-insights-with-flaky-test-detection/#flaky-test-detection

    This tool can be used in two ways:

    1. Using CircleCI Project URL:

    2. Using Local Project Context:

      • Works from your local workspace by providing:
        • Workspace root path
        • Git remote URL
      • Example: "Find flaky tests in my current project"

    The tool returns detailed information about flaky tests, including:

    • Test names and file locations
    • Failure messages and contexts

    This helps you:

    • Identify unreliable tests in your test suite
    • Get detailed context about test failures
    • Make data-driven decisions about test improvements

Development

Getting Started

  1. Clone the repository:

    git clone https://github.com/CircleCI-Public/mcp-server-circleci.git
    cd mcp-server-circleci
    
  2. Install dependencies:

    pnpm install
    
  3. Build the project:

    pnpm build
    

Development with MCP Inspector

The easiest way to iterate on the MCP Server is using the MCP inspector. You can learn more about the MCP inspector at https://modelcontextprotocol.io/docs/tools/inspector

  1. Start the development server:

    pnpm watch # Keep this running in one terminal
    
  2. In a separate terminal, launch the inspector:

    pnpm inspector
    
  3. Configure the environment:

    • Add your CIRCLECI_TOKEN to the Environment Variables section in the inspector UI
    • The token needs read access to your CircleCI projects
    • Optionally you can set your CircleCI Base URL. Defaults to https//circleci.com

Testing

  • Run the test suite:

    pnpm test
    
  • Run tests in watch mode during development:

    pnpm test:watch
    

For more detailed contribution guidelines, see CONTRIBUTING.md

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Lists Tailwind CSS classes in monospaced font

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • modelcontextprotocol
  • 模型上下文协议服务器

    Reviews

    3 (1)
    Avatar
    user_YneZNNxa
    2025-04-17

    As a dedicated user of the mcp-server-circleci, I can confidently say that this product excels in streamlining CI/CD pipelines with ease. Authored by CircleCI-Public and hosted on GitHub, it integrates seamlessly into any workflow. Its robust features and user-friendly interface make it a must-have for any developer looking to enhance their project's automation capabilities. Highly recommended!