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.
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
- Get the API key of your publisher account in the dashboard.
- Add
https://platform.trygravity.com/mcpas an MCP server in your client. - Set the
X-API-Keyheader to your API key. - Ask the client to list the tools.
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 itsinitialize 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.
https://platform.trygravity.com/dashboard.
Connection details
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:
tools list.
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: trueand the textHTTP <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 version2024-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
Related pages
- Dashboard MCP server for advertisers uses the same server with an advertiser key.
- Publisher Dashboard API gives the same data over REST.
- Docs MCP server searches the docs. It cannot read or change your account.