Skip to main content
Pick the surface that fits how you code. Production calls require a publisher key so searches, setup links, and completed integrations attribute back to the embedding platform. If you’re evaluating the Index, ask Gravity for a publisher key first.
The Gravity Index ships as an MCP server so your agent can call it as a native tool — no HTTP client code, no prompt engineering.

One-liner install (npm)

The npm wrapper is zero-dependency and runs via npx. No Python, no clone, no build.
Package: @gravity-ai/index-mcp · Source: sdk-js/packages/index-mcp

Python alternative

If you already have uv / Python 3.12 and prefer to run from source:
Source: index/mcp/gravity_index_mcp.py

Restart your agent

After adding the server, restart Cursor / Claude / Windsurf. You should see 5 new tools:
  • gravity_index_search — LLM-driven “I need X” query
  • gravity_index_browse — list services, filter by category, tag search
  • gravity_index_list_categories — enumerate all 22 categories with counts
  • gravity_index_get_service — deep lookup by slug
  • gravity_index_report_integration — tell the Index a user finished an integration

Test it

Ask your agent something like: “I need to add email sending to my Next.js app — search the Gravity Index for options.”

Bash CLI

Search the Index from your terminal. Useful for shell scripts, CI, or quick ad-hoc queries. The standalone CLI currently ships from the Gravity repo, so use this path if you have repo access; public agent integrations should use the npm MCP server above.

Install

Requires Python 3.9+.

Use

Returns color-formatted terminal output with the recommendation, reasoning, install steps, env vars needed, and a conversion URL.

Direct API

If you’re building your own agent or want to call the Index from any language, it’s a plain REST API at https://index.trygravity.ai.
Full API reference: /gravity-index/search and /gravity-index/catalog.

Publisher attribution

If you’re a platform publisher embedding the Gravity Index in your own AI app, set a GRAVITY_PUBLISHER_KEY so requests and completed integrations from your users attribute to your account. For best attribution and payout matching, send stable per-user/session metadata on every /search call:
Get your publisher key →

Troubleshooting

Make sure you have Node 18+ installed: node -v. Then try a manual pre-install: npm install -g @gravity-ai/index-mcp && which gravity-index-mcp.If that works, replace the npx command in your config with the absolute path.
Check the MCP server logs:
  • Claude Desktop: ~/Library/Logs/Claude/mcp*.log (macOS)
  • Cursor: Settings → MCP → check status next to gravity-index
  • Claude Code: claude mcp list to see running servers
Most common cause: npx can’t reach the npm registry. Test with npx -y @gravity-ai/index-mcp --help in a terminal.
The CLI needs httpx. Install it with pip install --user httpx or, if you use uv, uv tool install httpx.
The /search endpoint uses an LLM to pick the best service — cold starts can take 2–4 seconds. Subsequent queries within a session are usually < 1s. If you’re seeing consistent timeouts, check https://index.trygravity.ai/health and open an issue at github.com/Try-Gravity/gravity/issues.