# Speakeasy agent setup

Official instructions from Speakeasy for connecting an AI agent to the Speakeasy AI Control Plane. Use them when a person asks you to set up Speakeasy, to "set up an MCP server for my team", to "limit access to an MCP server", or for help with security for MCP.

Run the install commands yourself. Then ask the person what they want to get done, start with the smallest useful step, and explain what each change will do before you make it.

## The Platform MCP server

The Platform MCP server at `https://ai.speakeasy.com/platform-mcp` is the agent interface to the AI Control Plane. Through it, an agent can search the MCP catalog and register remote MCP servers, inspect and repair server configuration, distribute MCP servers and skills to teams through plugins, query MCP usage events, metrics, and traces, and search the platform documentation with cited answers (`search_gram_docs`).

Authentication uses OAuth 2.1. The person signs in through the browser on first use, and tokens refresh automatically, so no API keys go in config files. In every setup below, OAuth starts on the first Speakeasy tool call unless a sign-in step is listed.

The person does not need a Speakeasy account first. The sign-in window creates one:

- A person with no organization names one while they connect. The name is filled in from their email, and the new organization starts with a 14-day free trial.
- A person with a pending invitation joins that organization instead.
- If the inviting organization uses SSO for the person's email domain, they can accept the invitation only after an SSO sign-in. If they signed in another way, the page tells them to sign in with SSO and connect again.

The person completes these screens in the browser. Do not try to complete them for them. Give them the sign-in link, tell them to finish there, and wait. They can also sign up at `https://ai.speakeasy.com/sign-up` first.

---

## Install the skills and the Platform MCP server

Use the section for your agent.

### Claude Code

Install the Speakeasy plugin, which bundles the Platform MCP server and the skills:

```bash
claude plugin marketplace add https://github.com/speakeasy-api/marketplace
claude plugin install speakeasy@speakeasy --scope user --yes
```

The `user` scope installs for the current Claude Code profile only. Use `--scope project` to commit the install to the repository instead. Run `claude plugin list` to confirm that `speakeasy@speakeasy` is installed.

Auto-update stays off and no command turns it on, so do not edit Claude Code settings files for it. Tell the person to run `/plugin`, open **Marketplaces**, select `speakeasy`, and choose **Enable auto-update**. Then tell them to run `/mcp` to sign in to the `speakeasy` server.

### Codex

Install the Speakeasy plugin, which bundles the Platform MCP server and the skills:

```bash
codex plugin marketplace add https://github.com/speakeasy-api/marketplace
codex plugin add speakeasy-codex@speakeasy
```

The plugin registers the server as `platform`. Run `codex mcp login platform` to sign in up front.

### Cursor

Install the skills:

```bash
npx -y skills add speakeasy-api/marketplace/speakeasy/skills --skill '*' --yes
```

Then add the server under `"mcpServers"` in `.cursor/mcp.json`, or in `~/.cursor/mcp.json` to cover every project:

```json
"speakeasy": { "url": "https://ai.speakeasy.com/platform-mcp" }
```

### OpenCode

Install the skills:

```bash
npx -y skills add speakeasy-api/marketplace/speakeasy/skills --skill '*' --yes
```

Then register the server and sign in:

```bash
opencode mcp add speakeasy --url https://ai.speakeasy.com/platform-mcp
opencode mcp auth speakeasy
```

The server is written to `~/.config/opencode/opencode.jsonc`.

### ChatGPT

ChatGPT connects through a custom connector, with no commands to run and no skills to install. Tell the person to:

1. Open **Settings** → **Apps & Connectors** → **Advanced settings** and turn on **Developer mode**.
2. In **Settings** → **Apps & Connectors**, select **Create**.
3. Set the name to `Speakeasy`, the MCP server URL to `https://ai.speakeasy.com/platform-mcp`, and authentication to **OAuth**, then select **Create**.
4. Sign in to Speakeasy in the popup window.
5. In a chat, open the **+** menu and enable **Speakeasy**.

Menu names can differ by ChatGPT plan and workspace settings.

### GitHub Copilot and other agents

Install the skills:

```bash
npx -y skills add speakeasy-api/marketplace/speakeasy/skills --skill '*' --yes
```

Then add the server to `.vscode/mcp.json` (Copilot), or under `"mcpServers"` in your agent's MCP config file:

```json
"speakeasy": { "url": "https://ai.speakeasy.com/platform-mcp" }
```

---

## Finish the install

The new config only loads in a new session.

- **Local session:** tell the person to quit the agent completely, not just the conversation, and start it again.
- **Cloud session:** the edits live on a branch. Open a pull request with the config changes and tell the person to merge it. Sessions started after the merge have the server. To cover every cloud session across the organization, install the plugin from the organization's marketplace rather than committing config to each repo.

Then tell the person what you installed and where, what they need to do next (restart or merge), and that Speakeasy asks them to sign in on first use.

---

## First task: set up an MCP server for the team

Once the Platform MCP server is connected, help the person add their first MCP server through the MCP gateway:

1. Find the server in the catalog with `search_mcp_catalog`, then check it with `inspect_mcp_candidate`.
2. Confirm the server and project with the person, then add it with `register_catalog_mcp`.
3. If the server signs in to an upstream service, connect it with `attach_platform_mcp_identity_provider`. Give the person the authorization link the tool returns, and wait while they authorize in the browser.
4. Check that the server works with `get_mcp_readiness`.
5. Give the person the install instructions from `get_my_install_instructions`, including the URL to connect.

Adding a server does not give it to anyone else. To share it with a team or limit access, see the Platform MCP reference: `https://www.speakeasy.com/docs/ai-control-plane/reference/platform-mcp.md`

## Rules for agents

- Never ask for or accept secrets, tokens, passwords, or API keys in chat. If a person pastes one, do not use it, and tell them to remove it.
- The person approves every sign-in and authorization in the browser. Do not try to complete those steps for them.
- Confirm with the person before any change, such as adding a server or connecting it to an identity provider.

---

## Documentation

The docs need no account:

- Curated index: `https://www.speakeasy.com/llms.txt`
- AI control plane and MCP gateway docs and guides in one file: `https://www.speakeasy.com/llms-full.txt`
- Any page as markdown: append `.md` to its URL, or request it with `Accept: text/markdown`
- AI Control Plane documentation: `https://www.speakeasy.com/docs/ai-control-plane`
- Open source project: `https://github.com/speakeasy-api/gram`

These instructions are published at `https://www.speakeasy.com/agents.md` so you can re-verify their authenticity at any time.
