xaffinity MCP
概览
作者提供的说明(英文原文)
MCP server for Affinity CRM - entity search, relationship intelligence, and workflow management
PopNx MCP 的三大支柱
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
- 用户评价i暂无评价评价功能将在后续阶段与账户功能一起开放
- 我们的基础检查i1 项中通过 1 项依据公开信息检查;尚未扫描代码
- 使用情况i非常新★ –
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 营销与社交媒体
- 你需要填写:AFFINITY_API_KEY
安装
选择你使用的 AI 应用,然后复制设置。
安装之前
- 基础检查:1 项中通过 1 项
- 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
- 需要你自己填写:
AFFINITY_API_KEY
标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
链接指向作者自己的文件;我们不托管也不重新打包它。打开文件后,Claude Desktop 会进行安装。
在终端中运行这条命令
运行前请先填写空着的值。
浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
需要你填写的值
- Your Affinity API key (Settings > API in Affinity)
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 yaniv-golan 验证,该账户拥有此仓库
- … 尚未检查
仍在维护
我们还没有从 GitHub 读取这个仓库
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与“营销与社交媒体”中的其他服务器比较i
- 星标数多于此分类中其他 3592 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 3592 个服务器的 6% 更新
- 基础检查结果等于或优于此分类中其他 3592 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
xaffinity MCP 安全吗?
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
你需要填写:AFFINITY_API_KEY
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于–,最新版本(1.22.0)于7个月前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 MCPB。
有什么可以替代它?
同一分类中有:MCP YouTube Transcript, Google Analytics MCP, BibiGPT YouTube Video Summarizer
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Google Analytics MCP
GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.
BibiGPT YouTube Video Summarizer
AI video summarizer: summarize and transcribe YouTube, Bilibili, TikTok and podcast videos.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
xaffinity MCP Server
An MCP (Model Context Protocol) server for Affinity CRM, built with the MCP Bash Framework.
Features
- Entity Management - Search and lookup persons, companies, and opportunities
- Workflow Management - View and update pipeline status, manage list entries
- Relationship Intelligence - Get relationship strength scores and find warm intro paths
- Interaction Logging - Log calls, meetings, emails, and messages
- Session Caching - Efficient caching to minimize API calls
Quick Start
# 1. Install the xaffinity CLI
pipx install "affinity-sdk[cli]"
2. (Optional) Configure your API key - Claude Desktop will prompt if skipped
xaffinity config setup-key
3. Install the MCP server (choose one)
- Claude Desktop: Download and double-click xaffinity-mcp-*.mcpb
- Other clients: See "Manual Installation" below
- Claude Code: /plugin marketplace add yaniv-golan/affinity-sdk
Prerequisites
For Claude Desktop / MCPB Installation (Recommended)
The .mcpb bundle is self-contained — it includes the MCP Bash Framework and gojq. You only need:
| Requirement | How to Install | Verify |
|---|---|---|
| Python 3.10+ | python.org or your package manager | python --version |
| xaffinity CLI | pipx install "affinity-sdk[cli]" | xaffinity --version |
| Affinity API key | xaffinity config setup-key (or let Claude Desktop prompt) | xaffinity config check-key |
Keep the CLI and the extension in step. They are installed separately. When you upgrade one, upgrade the other: download the latest .mcpb after pipx upgrade affinity-sdk, and the other way round. Since MCP 1.25.2, with a CLI older than the extension needs, changes are refused ("This MCP server needs the xaffinity CLI … or later to make changes") and reads still run with a warning that results may be incomplete. An older extension with a newer CLI can fail without saying why (for example, merges with CLI 1.22.0 need extension 1.25.1 or later). Claude Desktop never updates an extension installed from a .mcpb file: install each new release yourself.
For Manual Installation
Manual installation requires additional dependencies:
| Requirement | How to Install | Verify |
|---|---|---|
| Bash 3.2+ | Included on macOS/Linux; Windows: use WSL or Git Bash | bash --version |
| Python 3.10+ | python.org or your package manager | python --version |
| jq or gojq | See Installing jq/gojq below | jq --version or gojq --version |
| xaffinity CLI | pipx install "affinity-sdk[cli]" | xaffinity --version |
| Affinity API key | xaffinity config setup-key | xaffinity config check-key |
Installing jq/gojq
Either jq or gojq works — the server auto-detects which is available.
Which to choose:
- jq (recommended) — The original, widely available, full regex support
- gojq — Pure Go implementation, also supports YAML, better error messages
Install jq:
| Platform | Command |
|---|---|
| macOS | brew install jq |
| Debian/Ubuntu | sudo apt-get install jq |
| Fedora | sudo dnf install jq |
| Arch Linux | sudo pacman -S jq |
| Windows | winget install jqlang.jq or choco install jq |
Install gojq (alternative):
| Platform | Command |
|---|---|
| macOS | brew install gojq |
| Any (Go required) | go install github.com/itchyny/gojq/cmd/gojq@latest |
| Binary download | GitHub Releases |
Installation
Option 1: Claude Desktop (One-Click)
The .mcpb bundle is fully self-contained — it includes the MCP framework and JSON processor.
- Install the xaffinity CLI:
pipx install "affinity-sdk[cli]" - *(Optional)* Configure your API key:
xaffinity config setup-key
- If skipped, Claude Desktop will prompt for your API key during MCPB installation
- Download
xaffinity-mcp-*.mcpbfrom the latest release - Double-click the file or drag it into Claude Desktop
Note: MCPB bundles currently only work with Claude Desktop. Other clients require manual installation.
Option 2: Claude Code
/plugin marketplace add yaniv-golan/affinity-sdk
/plugin install affinity-crm-mcp-unofficial@xaffinity
Option 3: Manual Installation
For other MCP clients or development. Requires additional prerequisites.
- Download
xaffinity-mcp-plugin.zipfrom the latest release - Extract and configure your MCP client (see Usage below)
- The MCP Bash Framework runtime is vendored in
.mcp-bash/— no separate install needed to run the server. - Optional — validate your configuration.
validateanddoctorare developer tools that need the full mcp-bash install (the vendored copy is runtime-only); the command prints the install line for the pinned version if it is missing:
./xaffinity-mcp.sh validate
Troubleshooting
Verify Installation
Before debugging, verify each layer works in order:
Step 1: CLI Installation
First, verify the CLI is installed and can reach the Affinity API. See CLI: Verify Installation.
# Check CLI is installed
xaffinity --version
Check API connectivity (set your API key - same one entered in Claude Desktop)
AFFINITY_API_KEY="your-key-here" xaffinity whoami --json
If whoami hangs, check network connectivity (firewall, proxy, VPN).
Step 2: MCP Server
Once the CLI works, test the MCP server end-to-end.
First, locate your MCP server directory:
# MCPB installation (macOS)
cd ~/Library/Application\ Support/Claude/Claude\ Extensions/local.mcpb.yaniv-golan.xaffinity-mcp/server
Or find it automatically
cd "$(find ~ -name 'xaffinity-mcp.sh' -type f 2>/dev/null | head -1 | xargs dirname)"
Other platforms/installations
| Installation | Path |
|---|---|
| MCPB (Windows) | %APPDATA%\Claude\Claude Extensions\local.mcpb.yaniv-golan.xaffinity-mcp\server\ |
| Manual install | Your chosen extraction location |
| Development | /mcp/ |
For MCPB installations: If Step 1 passes, your setup is complete. The MCP server shells out to CLI, so if CLI works with your API key, the MCP server will too. Restart Claude Desktop and test the tools there.
For manual installations: You can also test the MCP layer directly:
AFFINITY_API_KEY="your-key-here" \
mcp-bash run-tool execute-read-command \ --args '{"command":"whoami"}'
Expected: JSON response with your user information.
If Step 1 works but Step 2 fails, the issue is MCP-specific. Run diagnostics (these need the full mcp-bash install, not just the vendored runtime — see step 4 of manual installation):
./xaffinity-mcp.sh doctor
./xaffinity-mcp.sh validate
Common Issues
| Error | Cause | Solution |
|---|---|---|
| "Could not detect xaffinity CLI" | CLI not installed | pip install "affinity-sdk[cli]" |
| "older than this MCP server needs" / "This MCP server needs the xaffinity CLI X or later" | Outdated CLI | pipx upgrade affinity-sdk or pip install --upgrade "affinity-sdk[cli]" |
| "API key not configured" | Missing credentials | xaffinity config setup-key |
| "No JSON processor found" | jq/gojq not installed (manual install only) | See Installing jq/gojq |
| "Framework not found" | Vendored .mcp-bash/ directory missing | cd mcp && mcp-bash vendor |
| Every tool call fails with "server.d/policy.sh was not loaded" | The server's folder, server.d or policy.sh is writable by group or other users (common after a clone or unzip with umask 002), a symlink, or owned by another user. The server then refuses to run without its policy (read-only mode and other limits). | Run the chmod go-w ... command the error names (or chmod -R go-w ), then restart the server |
For detailed debugging, see docs/DEBUGGING.md.
Usage
With Claude Code
The server is automatically available through the Claude plugin at .claude-plugin/mcp.json.
With Other MCP Clients
Add to your MCP client configuration:
{
"mcpServers": { "xaffinity": { "command": "/path/to/affinity-sdk/mcp/xaffinity-mcp.sh" } } }
Tools
CLI Gateway (Primary Interface)
The CLI Gateway provides full access to the xaffinity CLI with minimal token overhead:
| Tool | Description |
|---|---|
discover-commands | Search CLI commands by keyword (e.g., "create person", "delete note") |
execute-read-command | Execute read-only CLI commands (get, search, list) |
execute-write-command | Execute write CLI commands (create, update, delete) |
Query Tool
| Tool | Description |
|---|---|
query | Execute structured JSON queries with filters, joins, and aggregations |
For complex data analysis (filtering, grouping, aggregations), use the query tool instead of individual CLI commands. See the Query Language Reference for full documentation.
Utility Tools
| Tool | Description |
|---|---|
get-entity-dossier | Get comprehensive info for an entity (aggregates 5+ CLI calls) |
read-xaffinity-resource | Read static MCP resources (data-model, etc.) |
CLI Gateway Usage
- Discover the right command:
{"query": "add person to list", "category": "write"}
Returns compact text format:
# cmd|cat|params (s=str i=int b=bool f=flag !=req *=multi)
list entry add|w|LIST:s! --person-id:i --company-id:i
- Execute the command:
{"command": "list entry add", "argv": ["Pipeline", "--person-id", "123"]}
Output Formats
Control the format of command results for optimal token efficiency:
{"command": "person ls", "format": "markdown"}
| Format | Token Efficiency | Best For |
|---|---|---|
json | Low | Programmatic use (default) |
markdown | Medium-High | LLM comprehension - best for analysis tasks |
toon | High (~40% fewer) | Large datasets, batch operations |
csv | Medium | Spreadsheet export |
jsonl | Medium | Streaming workflows |
Recommendations:
- Use
markdownwhen you need to analyze or summarize data (LLMs read tables well) - Use
toonfor large exports to minimize tokens (30-60% smaller than JSON) - Use
jsonwhen you need full structure with pagination/metadata
Destructive Commands
Commands that cannot be undone (delete, merge) need the user's confirmation:
- In clients that support confirmation dialogs (MCP elicitation), the server asks you directly.
- Claude Desktop extensions get no dialog. The tool refuses the first call and tells Claude to ask you in the conversation; Claude retries with
confirm: trueonly after you agree:
{"command": "person delete", "argv": ["456"], "confirm": true}
The tool appends --yes for the CLI. Since MCP 1.27.0 confirm: true counts only after the server refused that exact command (or showed its dialog) in the last 15 minutes, once: if Claude sets it on its first call, the call is refused and Claude is told to ask you. The server can't see the conversation, so it can't tell whether you really agreed: **keep Claude Desktop's tool-approval prompt on for execute-write-command and don't choose "always allow
只显示了开头部分;其余内容请在仓库中阅读