MCP Setup
このコンテンツはまだ日本語訳がありません。
The Pidgr MCP (Model Context Protocol) server enables AI agents to interact with your Pidgr organization through natural language. It translates MCP tool calls into gRPC RPCs against the Pidgr API.
Overview
Section titled “Overview”- Open source — Apache 2.0 license
- Dual deployment — Run locally on your machine or connect to the hosted server at
mcp.pidgr.com - Dual transport — stdio (for Claude Code, Cursor, Windsurf) and streamable HTTP (for hosted/remote agents)
- 49 tools — Covering campaigns, templates, members, teams, groups, organizations, roles, API keys, heatmaps, and replays
Prerequisites
Section titled “Prerequisites”Create an API key in the admin dashboard under Settings → API Keys. The key has the pidgr_k_ prefix and controls which permissions your agent has.
Hosted Server
Section titled “Hosted Server”The fastest way to get started. Connect directly to mcp.pidgr.com — no binary to download.
Claude Code
Section titled “Claude Code”claude mcp add --transport http pidgr https://mcp.pidgr.com \ --header "Authorization: Bearer pidgr_k_your_key"Or add manually to .claude/settings.json:
{ "mcpServers": { "pidgr": { "url": "https://mcp.pidgr.com", "headers": { "Authorization": "Bearer pidgr_k_your_key" } } }}Cursor
Section titled “Cursor”Add to .cursor/mcp.json:
{ "mcpServers": { "pidgr": { "url": "https://mcp.pidgr.com", "headers": { "Authorization": "Bearer pidgr_k_your_key" } } }}Windsurf
Section titled “Windsurf”Add to your Windsurf MCP configuration:
{ "mcpServers": { "pidgr": { "url": "https://mcp.pidgr.com", "headers": { "Authorization": "Bearer pidgr_k_your_key" } } }}Local Server
Section titled “Local Server”Run the MCP binary on your machine. Useful for air-gapped environments, custom API endpoints, or development against a local Pidgr API.
Installation
Section titled “Installation”GitHub Releases (recommended)
Section titled “GitHub Releases (recommended)”Download the latest binary for your platform from GitHub Releases:
# macOS (Apple Silicon)curl -LO https://github.com/pidgr/pidgr-mcp/releases/latest/download/pidgr-mcp_darwin_arm64.tar.gztar xzf pidgr-mcp_darwin_arm64.tar.gzchmod +x pidgr-mcp
# Verify checksumsha256sum -c checksums.txt
# Add to PATHsudo mv pidgr-mcp /usr/local/bin/Docker
Section titled “Docker”docker pull ghcr.io/pidgr/pidgr-mcp:latestFrom source
Section titled “From source”git clone https://github.com/pidgr/pidgr-mcp.gitcd pidgr-mcpgo build -o pidgr-mcp ./cmd/pidgr-mcpConfiguration
Section titled “Configuration”The local server uses the same API key as the hosted server, passed via environment variable.
Claude Code
Section titled “Claude Code”claude mcp add pidgr -e PIDGR_API_KEY=pidgr_k_your_key -- pidgr-mcpOr add manually to .claude/settings.json:
{ "mcpServers": { "pidgr": { "command": "pidgr-mcp", "env": { "PIDGR_API_KEY": "pidgr_k_your_key" } } }}Cursor
Section titled “Cursor”Add to .cursor/mcp.json:
{ "mcpServers": { "pidgr": { "command": "pidgr-mcp", "env": { "PIDGR_API_KEY": "pidgr_k_your_key" } } }}Windsurf
Section titled “Windsurf”{ "mcpServers": { "pidgr": { "command": "pidgr-mcp", "env": { "PIDGR_API_KEY": "pidgr_k_your_key" } } }}Environment Variables
Section titled “Environment Variables”| Variable | Required | Description |
|---|---|---|
PIDGR_API_KEY | Yes | API key for authentication |
PIDGR_API_URL | No | API endpoint (default: https://api.pidgr.com) |
Local Development
Section titled “Local Development”Point the MCP server at a local Pidgr API:
PIDGR_API_KEY=pidgr_k_dev_key \PIDGR_API_URL=http://localhost:50051 \pidgr-mcpHosted vs Local
Section titled “Hosted vs Local”Hosted (mcp.pidgr.com) | Local binary | |
|---|---|---|
| Setup | One command, no install | Download binary |
| Auth | API key via HTTP header | API key via env var |
| Transport | Streamable HTTP | stdio |
| Updates | Automatic | Manual binary update |
| Custom API URL | No | Yes |
| Air-gapped | No | Yes |
| Best for | Most users | Custom environments, local dev |
Available Tools
Section titled “Available Tools”The MCP server exposes 49 tools across 10 service domains:
| Domain | Tools | Examples |
|---|---|---|
| Campaigns | 7 | Create, start, list, get, update, cancel, list deliveries |
| Templates | 4 | Create, update, get, list |
| Members | 6 | Invite, get, list, update role, deactivate, update profile |
| Teams | 8 | CRUD, member management |
| Groups | 9 | CRUD, member management, user memberships |
| Organizations | 4 | Create, get, update, list |
| Roles | 4 | List, create, update, delete |
| API Keys | 3 | Create, list, revoke |
| Heatmaps | 2 | Ingest events, query data |
| Replays | 2 | List recordings, get snapshots |
Example Usage
Section titled “Example Usage”Once configured, AI agents can interact with Pidgr naturally:
“Create a campaign called ‘Security Update Q1’ targeting the Engineering group with the security-update template”
“Show me the delivery status for the latest campaign”
“List all members with the Manager role”
“Create a new API key for the CI integration”
Troubleshooting
Section titled “Troubleshooting”Connection Refused (local)
Section titled “Connection Refused (local)”Verify PIDGR_API_URL is correct and the API is reachable:
curl -s https://api.pidgr.com/healthAuthentication Errors
Section titled “Authentication Errors”- Hosted: Verify the
Authorizationheader contains a validpidgr_k_key. Check the key hasn’t been revoked or expired in the admin dashboard. - Local: Verify
PIDGR_API_KEYis set and not expired. Check the key hasn’t been revoked in the admin dashboard. - Permission Denied: The error message indicates which permission is required (e.g., “requires TEAMS_ALL_READ or TEAMS_ALL_WRITE permission”). Add the missing permission to the API key in the admin dashboard.
Updating (local)
Section titled “Updating (local)”Download the latest binary from GitHub Releases and replace the existing binary.