1. Create the configuration file
2. Add the Grain server
Paste this intomcp.json:
client_id, a secret, or an Authorization header.
3. Reload and authorize
Open Cursor Settings → MCP (or Settings → Tools & MCP, depending on the version). The list shows grain with an Authorize button. Click it. Cursor opens the Grain consent screen in your browser. Pick the workspace, read the scopes, and click Authorize. A workspace on the consent screen is a tenant. Back in Cursor, the grain server shows a green “Connected” state and a tool count. The count is 11 tools when you grant all scopes.4. Ask the agent a question
Open the Cursor chat or Composer and ask, for example, “@grain What is my top traffic source for the landing page I am editing?”. Cursor callsgrain.query. Because Cursor knows the file you
are in, it can filter by the correct page property.
The @grain prefix tells Cursor that you want the Grain tools. Cursor picks the tool on its
own in most cases. The prefix reduces round trips on an ambiguous question. The Cursor
documentation on MCP is at cursor.com/docs/context/mcp.
Project rule
A short project rule routes analytics questions to Grain without the tool names in every prompt. The rule is optional. Create.cursor/rules.md:
What the assistant can do
Read Tools for every tool.