Affinity Proxy
FreeNot checkedProxies the local Affinity MCP server over stdio, enabling tools to call Affinity's tools like execute_script and search_sdk_hints via MCP.
About
Proxies the local Affinity MCP server over stdio, enabling tools to call Affinity's tools like execute_script and search_sdk_hints via MCP.
README
affinity-mcp-proxy exposes the local Affinity MCP server as an MCP server over stdio.
It is designed for tools that know how to launch MCP servers as local commands, for example:
{
"mcpServers": {
"affinity": {
"command": "pnpm",
"args": ["dlx", "affinity-mcp-proxy"]
}
}
}
What it does
- connects to the local Affinity MCP server over HTTP/SSE
- re-exposes
tools/listandtools/calloverstdio - primes
execute_scriptwithread_preamblein the same upstream session - ships a small CLI for diagnostics and direct tool calls
Status
- first-class target: macOS
- runtime: Node.js 22+
- package manager:
pnpm
Other platforms may work, but this package is only validated on macOS in the first release.
Install and run
Preferred ephemeral usage:
pnpm dlx affinity-mcp-proxy
Direct CLI usage:
pnpm dlx --package affinity-mcp-proxy affinity-mcp-proxy-cli list-tools
pnpm dlx --package affinity-mcp-proxy affinity-mcp-proxy-cli call-tool search_sdk_hints '{"query":"text style"}'
Local development:
pnpm install
pnpm test
pnpm dlx . --help
node ./affinity_mcp_proxy.mjs --help
Requirements
- Affinity must be open
- the local Affinity MCP server must be enabled and listening
- Node.js 22 or newer
By default the proxy tries these upstream URLs:
http://127.0.0.1:6767/ssehttp://127.0.0.1:6767http://[::1]:6767/ssehttp://[::1]:6767
Environment variables
AFFINITY_MCP_URL- force a specific upstream MCP URL
AFFINITY_MCP_CONNECT_TIMEOUT_MS- override the connection timeout
AFFINITY_MCP_DEBUG- enable proxy debug logs on
stderr
- enable proxy debug logs on
The proxy requires the SDK to be installed through the package dependencies. There is no alternate local SDK fallback.
Commands
Proxy server:
pnpm dlx affinity-mcp-proxy
pnpm dlx affinity-mcp-proxy --help
pnpm dlx affinity-mcp-proxy --version
Diagnostic CLI:
pnpm dlx --package affinity-mcp-proxy affinity-mcp-proxy-cli list-tools
pnpm dlx --package affinity-mcp-proxy affinity-mcp-proxy-cli execute-script-file ./script.js
pnpm dlx --package affinity-mcp-proxy affinity-mcp-proxy-cli render-spread-file DOCUMENT_SESSION_UUID '{"spread_index":2,"out":"/tmp/spread-2.jpg"}'
Troubleshooting
If the proxy exits immediately:
- confirm Affinity is open
- confirm the local MCP endpoint is enabled
- set
AFFINITY_MCP_DEBUG=1to see connection attempts - if your environment prefers a specific interface, set
AFFINITY_MCP_URLexplicitly
If text formatting scripts fail inside Affinity with COMMAND_FAILED, make sure the script sets the current spread to the target text node spread before calling doc.formatText(...).
Install Affinity Proxy in Claude Desktop, Claude Code & Cursor
unyly install affinity-mcp-proxyInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add affinity-mcp-proxy -- npx -y affinity-mcp-proxyFAQ
Is Affinity Proxy MCP free?
Yes, Affinity Proxy MCP is free — one-click install via Unyly at no cost.
Does Affinity Proxy need an API key?
No, Affinity Proxy runs without API keys or environment variables.
Is Affinity Proxy hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Affinity Proxy in Claude Desktop, Claude Code or Cursor?
Open Affinity Proxy on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Affinity Proxy with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
