MCP Hub
Back to servers

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.

Stars
1
Updated
Feb 27, 2026

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

ToolDescriptionRequired params
get_pull_requestsTeam-level PR metrics (cycle time, review time, size, …)
get_dora_metricsOrganisation DORA metrics (deployment frequency, lead time, CFR, MTTR)
get_investment_balanceMonthly FTE investment balance by categorystartDate, endDate
get_capexSoftware capitalisation reportstartDate, endDate
get_capex_employeesPer-employee CapEx breakdownyear
get_fteMonthly engineering effort (FTE) by authormonth

Shared optional parameters

All time-series endpoints accept:

ParameterDescriptionExample
timeframePreset windowlast_30_days
startDateCustom start (YYYY-MM-DD)2024-01-01
endDateCustom end (YYYY-MM-DD)2024-03-31
timezonetz database identifierAmerica/New_York

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

DORA-specific parameters

ParameterDescription
appFilter by deployment application name
environmentFilter by deployment environment

FTE-specific parameters

ParameterDescriptionValues
groupByHow to group efforthighestLevelIssue (default), lowestLevelIssue, customField
customFieldJira field IDRequired 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

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

Reviews

No reviews yet

Sign in to write a review