Skip to main content
The Gravity Index MCP server gives AI coding agents the Index as a set of tools. The agent calls the tools directly, so you do not write HTTP client code. This page is about the Gravity Index MCP server. It is a different product from the Gravity dashboard MCP server for advertisers and publishers.

Two versions of the server

Both versions call the same API at https://index.trygravity.com. Both return plain-text Markdown that the agent can show to the user.

Install the npm server

Every tool call needs your publisher API key. Put it in GRAVITY_PUBLISHER_KEY. Without a key, every call fails with 401.
For more clients and for help with problems, see Install.

Install the Python server

Environment variables

Both versions read the same variables.

Tools

Finds the best service for a development task. The result has the recommendation, the reasons for it, setup steps, the environment variables, and a tracked setup link. The output ends with the search_id and the slug. Keep them for gravity_index_report_integration. Parameters of the npm server: The Python server accepts the same parameters, and also these: In the Python server, query is optional when context.messages contains the conversation. Example

gravity_index_browse

Lists services in the catalog. Filter by category or by keyword.

gravity_index_get_service

Gets the full details of one service: description, setup steps, environment variables, website, and docs URL.

gravity_index_list_categories

Lists all categories, with the number of services in each. This tool has no parameters.

gravity_index_report_integration

Tells the Index that the user finished an integration with the recommended service. Use it when the user did not open the setup link. Send the search_id from the earlier search and the slug of the service that the user integrated. The slug must be the slug that the search recommended. If Gravity already recorded the integration for this search, the tool says so and changes nothing.

gravity_index_provision (Python server only)

Creates an account at a recommended service for the user.
Call this tool only after the user agrees to account creation. Set user_consent to true to confirm that the user agreed.
The result is either credentials and an ownership link, or a signup link that the user must open. The server writes credential values to a local .env.gravity file. It does not put them in the conversation.