keap-mcp

keap-mcp

MCP server for Keap CRM, providing tools to manage contacts, tags, opportunities, notes, tasks, campaigns, and users via the Keap REST API v1.

Category
访问服务器

README

keap-mcp

Keap (formerly Infusionsoft) MCP Service — a stateless HTTP MCP server wrapping the Keap CRM REST API v1, covering Contacts, Tags, Opportunities, Notes, Tasks, Campaigns, and Users.

Tech stack: Python 3.12 + uv + FastMCP (Starlette/Uvicorn)

Scope

Out of Keap's full REST API v1, this service implements 15 tools aligned to the resource categories MSPbots has historically synced (Contact, Tag Contact, Tags, Opportunities, Notes, Task, Campaigns, User).

Authentication

Keap's REST API v1 is oauth2 on paper (authorization_code grant is the only flow in its official OpenAPI spec's securitySchemes), but Keap also offers a documented, self-service alternative that needs no redirect: Personal Access Tokens (PAT) and Service Account Keys (SAK) — see developer.infusionsoft.com/pat-and-sak. Either is generated inside the Keap app itself (Settings → API Settings, no developer-app registration or client secret needed) and used as a plain bearer token:

Authorization: Bearer <PAT or SAK>

This service uses that path — a single static token, no login/token-exchange step, no redirect. A Service Account Key (admin-level) is recommended over a Personal Access Token (single-user-scoped) for server-to-server use.

Quick Start

cd D:\claude\project\keap-mcp
uv sync

$env:KEAP_ACCESS_TOKEN="your_pat_or_sak"
uv run keap-mcp

Configuration

Copy .env.example to .env and fill in your values:

Variable Default Description
KEAP_ACCESS_TOKEN Keap Personal Access Token or Service Account Key
AUTH_MODE gateway gateway = token per-request via header (SOP-compliant); env = shared token from env var (local dev only)
MCP_TRANSPORT stdio stdio (Claude Desktop) or http (gateway)
MCP_HTTP_PORT 8080 HTTP server port

HEADER 授权参数说明

Header 类型 是否必填 默认值 枚举值 字段描述 Example
X-Keap-Access-Token string Keap Personal Access Token 或 Service Account Key(Keap 后台 Settings → API Settings 生成),本服务原样转发为 Authorization: Bearer KeapAK-a1b2c3d4e5f6g7h8i9j0

Claude Desktop Setup

{
  "mcpServers": {
    "keap": {
      "command": "uv",
      "args": ["run", "--directory", "D:/claude/project/keap-mcp", "keap-mcp"],
      "env": { "KEAP_ACCESS_TOKEN": "your_pat_or_sak" }
    }
  }
}

Transport Modes

stdio

$env:KEAP_ACCESS_TOKEN="your_pat_or_sak"
uv run keap-mcp

HTTP — single-tenant

$env:KEAP_ACCESS_TOKEN="your_pat_or_sak"
$env:MCP_TRANSPORT="http"
$env:AUTH_MODE="env"
uv run keap-mcp

HTTP — gateway / multi-tenant

$env:MCP_TRANSPORT="http"
$env:AUTH_MODE="gateway"
uv run keap-mcp
# Each request must include: X-Keap-Access-Token header

Available Tools (15)

Tool Description API
keap_list_contacts List contacts GET /contacts
keap_get_contact Retrieve a contact by ID GET /contacts/{id}
keap_create_contact Create a contact POST /contacts
keap_list_contact_tags List tags applied to a contact GET /contacts/{contactId}/tags
keap_apply_tags_to_contact Apply tags to a contact POST /contacts/{contactId}/tags
keap_list_tags List all tags defined in the app GET /tags
keap_list_opportunities List sales opportunities (deals) GET /opportunities
keap_get_opportunity Retrieve an opportunity by ID GET /opportunities/{opportunityId}
keap_create_opportunity Create a sales opportunity POST /opportunities
keap_list_notes List notes GET /notes
keap_create_note Create a note on a contact POST /notes
keap_list_tasks List tasks GET /tasks
keap_create_task Create a task POST /tasks
keap_list_campaigns List marketing/automation campaigns GET /campaigns
keap_list_users List users of the Keap app GET /users

Known Gaps

  • ⚠️ Not yet tested against a live Keap account. All 15 tools have been checked structurally only (MCP handshake, tools-list, schema validity, /health, gateway 401 credential-gating) — no real PAT/SAK was available at build time. A free-trial Keap account application has been submitted separately; once approved, generate a Service Account Key and test end-to-end.
  • Endpoint paths/params were verified directly against Keap's official OpenAPI v1 spec (https://crm.infusionsoft.com/app/v3/api-docs/V1, linked from the "Download OpenAPI specification" button on the docs site) — not guessed.
  • PUT /contacts (upsert) documents a duplicate_option field in prose but it does not appear in the actual request schema — a documentation/schema mismatch on Keap's side, not implemented here since it's unconfirmed. Not built as a tool in this 15-tool scope anyway (only POST/GET contact operations were included).
  • Scope is limited to the 15 operations above (Contacts/Tags/Opportunities/Notes/Tasks/Campaigns/Users read+core-write), not Keap's full REST API v1 surface (which also includes Companies, Products, Orders/Subscriptions, Affiliates, Files, Email sending, custom fields management, and webhooks).

API Reference

推荐服务器

Baidu Map

Baidu Map

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

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

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

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

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

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

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

官方
精选
本地
TypeScript
VeyraX

VeyraX

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

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

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

官方
精选
Exa MCP Server

Exa MCP Server

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

官方
精选