Skip to Content
Docs
AI tools

Grok Build (formerly Cursor)

Add the MCP server to Grok Build (formerly Cursor) with a button, sign in with your account, or use mcp.json.

Grok Build (formerly Cursor) signs in to the AffFast server with your AffFast account. You need no API key. Grok Build registers itself as a public client (dynamic client registration) and then uses the authorization code flow with PKCE. You can also use an API key in mcp.json. The file can use ${env:NAME} in the url and in the headers, so the file does not hold the key.

Install with the button

  1. Open this link: Add to Grok Build. In the dashboard, open AI and select Install in Grok Build.
  2. Grok Build shows the server. Check the URL and select Install.
  3. Grok Build opens your browser. Sign in to AffFast. On the consent page, select a workspace, a mode and the access. The page shows the name "Cursor" as "Not verified", because Grok Build registered itself. It also shows the host where Grok Build gets the code (localhost:8787 or www.cursor.com). Check it and select Allow.

The link has the name of the server and a Base64 copy of this configuration. It has no key:

{ "url": "https://api.afffast.com/mcp" }

Install with a file

Add the server to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for all projects. This shape signs in with OAuth:

{
  "mcpServers": {
    "AffFast": { "url": "https://api.afffast.com/mcp" }
  }
}

Use an API key

For a script or a machine with no browser, send an API key. Put the key in an environment variable, and start Grok Build from a shell that has it. On macOS, you can also set the variable for the desktop with launchctl setenv AFFFAST_API_KEY "sk_test_..." and restart Grok Build.

export AFFFAST_API_KEY="sk_test_..."
{
  "mcpServers": {
    "AffFast": {
      "url": "https://api.afffast.com/mcp",
      "headers": { "Authorization": "Bearer ${env:AFFFAST_API_KEY}" }
    }
  }
}

When a server offers OAuth, Grok Build can start the sign-in and not send the Authorization header (a known error of Cursor 3.5.17, reported on 2026-05-22). We did not test the key method with a current Grok Build. If it fails with a sign-in error, use the OAuth sign-in.

Check that it works

  1. Open the Output panel (Cmd+Shift+U on macOS). Select MCP Logs.
  2. Look for the connection of AffFast. The log shows an error if the connection fails.
  3. In a chat, look at the available tools. The tools of the server must be there. Grok Build asks you to approve a tool call.

Example prompts

  • "Use the AffFast tools to list my networks and their connection status."
  • "Show the revenue by program for the last 30 days."
  • "Make a test conversion for the newest test click, then show it in the list of conversions."

Troubleshooting

  • The sign-in does not finish. Open the Output panel and select MCP Logs. Select the server again and start the sign-in once more. The server allows 5 registrations in 10 minutes for each IP address. Wait and try again after a 429 error.
  • The consent page says "AI apps are off in this workspace". An owner or an admin must turn on Allow AI apps in the workspace settings.
  • The server shows a 401 when you use a key. The variable AFFFAST_API_KEY is not set in the process that started Grok Build. Quit Grok Build. Start it from a shell where the variable is set.
  • The tools are missing. With a key, the key decides the tools. A read-only key has no write tools. With a sign-in, the access that you selected decides the tools.
  • The link does not open Grok Build. Install Grok Build first. Or use the file method.
  • A 429 error. Wait for the time in Retry-After.

Security

  • Check the host on the consent page. Allow only a connection that you started.
  • To stop Grok Build, disconnect it in the AI page of the dashboard. It stops at once.
  • Never paste a key into a chat. Use the environment variable.
  • Start with a test key. A test key reads and writes test data only.
  • Use a read-only key if the tool must only read.
  • A key in .cursor/mcp.json goes into your repository. Use ${env:AFFFAST_API_KEY} only.

On this page