> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trygravity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dashboard MCP server for publishers

> Connect an AI agent to your publisher account. The agent can read earnings reports and manage placements.

The dashboard MCP server lets an AI agent work in your Gravity publisher account. It can read reports and do what you can do in the publisher dashboard.

> [!WARNING]
>
> Your API key gives an agent full admin access to your publisher account, including changes that affect the ads your app shows and your revenue. Read [Access and safety](#access-and-safety) before you connect one.

## Access and safety

An agent that connects with your API key acts as an admin of your publisher account. It can:

* Change placements and other publisher settings. These changes affect the ads your app shows and what you earn.
* Add and remove team members and invites.

The server carries out each call right away. It does not ask you or the agent to confirm anything first.

Your account has one API key, and every integration and agent shares it. When anyone regenerates the key, the old key stops working at once for all of them. To cut off one agent, regenerate the key and give the new key only to the integrations you want to keep. Don't paste the key into a shared chat or a shared file.

## Before you start

* A Gravity publisher account.
* The API key of the publisher account. Get it in the dashboard.
* An MCP client that can send JSON-RPC requests over HTTP POST. See "Client support" below.

## Connect

1. Get the API key of your publisher account in the dashboard.
2. Add `https://platform.trygravity.com/mcp` as an MCP server in your client.
3. Set the `X-API-Key` header to your API key.
4. Ask the client to list the tools.

You see the `publisher_*` tools, the `dashboard_*` tools for publishers, and the account tools.

## Tools for publishers

**Reporting tools** return summaries. They do not change data: `publisher_get_info`, `publisher_get_stats`, `publisher_get_activity`, `publisher_get_placements`, `publisher_get_devices`, `publisher_get_geography`, and `publisher_get_countries`.

**Dashboard tools** do the actions of the publisher dashboard. Each tool name is `dashboard_` and the name of a dashboard action. They cover placements, statistics, payouts, and publisher requirements. Call `tools/list` to get the full list for your key.

**Account tools** cover the team, organizations, support, Slack, and the Gravity Index.

## Recipes

Some publisher tasks need more than one call. The server sends these recipes to the client in its `initialize` response.

**Compare with the previous period**

Call the same metrics tool two times. Use the same length of time for each call. The second period ends when the first period starts.

**Get earnings from the Gravity Index**

Call `dashboard_list_attributions` with the side `"publisher"`.

**Export to CSV**

The tools return JSON, not CSV. The dashboard makes the CSV files for earnings and placements in the browser. Make the CSV from the JSON.

## What the server cannot do for publishers

These actions are not available with an API key:

* Change your password, two-factor authentication, or personal profile.
* Create, list, switch, or close organizations.
* Change the payout model.
* Manage publisher products.

Some connections return a URL. A person must open the URL in a browser.

File uploads have no MCP tool. Use the REST API under `https://platform.trygravity.com/dashboard`.

## Connection details

| Item | Value |
| - | - |
| URL | `https://platform.trygravity.com/mcp` |
| Other host | `https://platform.trygravity.ai/mcp` also works. |
| Method | `POST` (JSON-RPC 2.0) |
| Auth | `X-API-Key: YOUR_API_KEY`, or `Authorization: Bearer YOUR_API_KEY` |
| Protocol version | `2024-11-05` |
| Server name and version | `gravity-dashboard`, `2.0.0` |
| Batch limit | 50 messages in one request |
| Body limit | 256 KiB for each request |

Advertiser accounts and publisher accounts use the same server. The API key tells the server which account you use, and the server shows only the tools for that account type.

Every request needs the API key, also `initialize` and `tools/list`. A request without a valid key gets HTTP 401.

To test the connection without a client, send a `tools/list` request:

```bash theme={null}
curl https://platform.trygravity.com/mcp \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'
```

The response is a JSON-RPC result with a `tools` list.

> [!NOTE]
>
> This page describes version `2.0.0` of the server. Tool names and tool groups can change in a later version. Use `tools/list` to get the current names.

## Results and errors

* Each tool returns the JSON response of the dashboard action as text in `content`.
* If the dashboard action fails, the result has `isError: true` and the text `HTTP <status>: <body>`.
* A key can only get to its own account. A request for an account, organization, or publisher of a different key returns 404. One key cannot get to a different organization of the same owner.

## Client support

The server uses JSON-RPC 2.0 over HTTP POST, with protocol version `2024-11-05`. It does not use the Streamable HTTP transport or Server-Sent Events. Some MCP clients need one of these transports and cannot connect.

Gravity has not tested specific MCP clients with this server. Before you rely on a client, connect it and do a `tools/list` call.

## Troubleshoot

| Problem | Cause | Fix |
| - | - | - |
| HTTP 401, "Not authenticated" | The request has no API key, or the key is not valid. | Send the key in `X-API-Key`. Make sure that nobody regenerated the key. |
| HTTP 404 from a tool | The ID belongs to a different account or organization. | Use an ID from your own account. |
| HTTP 413, "Request too large" or "Batch too large" | The body is larger than 256 KiB, or the batch has more than 50 messages. | Send smaller requests. |
| The client cannot connect | The client needs Streamable HTTP or Server-Sent Events. | Use a client that sends JSON-RPC over HTTP POST. |
| A tool is not in the list | The tool is for the other account type, or the tool name changed. | Use a key of the correct account type. Call `tools/list` again. |

## Related pages

* [Dashboard MCP server for advertisers](https://docs.trygravity.com/advertisers/dashboard-mcp.md) uses the same server with an advertiser key.
* [Publisher Dashboard API](https://docs.trygravity.com/ai-platforms/dashboard-api.md) gives the same data over REST.
* [Docs MCP server](https://docs.trygravity.com/agents/docs-mcp.md) searches the docs. It cannot read or change your account.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.