Skip to main content
Back to the Grain MCP server

MCP Gateway · Claude Code

Grain icon

Connect Grain to Claude Code

The reasons behind a feature are often spoken on a customer call long before anyone writes a ticket. With Grain behind the Speakeasy MCP Gateway, Claude Code can search recorded meetings and read the exact words while it builds. Agent hooks check each prompt and tool call first, and Claude Code never holds a Grain credential.

Category
Productivity
Tools
22
Authentication
OAuth
Claude Code
CLI

Behind the MCP Gateway

Run Grain MCP behind the MCP Gateway

One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every Grain call inspected and logged.

Deploy on MCP Gateway

Set up

Add Grain to Claude Code in 4 steps

  1. 01

    Add Grain from the catalog

    An admin finds Grain in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.

    Grain uses OAuth. Servers that support dynamic client registration get their OAuth configuration applied automatically.

    Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.

  2. 02

    Choose who can use Grain

    Give teams the mcp:connect scope on the Grain server through team access or a role. The organization gateway works out each person's servers from their live access, so granting access adds Grain to their gateway on the next call, and removing it takes it away.

  3. 03

    Connect Claude Code

    Add the organization gateway as an HTTP MCP server, then authenticate from /mcp.

    Run the command below with your organization gateway URL.

    Open /mcp in Claude Code and choose Authenticate to sign in.

    claude mcp add --transport http --scope user \
      'speakeasy' \
      'https://<organization host>/mcp/gateway/<organization slug>'
  4. 04

    Sign in and use Grain from Claude Code

    The first time Claude Code connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.

    Grain needs its own OAuth grant, so each person connects it once. Until they do, Grain calls fail while the rest of the gateway keeps working.

    From then on, Grain's tools appear in Claude Code, limited to what the person's access allows, and every call lands in the gateway's tool logs.

To roll it out to a whole team, publish the server in a plugin and register the plugin marketplace in Claude Code's managed settings, so every member gets it without running the command. The device agent can also write and reapply these settings on each laptop.

Use cases

What Claude Code users do with Grain

Build from the customer's own words

Before implementing a request, have Claude Code search meeting transcripts for the topic and read the segment where the customer described what they need, speaker and context included.

search_meetings_v2fetch_meeting_transcript

Turn sync action items into tasks

After an engineering sync, Claude Code lists the meetings you attended, pulls the extracted action items with their owners and due dates, and turns yours into a checklist in the repo.

list_attended_meetingsfetch_meeting_action_items

Clip the moment a bug was reported

When a customer walks through a defect on a call, Claude Code finds the timestamp and creates a clip, so the pull request can link straight to the reproduction.

search_meetings_v2create_clip

Tools

22 tools

Each Grain tool can be allowed or denied per team and role at the MCP Gateway before Claude Code sees it.

myself

Get information about the logged-in Grain user.

list_meetings

Returns a filtered list of Grain meetings you have access to, ordered by most recent.

list_attended_meetings

Returns a filtered list of Grain meetings you have attended, ordered by most recent.

fetch_meeting

Fetches information about a single Grain meeting by ID. The response format is the same as is returned by list_meetings.

fetch_meeting_notes

Fetches the AI notes payload from a single Grain meeting by ID. In some cases, older meetings may not have had notes generated for them. In these cases you can use fetch_meeting_transcript instead to determine the content of the meeting.

fetch_meeting_action_items

Fetches the action items extracted from a single Grain meeting by ID. Action items include the task description, timestamp, status (pending or completed), due date, and the person assigned to the action item (if any).

See all 22 tools

Control

What Speakeasy can see and stop in Claude Code

The gateway covers every client the same way. The rest depends on what Claude Code exposes to Speakeasy.

Tool logs

Gateway

Every Grain call is logged with the person and the client that made it.

Access by role

Gateway

People reach only the Grain tools their team or role allows.

Request and response blocking

Gateway

A risk policy scoped to Grain can reject a tool request before it reaches the server, or withhold a result from Claude Code. MCP-scoped policies are enabled per organization.

Prompt and tool-call blocking

Claude Code

Agent hooks send each prompt and tool call to Speakeasy, which allows or denies it before Claude Code runs it.

User attribution

Claude Code

Claude Code's OpenTelemetry exporter ties each session to a named person. Without it, activity can't be attributed.

Budgets

Claude Code

Spend limits can block Claude Code traffic once a budget is reached.

Device agent and MDM

Claude Code

The device agent installs the marketplace, plugin and telemetry settings and reapplies them every minute. It deploys through MDM.

Anthropic inference hooks

Claude Code

On Claude Enterprise, prompts can be checked before inference with nothing installed on the device (beta).

  • Claude Code on the web doesn't use the laptop setup. It needs the device agent in a shared Anthropic-hosted environment.
  • Plugin marketplace URLs for Claude Code carry an access token, so share install snippets only through a private channel.

Questions

Frequently asked questions

Can a team block Claude Code from creating Grain clips?
Yes. Each of the 22 Grain tools can be allowed or denied per team at the MCP Gateway, so a team can read transcripts without create_clip or tag_meetings. Agent hooks also let Speakeasy deny a tool call before Claude Code runs it.
How do I add Grain to Claude Code for my whole team?
Publish the server in a plugin and register the plugin marketplace in Claude Code's managed settings. Every member then gets it without running the claude mcp add command, and the device agent can reapply the settings on each laptop.
How do Claude Code users get Grain?
An admin adds Grain from the Speakeasy MCP Catalog and grants access by team or role. Add the organization gateway as an HTTP MCP server, then authenticate from /mcp. Each person then sees only the Grain tools their access allows.
Are Grain calls from Claude Code logged?
Yes. Grain calls go through the MCP Gateway, which logs each tool call and attributes it to the person and the client that made it.

Connect more

Grain in other clients

AI everywhere.

Control here.