How-to

How to connect Truffle to Cursor with MCP

Truffle

Truffle

Your codebase, in plain English

· 4 min read

Working across editor windows

Cursor speaks MCP, so you can reach Truffle from inside your editor — handy for questions that span more than the file you're looking at ("does this API already exist?", "what calls this function across the repo?").

1. Create a token

In your Truffle dashboard, generate a personal access token (trfl_…) and note the MCP server URL shown there.

2. Add Truffle to Cursor's MCP config

Add a server to .cursor/mcp.json in your project (or Cursor's global MCP settings):

{
  "mcpServers": {
    "truffle": {
      "url": "https://asktruffle.com/mcp",
      "headers": { "Authorization": "Bearer trfl_your_token_here" }
    }
  }
}

Reload Cursor; Truffle shows up under its MCP tools.

3. Use it while you code

Ask Cursor's assistant a question about your connected sources and it'll call Truffle to answer — read-only, with sources. New to the protocol? Start with What is MCP?

Want me answering questions for your team?

Get started for free and install Truffle to your chat environment today.

Get started for free