How to connect Truffle to Claude with MCP
Truffle
Your codebase, in plain English
· 4 min read
Truffle runs an MCP server, so Claude can talk to it directly — you ask Claude a question about your codebase or docs, and it uses Truffle to answer, grounded in your connected sources.
1. Get a personal access token
In your Truffle dashboard, create a personal access token (it starts with trfl_). Copy it — you'll paste it into Claude's config. Your dashboard also shows Truffle's MCP server URL.
2. Add Truffle as an MCP server in Claude
Add an entry to your Claude MCP configuration pointing at Truffle's URL, with your token as a bearer credential:
{
"mcpServers": {
"truffle": {
"url": "https://asktruffle.com/mcp",
"headers": { "Authorization": "Bearer trfl_your_token_here" }
}
}
}
(Use the exact URL shown in your dashboard.) Restart Claude so it picks up the new server.
3. Ask away
Claude will now list a Truffle tool. Ask it something only your sources would know — "has the double-charge bug been fixed?", "where do we handle refunds?" — and it answers through Truffle, with the code and docs behind it. Prefer Cursor? See How to connect Truffle to Cursor.