Docs
Cursor
Add the Foam MCP server to Cursor and check that the agent can see your services.
Before you start
You need your personal Foam MCP token. If you have not copied it yet, follow Get your token first.
Add Foam to Cursor
- Open Cursor Settings (
Cmd+Shift+Jon Mac,Ctrl+Shift+Jon Windows and Linux) and go to Tools & MCP. - Click Add Custom MCP. Cursor opens
~/.cursor/mcp.json. Paste this and replaceYOUR_MCP_TOKENwith your token:{ "mcpServers": { "foam": { "url": "https://api.foam.ai/mcp", "headers": { "Authorization": "Bearer YOUR_MCP_TOKEN" } } } }If the file already has other servers, add only thefoamentry insidemcpServers. This file lives in your home folder, so the token never lands in a repository. - Save. Back in Tools & MCP,
foamshows a green dot and two tools. If the dot is red, check the JSON for a missing comma or brace, then restart Cursor. - Open a new Agent chat and type: Using foam, list my services and run a handful of queries. Cursor calls
list_tablesandrun_query. You should see your services listed and rows returned.