MCP Server
Manage your Grivn deep links from an AI assistant. Grivn runs a remote Model Context Protocol (MCP) server that Claude Code, Claude, Cursor and other MCP clients connect to directly.
What it does
Once connected, your assistant can, on your behalf:
- list your projects and their deep links;
- create, read, update and delete deep links;
- on projects on the Growth plan or above, answer questions about clicks: totals and trend, top links, devices, countries, UTM campaigns and referrers.
It acts as the account that owns the key: it sees what that account can see, and nothing else.
Connection details
| Endpoint | https://www.grivn.com/mcp/ |
|---|---|
| Transport | Streamable HTTP |
| Authentication | Request header X-API-Key with a secret API key (grivn_sk_…) |
1. Create a secret key
Sign in, open Settings → API Keys, and create a Secret key. Copy it when it is shown. The MCP server accepts secret keys only: a publishable key (grivn_pk_…), the kind that goes in your app, is refused.
No account yet? Start free. The Hacker plan includes the basic tools.
2. Add Grivn to your client
In each snippet, replace YOUR_SECRET_KEY with your secret key.
Claude Code
Run in your terminal:
claude mcp add --transport http grivn-deeplink https://www.grivn.com/mcp/ \
--header "X-API-Key: YOUR_SECRET_KEY"Then ask Claude Code to list my Grivn projects, or run /mcp to check the connection.
Cursor
Add to .cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"grivn-deeplink": {
"url": "https://www.grivn.com/mcp/",
"headers": {
"X-API-Key": "YOUR_SECRET_KEY"
}
}
}
}Cursor can read the key from an environment variable instead: "X-API-Key": "${env:GRIVN_SECRET_KEY}".
Claude (desktop app and claude.ai)
Claude adds remote servers as custom connectors in your account's settings, not in claude_desktop_config.json:
- Open Customize → Connectors (Pro and Max). On Team and Enterprise, an Owner opens Organization settings → Connectors.
- Add a custom connector with the URL https://www.grivn.com/mcp/
- For authentication, choose No sign in.
- Under Request headers, add X-API-Key with your secret key.
On Team and Enterprise, everyone in the organization who uses the connector acts as the Grivn account whose key it holds. Use a key from an account that should be shared that way. See Anthropic's guide to custom connectors.
Other MCP clients
Any client that supports remote servers over Streamable HTTP with a custom header works: use the endpoint above and send X-API-Key on every request.
Available tools
Basic tools (every plan)
| Tool | Description | Required |
|---|---|---|
list_projects | List projects accessible to the authenticated user | — |
list_deeplinks | List deeplinks with pagination, optionally filtered by project | — |
create_deeplink | Create a new deeplink | project_id, name, link |
get_deeplink | Get a deeplink by ID | id |
update_deeplink | Update an existing deeplink | id |
delete_deeplink | Delete a deeplink by ID | id |
Analytics tools (Growth and Pro)
These work on projects on the Growth plan or above: a team project goes by its team's plan, a personal project by yours. On other projects the tool answers with an error that says so.
| Tool | Description | Required |
|---|---|---|
get_analytics_overview | Get project click analytics overview (total clicks, unique visitors, device breakdown, trend) | project_id |
get_click_trend | Get click trend data over time (daily breakdown) | project_id |
get_top_deeplinks | Get top deeplinks ranked by click count | project_id |
get_device_breakdown | Get device type / OS / browser distribution for clicks | project_id |
get_geo_breakdown | Get geographic distribution of clicks by country | project_id |
get_utm_breakdown | Get UTM source / medium / campaign distribution of clicks | project_id |
get_referer_breakdown | Get referer domain distribution of clicks | project_id |
Keep your key safe
- A secret key can change your account's links. Keep it on your own machine or server: never in a mobile app, a web page, or a code repository.
- Prefer an environment variable or your client's secret storage to pasting the key into a shared file.
- If a key leaks, delete it in Settings → API Keys. It stops working at once; create a new one.
Troubleshooting
| Response | Meaning |
|---|---|
| 401 Unauthorized | No X-API-Key header, the key is unknown or deleted, or its account is disabled. |
| 403 CREDENTIAL_NOT_ALLOWED | The credential isn't a secret key: a publishable key (grivn_pk_…) or a dashboard session. Create a secret key and use that. |
| Claude Code: “Dynamic Client Registration”, or asks you to sign in | The 401 above, as Claude Code shows it: it tries to sign in with OAuth, which Grivn doesn't use. Check the header with claude mcp get grivn-deeplink and use a current secret key. |
| 429 Too Many Requests | Too many requests from one IP address in a short time. Wait a moment and retry. |
| “requires this project to be on the Growth plan or above” | An analytics tool was called on a project on the Hacker plan. |
Make sure the address is exactly https://www.grivn.com/mcp/, with the trailing slash.