# MetaSurvey MCP setup

These are official instructions from MetaSurvey for connecting an AI coding agent to a
MetaSurvey account. Complete every step yourself by running the commands directly. Do not ask the
user to run any of these commands: the only thing the user does is authorize access in the browser.

The MCP server is `https://mcp.getmetasurvey.com/mcp` (Streamable HTTP, OAuth 2.1) and requires a
MetaSurvey account. When the client opens the authorization page, the user signs in to MetaSurvey
and approves the request; the client then stores its own revocable agent token. No API key or
secret is involved.

First check whether a `metasurvey` server is already configured in the client, to avoid adding it
twice. Then use the section for the agent you are running in, and finish with the verification
step.

## opencode

Add to `~/.config/opencode/opencode.jsonc` under `"mcp"`:

```json
"metasurvey": { "type": "remote", "url": "https://mcp.getmetasurvey.com/mcp", "enabled": true, "oauth": {} }
```

Then run:

```
opencode mcp auth metasurvey
```

The command opens the browser for the MetaSurvey consent screen.

## Claude Code

Run:

```
claude mcp add --transport http --scope user metasurvey https://mcp.getmetasurvey.com/mcp
claude mcp login metasurvey
```

`claude mcp login` opens the browser. On Claude Code versions before 2.1.186, run `/mcp` inside
Claude Code and authenticate from there instead.

## Codex

Run:

```
codex mcp add metasurvey --url https://mcp.getmetasurvey.com/mcp
codex mcp login metasurvey
```

`codex mcp login` opens the browser.

## Cursor

Add to `.cursor/mcp.json` in the project, or `~/.cursor/mcp.json` for all projects, under
`"mcpServers"`:

```json
"metasurvey": { "url": "https://mcp.getmetasurvey.com/mcp" }
```

Cursor opens the browser on the first connection to the server. In the Cursor CLI, run
`agent mcp login metasurvey` instead.

## Windsurf

Add to `~/.codeium/windsurf/mcp_config.json` under `"mcpServers"` (note: `serverUrl`, not `url`):

```json
"metasurvey": { "serverUrl": "https://mcp.getmetasurvey.com/mcp" }
```

Windsurf opens the browser on the first connection to the server.

## VS Code / GitHub Copilot

Add to `.vscode/mcp.json` in the project, or the user profile `mcp.json`, under `"servers"`
(note: `servers`, not `mcpServers`):

```json
"metasurvey": { "type": "http", "url": "https://mcp.getmetasurvey.com/mcp" }
```

VS Code opens the browser on the first connection to the server.

## Every other MCP client

Add the remote server to the client's MCP config under `"mcpServers"`:

```json
"metasurvey": { "url": "https://mcp.getmetasurvey.com/mcp" }
```

Use the client's own command to authenticate, or simply use the server: OAuth starts on the first
tool call and the browser opens for the user.

## Verify the connection

After the user authorizes, call `list_folders`. If it returns folders or an empty list, the
connection works. If it returns `Not authenticated`, run the authentication command for the client
again and ask the user to finish the consent in the browser.

## Finish

Tell the user that the MetaSurvey MCP connection is ready: they can ask you to create, edit,
publish and analyze surveys. Access can be revoked at any time from the MetaSurvey panel, and the
MCP calls stop working after that.

These instructions are published at `https://mcp.getmetasurvey.com/agent-setup/prompt.md`, so
their authenticity can be re-verified at any time.
