affinity-mcp-bridge
Allows connecting MCP clients to Affinity by Canva's local MCP server, enabling tools for script execution, rendering, SDK documentation access, and script-library operations.
Allows connecting MCP clients to Affinity by Canva's local MCP server, enabling tools for script execution, rendering, SDK documentation access, and script-library operations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@affinity-mcp-bridgeshow SDK docs for the TextFrame class"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Affinity MCP Bridge
Use Affinity by Canva from any MCP-compatible assistant.
Affinity MCP Bridge is a small local bridge that lets clients like Claude Desktop, Codex, Cursor, or other MCP hosts connect to Affinity's built-in local MCP server without depending on Claude's private extension folder.
Instead of configuring a path like this:
C:\Users\<you>\AppData\Roaming\Claude\Claude Extensions\...you can install this bridge once and point your MCP client to it.
What You Can Do
When Affinity is open and its MCP server is enabled, your assistant can use Affinity tools through this bridge. Depending on the tools exposed by your Affinity version, this can include:
Checking whether Affinity is reachable.
Reading Affinity SDK documentation.
Running scripts inside the current Affinity document.
Rendering spreads or selections for visual verification.
Working with Affinity's script library.
This bridge does not replace Affinity. It only connects your MCP client to the Affinity app running on your computer.
Related MCP server: Local Figma MCP Bridge
Requirements
Node.js 20 or newer.
Affinity by Canva 3.2 or newer.
Affinity running on the same computer.
Affinity MCP enabled in Settings > Model Context Protocol > Enable MCP server.
After enabling the MCP server, restart Affinity.
By default, Affinity MCP Bridge connects to:
http://localhost:6767/sseMost users do not need to change this.
Quick Start
Open Affinity.
Enable Settings > Model Context Protocol > Enable MCP server.
Restart Affinity.
Configure your MCP client with one of the examples below.
Ask your assistant to run the
affinity_statustool.
If affinity_status reports that Affinity is reachable, the bridge is working.
Install From npm
If the package is available on npm, the easiest setup is to run it with npx from your MCP client:
npx -y affinity-mcp-bridgeYou can also install it globally:
npm install -g affinity-mcp-bridgeThen use:
affinity-mcp-bridgeInstall From GitHub
If you want to use the GitHub version directly:
git clone https://github.com/andre-carbajal/affinity-mcp-bridge.git
cd affinity-mcp-bridge
npm install
npm run buildThen configure your MCP client to run:
node /absolute/path/to/affinity-mcp-bridge/dist/index.jsOn Windows, use the full path to node.exe if your MCP client does not find node automatically.
Claude Desktop
For npm or npx usage:
{
"mcpServers": {
"affinity": {
"command": "npx",
"args": ["-y", "affinity-mcp-bridge"]
}
}
}For a local GitHub clone:
{
"mcpServers": {
"affinity": {
"command": "node",
"args": ["/absolute/path/to/affinity-mcp-bridge/dist/index.js"]
}
}
}Windows example:
{
"mcpServers": {
"affinity": {
"command": "C:/Program Files/nodejs/node.exe",
"args": ["C:/Users/you/path/to/affinity-mcp-bridge/dist/index.js"]
}
}
}Codex
Add this to your Codex config.toml.
For npm or npx usage:
[mcp_servers.affinity]
command = "npx"
args = ["-y", "affinity-mcp-bridge"]
startup_timeout_sec = 30For a local GitHub clone:
[mcp_servers.affinity]
command = "C:/Program Files/nodejs/node.exe"
args = ["C:/absolute/path/to/affinity-mcp-bridge/dist/index.js"]
startup_timeout_sec = 30Custom Affinity URL
If your Affinity MCP server is not using the default URL, set AFFINITY_MCP_SSE_URL.
Claude Desktop example:
{
"mcpServers": {
"affinity": {
"command": "npx",
"args": ["-y", "affinity-mcp-bridge"],
"env": {
"AFFINITY_MCP_SSE_URL": "http://localhost:6767/sse"
}
}
}
}Codex example:
[mcp_servers.affinity]
command = "npx"
args = ["-y", "affinity-mcp-bridge"]
startup_timeout_sec = 30
[mcp_servers.affinity.env]
AFFINITY_MCP_SSE_URL = "http://localhost:6767/sse"Test Your Setup
After configuring your MCP client, ask your assistant:
Use the affinity_status tool and tell me if Affinity is reachable.Expected result:
The bridge starts successfully.
affinity_statusis available.Affinity is reported as reachable when the app is open and MCP is enabled.
If Affinity is not reachable, the rest of the Affinity tools may not be available yet.
Troubleshooting
affinity_status says Affinity is not reachable
Check these items:
Affinity is open.
Settings > Model Context Protocol > Enable MCP server is enabled.
Affinity was restarted after enabling MCP.
No other app is blocking port
6767.
On Windows, you can check the port owner with:
Get-NetTCPConnection -LocalPort 6767 | ForEach-Object {
Get-Process -Id $_.OwningProcess
}If another app owns 127.0.0.1:6767 but Affinity owns ::1:6767, keep the default http://localhost:6767/sse; do not force 127.0.0.1.
My MCP client cannot find npx
Use the full path to Node and run the local clone instead:
{
"mcpServers": {
"affinity": {
"command": "C:/Program Files/nodejs/node.exe",
"args": ["C:/Users/you/path/to/affinity-mcp-bridge/dist/index.js"]
}
}
}I installed globally but the command does not start
Some Windows MCP clients handle .cmd launchers inconsistently. If that happens, prefer either:
npx -y affinity-mcp-bridgenode C:/path/to/affinity-mcp-bridge/dist/index.js
For Developers
npm install
npm run build
npm run check
npm run smokenpm run smoke starts the bridge and lists MCP tools. If Affinity is not reachable, it should still list affinity_status.
License
MIT
Available Tools
1 toolaffinity_statusARead-onlyIdempotent
Check whether the bridge can connect to Affinity by Canva's local MCP server.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds that it checks 'connection to the local MCP server', providing context beyond annotations. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single concise sentence that communicates the tool's purpose without any wasted words. It is front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters, no output schema, and comprehensive annotations, the description covers the necessary context for the agent to use this tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters are defined. According to guidelines, zero parameters baseline is 4. The description does not need to add parameter information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks connectivity to Affinity's local MCP server. The verb 'check' and resource 'connection' are specific and unambiguous. No sibling tools exist, so no confusion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (to check status), but does not explicitly state when not to use or provide alternatives. Since there are no sibling tools, the lack of exclusion is acceptable, and the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.2.0- First observed
affinity_status
TDQS
Scored across 1 tool
Only one tool exists, so there is no possible confusion between tools. The purpose of the single tool is clear.
With a single tool, naming is trivially consistent. The name follows a descriptive verb_noun pattern.
A single health-check tool is insufficient for a server named 'affinity-mcp-bridge', which implies a range of operations. The tool count is far too low for the implied scope.
The tool surface is severely incomplete; it only provides a status check and lacks any CRUD or lifecycle operations for Affinity's resources, making it nearly useless for actual tasks.
Maintenance
Related MCP Connectors
MCP server to assist with JxBrowser development.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
- SupabaseOAuthcom.supabase
MCP server for interacting with the Supabase platform
An MCP server that provides access to Agility CMS. See https://mcp.agilitycms.com for more details.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProxies the local Affinity MCP server over stdio, enabling tools to call Affinity's tools like execute_script and search_sdk_hints via MCP.10 npm4MIT
- AlicenseNot gradedqualityDmaintenanceUnofficial local MCP bridge for reading the currently open Figma file through a Figma plugin. Provides tools to inspect selection, file info, and export selected nodes as SVG/PNG.MIT
- AlicenseNot gradedqualityDmaintenanceBridges MCP clients to Figma, enabling live canvas manipulation via a plugin WebSocket and file metadata access through the Figma REST API.MIT
- FlicenseNot gradedqualityBmaintenanceA proof-of-concept MCP server that augments the Canva CLI with custom tools for generating design briefs and staging assets for the Canva API.-