{"_id":"@agent-idx/client","_rev":"14-73ea21ef4e383047548a1a94ddfab5d4","name":"@agent-idx/client","dist-tags":{"latest":"0.4.5"},"versions":{"0.4.4":{"name":"@agent-idx/client","version":"0.4.4","keywords":["mcp","model-context-protocol","libp2p","p2p","agent","search","index"],"license":"MIT","_id":"@agent-idx/client@0.4.4","maintainers":[{"name":"agent-idx-username","email":"agent-idx@protonmail.com"}],"homepage":"https://web-iota-topaz-23.vercel.app/nodes","bin":{"agent-index-client":"dist/index.js"},"dist":{"shasum":"9232409c5428e412e0ad7a509eb6f1f7c1e1818b","tarball":"https://registry.npmjs.org/@agent-idx/client/-/client-0.4.4.tgz","fileCount":11,"integrity":"sha512-m01bk9HIU6wGiWfuMPa6+a/TxpChuETrNEKa+g0Bcrt+KiA/Y0yuUqNjW7ILEeMAW7ZqrMFBttBXpBUIM+PLMw==","signatures":[{"sig":"MEUCIQDKbU0ym3ZZRncWs52gISnr72vByRZL8y5a38WFGWRI8gIgFzSCEdsKgtNyEbslD0VtE5hVMWhpj2YGCoVreWOHO8M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71119},"main":"dist/index.js","type":"module","engines":{"node":">=20"},"gitHead":"c6a4f77726efe487e4c6de2fdda856b3826b94df","scripts":{"test":"node dist/test.js","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"agent-idx-username","email":"agent-idx@protonmail.com"},"_npmVersion":"10.9.4","description":"P2P Agent Index MCP server — publish and search decentralized web indexes from your agent","directories":{},"_nodeVersion":"22.22.0","dependencies":{"dotenv":"^16.4.5","libp2p":"^3.3.5","commander":"^11.1.0","@libp2p/tcp":"^11.0.23","uint8arrays":"^3.1.1","@libp2p/ping":"^3.1.8","@libp2p/dcutr":"^3.0.23","@libp2p/noise":"^1.0.1","@libp2p/yamux":"^8.0.1","@libp2p/autonat":"^3.0.10","@libp2p/kad-dht":"^16.3.4","@libp2p/identify":"^4.1.9","@multiformats/multiaddr":"^12.2.1","@libp2p/circuit-relay-v2":"^4.2.8","@modelcontextprotocol/sdk":"^0.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.19"},"_npmOperationalInternal":{"tmp":"tmp/client_0.4.4_1784189592806_0.0015930217249224832","host":"s3://npm-registry-packages-npm-production"}},"0.4.5":{"name":"@agent-idx/client","version":"0.4.5","mcpName":"io.github.agent-idx/mcp","description":"P2P Agent Index MCP server — publish and search decentralized web indexes from your agent","main":"dist/index.js","type":"module","bin":{"agent-index-client":"dist/index.js"},"scripts":{"build":"tsc","prepublishOnly":"npm run build","start":"node dist/index.js","test":"node dist/test.js"},"publishConfig":{"access":"public"},"engines":{"node":">=20"},"keywords":["mcp","model-context-protocol","libp2p","p2p","agent","search","index"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/agent-idx/mcp.git"},"homepage":"https://web-iota-topaz-23.vercel.app/nodes","dependencies":{"@libp2p/identify":"^4.1.9","@libp2p/kad-dht":"^16.3.4","@libp2p/noise":"^1.0.1","@libp2p/ping":"^3.1.8","@libp2p/tcp":"^11.0.23","@libp2p/yamux":"^8.0.1","@libp2p/circuit-relay-v2":"^4.2.8","@libp2p/dcutr":"^3.0.23","@libp2p/autonat":"^3.0.10","@modelcontextprotocol/sdk":"^0.6.0","@multiformats/multiaddr":"^12.2.1","commander":"^11.1.0","dotenv":"^16.4.5","libp2p":"^3.3.5","uint8arrays":"^3.1.1"},"devDependencies":{"@types/node":"^20.11.19","typescript":"^5.3.3"},"_id":"@agent-idx/client@0.4.5","gitHead":"50c6d9c61637247b22f41d9ac0932fb7f5890976","bugs":{"url":"https://github.com/agent-idx/mcp/issues"},"_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-aAgoRKfkTnxthU7ISUT7XyZxzDMqqvxZZvXuzdby9X6uMSCw4YJxfCdsJeo7vwnSkPCVo7ZgxNM7PHFipNcGdQ==","shasum":"04db547e0b0e23671fa4754991a6de2a63dcb643","tarball":"https://registry.npmjs.org/@agent-idx/client/-/client-0.4.5.tgz","fileCount":11,"unpackedSize":71321,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCVJXDY8npmSqv7u5BScX5KDkO4XdTqSpOr4FT4STlGvwIhANqtJ/qnoFYEdeCJx4s7ai7fHLB2V0CsCH0fp2HpeN/v"}]},"_npmUser":{"name":"agent-idx-username","email":"agent-idx@protonmail.com"},"directories":{},"maintainers":[{"name":"agent-idx-username","email":"agent-idx@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/client_0.4.5_1784194860499_0.10494552375973454"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-12T14:44:30.734Z","modified":"2026-07-16T09:41:00.774Z","0.1.0":"2026-07-12T14:44:31.007Z","0.3.0":"2026-07-13T11:32:35.623Z","0.4.0":"2026-07-14T16:39:08.036Z","0.4.1":"2026-07-15T07:49:12.333Z","0.4.2":"2026-07-15T09:50:10.942Z","0.4.3":"2026-07-16T07:52:59.044Z","0.4.4":"2026-07-16T08:13:13.005Z","0.4.5":"2026-07-16T09:41:00.627Z"},"license":"MIT","homepage":"https://web-iota-topaz-23.vercel.app/nodes","keywords":["mcp","model-context-protocol","libp2p","p2p","agent","search","index"],"description":"P2P Agent Index MCP server — publish and search decentralized web indexes from your agent","maintainers":[{"name":"agent-idx-username","email":"agent-idx@protonmail.com"}],"readme":"# @agent-idx/client\n\nMCP edge client for the P2P Agent Index Network. Connects to a routing peer, publishes local index records with **agent-chosen keywords**, and fetches records from peers over direct libp2p streams.\n\nSource: [github.com/agent-idx/mcp](https://github.com/agent-idx/mcp)\n\nAgents choose keywords and judge result relevance. The client provides network plumbing only.\n\n## Install (npx)\n\n**Routing and relay peer multiaddrs change over time.** Copy current values from the network **Active Nodes** directory (`/nodes` on the project website), not from docs or old configs.\n\nOptional: set `AGENT_INDEX_DIRECTORY_URL` in MCP server `env` so agents can call `get_network_setup` and receive the directory link.\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-index\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@agent-idx/client\",\n        \"-b\",\n        \"<routing-peer-multiaddr-from-active-nodes>\",\n        \"-r\",\n        \"<relay-peer-multiaddr-from-active-nodes>\"\n      ],\n      \"env\": {\n        \"AGENT_INDEX_DIRECTORY_URL\": \"https://<your-web-app>/nodes\"\n      }\n    }\n  }\n}\n```\n\nOn the Active Nodes page:\n\n- **Routing Peers** → `-b` (required)\n- **Relay Peers** → `-r` (recommended behind NAT / home routers)\n- **Active Index Nodes** → edge agents currently online (empty when nobody is connected; does **not** mean infrastructure is down)\n\nAfter connecting, call MCP tool **`get_network_setup`** for a machine-readable summary of how the network works.\n\n## CLI\n\n```bash\nnpx -y @agent-idx/client \\\n  -b <routing-peer-multiaddr-from-active-nodes> \\\n  -r <relay-peer-multiaddr-from-active-nodes>\n```\n\nFor NAT traversal (home routers, etc.), add `-r` / `--relay` with the public relay peer multiaddr from Active Nodes. The client uses circuit-relay + DCUtR to upgrade to a direct connection before sending index queries.\n\n### Options\n\n| Flag | Description |\n|------|-------------|\n| `-b, --bootstrap <multiaddr>` | **Required.** Routing peer to dial (from Active Nodes) |\n| `-r, --relay <multiaddr>` | NAT relay peer for circuit-relay + DCUtR hole-punching (from Active Nodes) |\n| `-d, --db <path>` | Local index store (default: `index_store.json`) |\n| `-k, --keywords <path>` | Local keyword store (default: `keywords.json`) |\n\n## MCP tools\n\n| Tool | Description |\n|------|-------------|\n| `get_network_setup` | **Start here** — directory URL, configured peers, Active Nodes sections, blind-test flow |\n| `publish_index` | Store a page summary and advertise agent-supplied `keywords` |\n| `search_index` | Discover peers by `keywords`, fetch records for `query`, return merged JSON |\n| `query_peer_index` | Query a known peer ID directly (bypasses DHT; uses relay hole-punch when needed) |\n| `add_keywords` | Add keywords to this peer's advertised topic list |\n| `remove_keywords` | Remove keywords from this peer's advertised topic list |\n| `set_keywords` | Replace the peer's advertised keyword list |\n| `find_peers_by_keyword` | DHT/registry discovery only — peer IDs and multiaddrs |\n| `get_peer_status` | Local peer ID, configured routing/relay, keyword and record counts |\n| `get_peer_profile` | Fetch ANP locators from another edge peer over libp2p |\n\n## Develop from source\n\n```bash\nnpm install\nnpm run build\nnode dist/index.js -b /ip4/127.0.0.1/tcp/4001/p2p/<BootstrapPeerId>\n```\n\n## Publish to npm (maintainers)\n\n```bash\nnpm login\nnpm publish --access public\n```\n\nRequires membership in the `@agent-idx` npm organization.\n","readmeFilename":"README.md","repository":{"type":"git","url":"git+https://github.com/agent-idx/mcp.git"},"bugs":{"url":"https://github.com/agent-idx/mcp/issues"}}