mcp-swarmia

mcp-swarmia

Exposes the Swarmia Export API as tools for AI assistants to query engineering metrics through natural language. It enables retrieval of DORA metrics, pull request cycle times, investment balances, and FTE effort reports.

Category
访问服务器

README

mcp-swarmia

A local Model Context Protocol (MCP) server that exposes the Swarmia Export API as tools for AI assistants such as Claude.

Once connected, Claude (or any MCP-compatible client) can query your engineering metrics—pull request cycle times, DORA metrics, investment balance, CapEx reports, and FTE effort—in natural language without you having to write a single API call.


Requirements

  • Python 3.11+
  • A Swarmia account with an API token (Settings → API tokens)
  • mcp Python package (only external dependency)

Installation

# 1. Clone or copy this directory
cd mcp-swarmia

# 2. Create and activate a virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

Configuration

Export your Swarmia API token as an environment variable:

export SWARMIA_API_TOKEN="your-token-here"

Alternatively, add it to a .env file and source it, or configure it in your MCP client settings (see below).


Running the server

python server.py

The server communicates over stdio (standard input/output), which is the transport expected by Claude Desktop and most other MCP clients. You do not need to expose any network ports.


Connecting to Claude Desktop

Add the following block to your Claude Desktop configuration file:

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

{
  "mcpServers": {
    "swarmia": {
      "command": "/absolute/path/to/.venv/bin/python",
      "args": ["/absolute/path/to/mcp-swarmia/server.py"],
      "env": {
        "SWARMIA_API_TOKEN": "your-token-here"
      }
    }
  }
}

Replace the paths and token with your actual values, then restart Claude Desktop.


Available tools

Tool Description Required params
get_pull_requests Team-level PR metrics (cycle time, review time, size, …)
get_dora_metrics Organisation DORA metrics (deployment frequency, lead time, CFR, MTTR)
get_investment_balance Monthly FTE investment balance by category startDate, endDate
get_capex Software capitalisation report startDate, endDate
get_capex_employees Per-employee CapEx breakdown year
get_fte Monthly engineering effort (FTE) by author month

Shared optional parameters

All time-series endpoints accept:

Parameter Description Example
timeframe Preset window last_30_days
startDate Custom start (YYYY-MM-DD) 2024-01-01
endDate Custom end (YYYY-MM-DD) 2024-03-31
timezone tz database identifier America/New_York

timeframe and startDate/endDate are mutually exclusive. Defaults to last_7_days when neither is provided.

DORA-specific parameters

Parameter Description
app Filter by deployment application name
environment Filter by deployment environment

FTE-specific parameters

Parameter Description Values
groupBy How to group effort highestLevelIssue (default), lowestLevelIssue, customField
customField Jira field ID Required when groupBy=customField

Response format

All tools return CSV text with a header row and comma delimiters, exactly as returned by the Swarmia API. No summary aggregations are added.


Example prompts

After connecting the server to Claude, try:

  • "Show me our DORA metrics for the last 30 days."
  • "What does our pull request cycle time look like for Q1 2024?"
  • "Fetch the investment balance for January 2024."
  • "Get the CapEx report for 2024."
  • "Show FTE effort for March 2024, grouped by highest-level issue."

Security note

Swarmia recommends passing tokens via the Authorization header rather than query parameters, as some proxies log query strings. This server always uses the header approach.


Troubleshooting

Problem Solution
SWARMIA_API_TOKEN is not set Export the env var or add it to your MCP client config
HTTP 401 Token is invalid or expired — regenerate it in Swarmia
HTTP 400 Check that required parameters (e.g. startDate/endDate) are provided and in the correct format
Server not appearing in Claude Verify the absolute paths in claude_desktop_config.json and restart Claude Desktop

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选