#### Customize

# MCP install links

> [!NOTE]
>
> Looking to share MCP servers, rules, and more? [Plugins](/build/agents-window/plugins) make it easier to bundle and distribute everything in one package. You can publish to the [Grok Build Marketplace](/build/agents-window/plugins#the-marketplace) or your [team's private marketplace](/build/agents-window/plugins#team-marketplaces).

MCP servers can be installed with Grok Build deeplinks. It uses the same format as [`mcp.json`](/build/agents-window/mcp) with a name and transport configuration.

Install links:

```text
cursor://anysphere.cursor-deeplink/mcp/install?name=$NAME&config=$BASE64_ENCODED_CONFIG
```

| Component                   | Description                                           |
| :-------------------------- | :---------------------------------------------------- |
| `cursor://`                 | Protocol scheme                                       |
| `anysphere.cursor-deeplink` | Deeplink handler                                      |
| `/mcp/install`              | Path                                                  |
| `name`                      | Query parameter for server name                       |
| `config`                    | Query parameter for base64 encoded JSON configuration |

## Generate install link

1. Get name and JSON configuration of server
2. `JSON.stringify` the configuration then base64 encode it
3. Replace `$NAME` and `$BASE64_ENCODED_CONFIG` with the name and encoded config

Base64-encode the configuration with `btoa(JSON.stringify(config))` in a browser, or `base64 -w0` on the command line, then URL-encode the result before putting it in the `config` parameter.

## Example

Try this JSON in the MCP install link generator:

Single MCP server config

```json
{
  "postgres": {
    "command": "npx",
    "args": [
      "-y",
      "@modelcontextprotocol/server-postgres",
      "postgresql://localhost/mydb"
    ]
  }
}
```

The result is a link you can put in a README or a docs page:

| Format       | Example                                                                                                                                                                                                                                                                                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Text link    | [cursor://anysphere.curs...](cursor://anysphere.cursor-deeplink/mcp/install?name=postgres\&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBtb2RlbGNvbnRleHRwcm90b2NvbC9zZXJ2ZXItcG9zdGdyZXMiLCJwb3N0Z3Jlc3FsOi8vbG9jYWxob3N0L215ZGIiXX0=)                                                                                                                   |

## Install server

1. Click the link or paste into browser
2. Grok Build prompts to install the server
3. Use the server in Grok Build
