Affinity Design
Agency Guide

Connecting Cursor

Use Cursor IDE with your platform's MCP server for AI-assisted coding and operations

Overview

Cursor is an AI-powered code editor that supports MCP through both HTTP and SSE transports. This lets you interact with your platform's tools directly from your IDE — perfect for developers building on top of af-gemini-connect.

Prerequisites

  • Cursor installed (download)
  • An active API key with mcp:access scope (generate one here)
  • Your platform URL (e.g., https://api.v2.affinitydesign.ca)

Setup

1. Open MCP Settings

In Cursor:

  1. Go to Settings ( gear icon or Cmd/Ctrl + ,)
  2. Navigate to FeaturesMCP
  3. Click Add New MCP Server

2. Configure the Server

Fill in the form:

FieldValue
Nameaf-platform (or any label)
Transportsse
URLhttps://api.v2.affinitydesign.ca/mcp/sse
HeadersX-API-Key: afk_YOUR_KEY_HERE

Click Save.

3. Verify Connection

Cursor should show a green indicator next to the server name. Click the Refresh icon to fetch the latest tool list.

Open the Cursor Chat (Cmd/Ctrl + L) and ask:

"List the available tools from af-platform"

You should see your platform's tools listed.

Using Cursor with Your Platform

Example Workflows

GitHub + Website Management:

"List the connected GitHub repos, check the latest deployment status on Cloudflare, and update the README with the new site URL"

SEO Analysis:

"Pull GA4 data for the last 28 days, identify the top 5 landing pages, and create a WordPress blog post summarizing the findings"

Asset Management:

"Get the uploader link so I can add a new hero image, then push it to the WordPress media library and update the homepage"

HTTP Transport (Alternative)

If SSE is unstable, you can use HTTP transport via Cursor's Custom MCP type (requires Cursor 0.45+):

  1. In MCP Settings, choose Type: HTTP instead of SSE
  2. Set URL to https://api.v2.affinitydesign.ca/mcp/http
  3. Add header: X-API-Key: afk_YOUR_KEY_HERE

HTTP transport is generally more reliable for large requests (e.g., image uploads up to 20MB).

Troubleshooting

"Connection failed" in Cursor

  • Verify the URL ends in /mcp/sse (for SSE) or /mcp/http (for HTTP)
  • Check that your API key is active and includes mcp:access scope
  • Ensure no firewalls or proxies are blocking the connection
  • Try accessing the URL directly in a browser — you should get an auth error (proving the endpoint exists)

Tools don't appear after adding

  • Click the Refresh button next to the MCP server in Cursor settings
  • Restart Cursor completely
  • Check that the client's status is Active in the admin dashboard

Slow or hanging requests

  • SSE connections can be interrupted by network changes. Switch to HTTP transport if this happens frequently
  • Large image uploads may timeout on SSE; use HTTP for asset operations

Best Practices

  • Name your server clearly: Use af-clientname if you have multiple clients configured
  • Use Composer for multi-step tasks: Cursor's Composer mode works well with chained MCP tool calls
  • Reference resources explicitly: When working with assets, mention asset://{assetRef} directly in your prompt

On this page