Documentation Index
Fetch the complete documentation index at: https://docs.trygravity.ai/llms.txt
Use this file to discover all available pages before exploring further.
Install
Pick the surface that fits how you code.| You use… | Install | Time |
|---|---|---|
| AI coding agent (Cursor, Claude Code, Claude Desktop, Windsurf, etc.) | MCP server → npm | 30 sec |
| Terminal / shell scripts | Bash CLI | 30 sec |
| Custom integration (your own agent) | Direct API | — |
MCP server (recommended)
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 vianpx. No Python, no clone, no build.
@gravity-ai/index-mcp · Source: sdk-js/packages/index-mcp
Python alternative
If you already haveuv / Python 3.12 and prefer to run from 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” querygravity_index_browse— list services, filter by category, tag searchgravity_index_list_categories— enumerate all 22 categories with countsgravity_index_get_service— deep lookup by sluggravity_index_report_integration— tell the Index a user finished an integration (for CPA attribution)
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.Install
Use
Direct API
If you’re building your own agent or want to call the Index from any language, it’s a plain REST API athttps://index.trygravity.ai.
Publisher attribution
If you’re a platform publisher embedding the Gravity Index in your own AI app, set aGRAVITY_PUBLISHER_KEY so every install from your users attributes revenue share to your account.
Troubleshooting
`npx` fails with `ENOENT` or cannot find package
`npx` fails with `ENOENT` or cannot find package
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.MCP tools don't show up after restart
MCP tools don't show up after restart
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 listto see running servers
npx can’t reach the npm registry. Test with npx -y @gravity-ai/index-mcp --help in a terminal.CLI says `httpx: No module named`
CLI says `httpx: No module named`
The CLI needs
httpx. Install it with pip install --user httpx or, if you use uv, uv tool install httpx.Search is slow / times out
Search is slow / times out
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.