affinity-mcp-bridge

affinity-mcp-bridge

Bridges MCP clients to Affinity by Canva's local MCP server, exposing tools for script execution, rendering, and SDK documentation.

Category
Visit Server

README

Affinity MCP Bridge

A standalone MCP stdio bridge for Affinity by Canva's local MCP server.

This lets MCP clients connect to Affinity without depending on Claude Desktop's installed extension path, such as:

C:\Users\<you>\AppData\Roaming\Claude\Claude Extensions\...

The bridge starts as a normal stdio MCP server, then forwards tools, resources, and prompts to Affinity's local SSE server.

Requirements

  • Node.js 20 or newer.
  • Affinity by Canva 3.2 or newer.
  • Affinity running with Settings > Model Context Protocol > Enable MCP server turned on.
  • Restart Affinity after enabling the MCP server.

By default, the bridge connects to:

http://localhost:6767/sse

You can override it with AFFINITY_MCP_SSE_URL.

Use From GitHub

Clone the repository and install dependencies:

git clone https://github.com/andre-carbajal/affinity-mcp-bridge.git
cd affinity-mcp-bridge
npm install

Then configure your MCP client to run src/index.js with Node.

Claude Desktop

{
  "mcpServers": {
    "affinity": {
      "command": "node",
      "args": ["/absolute/path/to/affinity-mcp-bridge/src/index.js"],
      "env": {
        "AFFINITY_MCP_SSE_URL": "http://localhost:6767/sse"
      }
    }
  }
}

On Windows, use forward slashes or escaped backslashes:

{
  "mcpServers": {
    "affinity": {
      "command": "C:/Program Files/nodejs/node.exe",
      "args": ["C:/Users/you/path/to/affinity-mcp-bridge/src/index.js"],
      "env": {
        "AFFINITY_MCP_SSE_URL": "http://localhost:6767/sse"
      }
    }
  }
}

Codex config.toml

[mcp_servers.affinity]
command = "C:/Program Files/nodejs/node.exe"
args = ["C:/absolute/path/to/affinity-mcp-bridge/src/index.js"]
startup_timeout_sec = 30

[mcp_servers.affinity.env]
AFFINITY_MCP_SSE_URL = "http://localhost:6767/sse"

Optional Global Install

You can also install from GitHub globally:

npm install -g github:andre-carbajal/affinity-mcp-bridge

Then find the global package path:

npm root -g

Use that path with node, for example:

<npm-root-global>/affinity-mcp-bridge/src/index.js

For Windows MCP clients, calling node with the JS file path is more reliable than launching npm's .cmd wrapper directly.

Tools

The bridge exposes:

  • affinity_status: local diagnostic tool that checks whether Affinity MCP is reachable.
  • All tools reported by Affinity's upstream MCP server, when Affinity is running.

Typical upstream tools include script execution, rendering the current spread/selection, SDK documentation access, and Affinity script-library operations.

Troubleshooting

If affinity_status says the bridge cannot connect:

  1. Open Affinity by Canva.
  2. Enable Settings > Model Context Protocol > Enable MCP server.
  3. Restart Affinity.
  4. Check whether another local app is occupying 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.

Development

npm install
npm run check
npm run smoke

npm run smoke starts the bridge and lists MCP tools. If Affinity is not reachable, it should still list affinity_status.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured