← Reference

MCP server

Connect AI agents directly to the gittan.eu API via Model Context Protocol.

The gittan.eu MCP server gives AI coding agents (Claude Code, Cursor, Windsurf, etc.) direct access to your gittan.eu organization — repos, pipelines, teams, secrets, and more — through the Model Context Protocol.

Instead of copying CLI output into chat, the agent calls gittan.eu tools natively: check pipeline status, list repos, read security findings, create teams, manage secrets.

Setup

Clone the MCP server and install dependencies:

git clone ssh://git@git.gittan.eu/bloomer/gittan-mcp.git
cd gittan-mcp
pnpm install

Make sure you're logged in to the gittan CLI — the MCP server shares the same credential store. No separate auth flow needed.

gittan auth login    # if not already logged in

Agent configuration

Add the server to your agent's MCP config. Set GITTAN_ORG to your org slug (shown in gittan status).

Claude Code

Add to .claude/settings.json in your project or ~/.claude/settings.json globally:

{
  "mcpServers": {
    "gittan": {
      "command": "npx",
      "args": ["tsx", "src/index.ts"],
      "cwd": "/path/to/gittan-mcp",
      "env": { "GITTAN_ORG": "your-org-slug" }
    }
  }
}

Cursor / Windsurf

Same structure in .cursor/mcp.json or .windsurf/mcp.json.

Available tools

34 tools across six areas:

Identity

ToolDescription
whoamiCurrent user's org memberships and roles

Organizations

ToolDescription
list_orgsList organizations
dependency_graphCross-repo dependency graph
audit_logOrg audit log entries
list_deploy_hooksDeploy hook configurations
list_service_accountsMachine-to-machine accounts
list_policiesPipeline policies
invite_userInvite a user to the org
create_deploy_hookCreate a deploy hook

Teams

ToolDescription
list_teamsAll teams in the org
get_teamTeam details
list_membersTeam members
team_metricsDORA and team health metrics
team_activityRecent team activity
create_teamCreate a new team
add_team_memberAdd member to team
remove_team_memberRemove member from team

Repositories

ToolDescription
list_reposRepos in the org or filtered by team
get_repoRepo details
list_branchesBranches in a repo
list_commitsCommit history
get_contentsFile or directory contents
compare_commitsDiff between commits
create_repoCreate a new repo
delete_branchDelete a branch
post_commentComment on a commit

Pipelines

ToolDescription
list_pipelinesPipeline runs for a repo
get_pipeline_runDetails of a specific run
pipeline_statusLatest pipeline status for a repo
rerun_pipelineRe-trigger a pipeline run

Secrets & security

ToolDescription
list_secretsSecret names at org/team/repo scope
set_secretSet a secret from a local source
delete_secretDelete a secret
list_findingsSecurity scan findings

Security: secrets

The set_secret tool never accepts a secret value directly. Instead, it takes a source reference that tells the MCP server where to read the value locally:

// From an environment variable
set_secret({ scope: "repo", name: "DEPLOY_TOKEN", source: "env:DEPLOY_TOKEN" })

// From a file
set_secret({ scope: "team", name: "REGISTRY_TOKEN", source: "file:~/.secrets/registry" })

The value is read on the machine running the MCP server and sent directly to the gittan.eu API. It never passes through the AI agent's context, tool calls, or conversation history. Passing an inline value is rejected with an error.

Authentication

The MCP server uses your existing gittan CLI credentials — the same OIDC token stored by gittan auth login. No service account or separate configuration needed.

  • Token is auto-refreshed when it expires
  • If refresh fails, the server returns a clear error: "Run gittan auth login"
  • GITTAN_TOKEN env var overrides stored credentials
  • Client-side rate limiting: 60 requests/minute

Transport

The server uses stdio transport — it runs locally as a child process of your AI agent. No HTTP server, no open ports, no network exposure. The agent starts it, communicates via stdin/stdout, and the process exits when the session ends.