Skip to main content
The Grain MCP server works with every Claude surface: the web app, the desktop app, and the Claude Code CLI. The OAuth flow is the same on each one. You need an active Grain tenant and a Claude plan that supports custom connectors. Custom connectors are available on Claude Free, Pro, Max, Team, and Enterprise. A Free account is limited to one custom connector.

1. Open the connector settings

In Claude, click your profile, then Settings → Connectors. On the Team and Enterprise plans, an owner adds the connector for the organization under Organization settings → Connectors. Members then connect one by one.

2. Add a custom connector

Click + Add connector, then Add custom connector. On Team and Enterprise the path is Add → Custom → Web.

3. Paste the Grain endpoint

Do not change Advanced settings. Grain registers the client with RFC 7591 Dynamic Client Registration. You do not enter a client ID or a secret.

4. Authorize in the browser

Claude opens the Grain consent screen. Pick the workspace that Claude will see, read the scopes, and click Authorize. A workspace on the consent screen is a tenant. A 7-day preview of the tenant shows what you share. Then you return to Claude with the connector enabled.

5. Turn it on in a chat

In a conversation, click the + button, open Connectors, and switch Grain on. Then ask a question, for example “What were my top 5 traffic sources last week?”. Claude calls grain.query, describes the result, and cites the rows it used.
The first tool call of a new session is the slowest. Claude discovers the tool surface on that call. Later calls are faster.

Claude Code

Claude Code has a CLI for MCP servers. One command adds the Grain server.
  1. Install Claude Code. If you have it, make sure that you have a recent version. Remote HTTP transport is a recent addition.
  2. Add the Grain server.
    Add --scope user to make Grain available in every project. Add --scope project to write the connection to .mcp.json for your team.
  3. Authenticate. Inside Claude Code, run /mcp, select grain, then Authenticate. The CLI opens the Grain consent screen in your browser. Approve the tenant. Then control returns to the terminal.
  4. Ask Claude Code a question that needs Grain data, for example “Which pages had the biggest drop in conversions this week versus last?”. Claude Code picks the tool (grain.query.compare or grain.segment.compare), runs it, and summarizes the result.
These commands manage the server:
list shows every server. get grain shows the Grain server. remove grain deletes it. The Claude Code documentation on MCP is at code.claude.com/docs/en/mcp.

What the assistant can do

With all three scopes granted, Claude has eleven tools. These prompts are a good start: The digest result includes the Grain surprise hints (concentration, volatility, rank changes), so the summary names anomalies, not only numbers. Run the tracking audit before an investigation, so that you know the data is complete. Read Tools for every tool.

Troubleshooting