---
title: 'flexkit mcp'
description: "Connect Claude Code, Cursor, VS Code, Windsurf and Claude Desktop to Flexkit's MCP server."
---

# `flexkit mcp`

Connects AI clients to Flexkit's hosted [MCP server](/docs/integrations/mcp), so their agents can search your schema, read and change records, search Knowledge and use your skills, automations and plugins, with your own role and space memberships.

The client signs in with your Flexkit account (OAuth) the first time it connects. Nothing secret is written to its configuration: the entry holds only the server URL, so a project-level config file can be committed.

## Synopsis

```bash
flexkit mcp <subcommand> [options]
```

Without a subcommand, `flexkit mcp` runs `flexkit mcp url`.

## Choose what the connection reaches

Both subcommands build the URL from the same options:

| Options       | URL                                         | Reaches                                |
| ------------- | ------------------------------------------- | -------------------------------------- |
| _(none)_      | `https://mcp.flexkit.io/TEAM_ID/PROJECT_ID` | The project. Recommended.              |
| `--team`      | `https://mcp.flexkit.io/TEAM_ID`            | Your projects in the project's team.   |
| `--account`   | `https://mcp.flexkit.io`                    | Every project you are a member of.     |
| `--read-only` | adds `?read_only=true`                      | Leaves out the tools that change data. |

Read-only is a setting of the connection, not a restriction of your account; see [Read-only connections](/docs/integrations/mcp#read-only-connections).

## `mcp url`

Prints the MCP server URL on stdout, ready to paste into any client that supports remote MCP servers over Streamable HTTP.

```bash
flexkit mcp url [--team | --account] [--read-only] [--json] [--project <id>]
```

### Examples

```bash
# URL of the linked project
flexkit mcp url

# Read-only URL of another project
flexkit mcp url --project abcdefghij --read-only

# URL that reaches all your projects
flexkit mcp url --account

# Copy it to the clipboard (macOS)
flexkit mcp url | pbcopy
```

## `mcp install`

Adds the server to a client. Alias: `add`.

```bash
flexkit mcp install [--client <name>] [--scope <scope>] [--name <name>] [--dry-run] [--yes] [--team | --account] [--read-only] [--project <id>]
```

| Client           | What `install` does                                                                                           | `--scope`                            |
| ---------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `claude-code`    | Runs `claude mcp add --transport http --scope <scope> flexkit <url>` in the current folder.                   | `local` (default), `project`, `user` |
| `cursor`         | Adds `{ "url": … }` under `mcpServers` in `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (user).        | `project` (default), `user`          |
| `vscode`         | Adds `{ "type": "http", "url": … }` under `servers` in `.vscode/mcp.json` (project) or the user `mcp.json`.   | `project` (default), `user`          |
| `windsurf`       | Adds `{ "serverUrl": … }` under `mcpServers` in `~/.codeium/windsurf/mcp_config.json`.                        | `user`                               |
| `claude-desktop` | Prints the steps to add a custom connector in Settings → Connectors, which is how Claude adds remote servers. | —                                    |

The CLI merges the entry into the existing file and keeps every other server and setting. When a server with the same name exists with a different URL, it asks before replacing it (`--yes` replaces it without asking, `--name` adds the server under another name). A file that isn't plain JSON, for example one with comments, is left untouched; add the entry printed by `--dry-run` yourself. `--dry-run` prints the command or the resulting file without changing anything.

After installing, start or reload the client and sign in to Flexkit when it asks. In Claude Code, run `/mcp` to sign in.

### Examples

```bash
# Add the linked project to Claude Code
flexkit mcp install --client claude-code

# Add it to this workspace in Cursor
flexkit mcp install --client cursor

# Preview the change to the VS Code user config
flexkit mcp install --client vscode --scope user --dry-run

# Add a read-only connection to all your projects in Windsurf
flexkit mcp install --client windsurf --account --read-only --name flexkit-ro
```

## Options

| Option                 | Description                                                                                              |
| ---------------------- | -------------------------------------------------------------------------------------------------------- |
| `--team`               | Reach every project of the project's team.                                                               |
| `--account`            | Reach every project you are a member of.                                                                 |
| `--read-only`          | Leave out the tools that change project data.                                                            |
| `--client <name>`      | `install`: `claude-code`, `claude-desktop`, `cursor`, `vscode` or `windsurf`. Prompted for when omitted. |
| `--scope <scope>`      | `install`: where to add the server (see the table above).                                                |
| `--name <name>`        | `install`: server name in the client. Defaults to `flexkit`.                                             |
| `--dry-run`            | `install`: print the command or config change without applying it.                                       |
| `-y`, `--yes`          | `install`: replace an existing server with the same name without asking.                                 |
| `--json`               | `url`: print the URL with its team and project ids as JSON.                                              |
| `-p`, `--project <id>` | Project the URL points to. Defaults to the [linked project](/docs/cli/link).                             |

You can also use all [global options](/docs/cli/global-options).

The CLI finds the project's team in `.flexkit/project.json` when [`flexkit link`](/docs/cli/link) recorded it, and otherwise asks your account, which needs a session from [`flexkit login`](/docs/cli/login). `--account` needs neither.

## Notes

- Changes made through MCP ask for your approval in the client. That needs a client with MCP elicitation, such as Claude Code; other clients can read data but Flexkit refuses their changes. See [Approving changes](/docs/integrations/mcp#approving-changes).
- Revoke a client you no longer use in the Dashboard under your project's **API → MCP**, and remove it from the client.
- Plugin tools reach MCP clients through the accounts you connected; manage them with [`flexkit plugins`](/docs/cli/plugins).


---

[View full sitemap](/docs/sitemap.md)
