@gravity-ai/index-mcp 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/bin/cli.mjs +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,6 +89,10 @@ users), set `GRAVITY_PUBLISHER_KEY` so every request and install attributes to y
|
|
|
89
89
|
`gravity_index_search` also accepts `external_session_id`, `external_user_id_hash`,
|
|
90
90
|
`email_hash`, and `metadata` for attribution and payout matching.
|
|
91
91
|
|
|
92
|
+
Every search sends the required `user_ip`. This server runs on the user's
|
|
93
|
+
machine, so it sends `"caller"` and Index uses the connection's IP. If you run
|
|
94
|
+
it on a server instead, set `GRAVITY_INDEX_USER_IP` to the end user's IP.
|
|
95
|
+
|
|
92
96
|
---
|
|
93
97
|
|
|
94
98
|
## Example conversation
|
package/bin/cli.mjs
CHANGED
|
@@ -308,7 +308,11 @@ async function handleRequest(req) {
|
|
|
308
308
|
});
|
|
309
309
|
|
|
310
310
|
if (name === "gravity_index_search") {
|
|
311
|
-
|
|
311
|
+
// This server runs on the user's machine, so the caller is the user.
|
|
312
|
+
const body = {
|
|
313
|
+
query: args.query,
|
|
314
|
+
user_ip: process.env.GRAVITY_INDEX_USER_IP || "caller",
|
|
315
|
+
};
|
|
312
316
|
if (args.search_id) body.search_id = args.search_id;
|
|
313
317
|
if (args.context && typeof args.context === "object") body.context = args.context;
|
|
314
318
|
if (args.external_session_id) body.external_session_id = args.external_session_id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ai/index-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "MCP server for the Gravity Index — lets AI agents discover developer services (DBs, auth, payments, hosting, etc.) and get install instructions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|