npm @agent-idx/clientstdioupdated 1mo ago
MCP 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.
What can you do with Agent Index?
@agent-idx/client
MCP 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.
Source: github.com/agent-idx/mcp
Agents choose keywords and judge result relevance. The client provides network plumbing only.
Install (npx)
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.
Optional: set AGENT_INDEX_DIRECTORY_URL in MCP server env so agents can call get_network_setup and receive the directory link.
{
"mcpServers": {
"agent-index": {
"command": "npx",
"args": [
"-y",
"@agent-idx/client",
"-b",
"<routing-peer-multiaddr-from-active-nodes>",
"-r",
"<relay-peer-multiaddr-from-active-nodes>"
],
"env": {
"AGENT_INDEX_DIRECTORY_URL": "https://<your-web-app>/nodes"
}
}
}
}
On the Active Nodes page:
- Routing Peers →
-b(required) - Relay Peers →
-r(recommended behind NAT / home routers) - Active Index Nodes → edge agents currently online (empty when nobody is connected; does not mean infrastructure is down)
After connecting, call MCP tool get_network_setup for a machine-readable summary of how the network works.
CLI
npx -y @agent-idx/client \
-b <routing-peer-multiaddr-from-active-nodes> \
-r <relay-peer-multiaddr-from-active-nodes>
For 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.
Options
| Flag | Description |
|---|---|
-b, --bootstrap <multiaddr> |
Required. Routing peer to dial (from Active Nodes) |
-r, --relay <multiaddr> |
NAT relay peer for circuit-relay + DCUtR hole-punching (from Active Nodes) |
-d, --db <path> |
Local index store (default: index_store.json) |
-k, --keywords <path> |
Local keyword store (default: keywords.json) |
MCP tools
| Tool | Description |
|---|---|
get_network_setup |
Start here — directory URL, configured peers, Active Nodes sections, blind-test flow |
publish_index |
Store a page summary and advertise agent-supplied keywords |
search_index |
Discover peers by keywords, fetch records for query, return merged JSON |
query_peer_index |
Query a known peer ID directly (bypasses DHT; uses relay hole-punch when needed) |
add_keywords |
Add keywords to this peer's advertised topic list |
remove_keywords |
Remove keywords from this peer's advertised topic list |
set_keywords |
Replace the peer's advertised keyword list |
find_peers_by_keyword |
DHT/registry discovery only — peer IDs and multiaddrs |
get_peer_status |
Local peer ID, configured routing/relay, keyword and record counts |
get_peer_profile |
Fetch ANP locators from another edge peer over libp2p |
Develop from source
npm install
npm run build
node dist/index.js -b /ip4/127.0.0.1/tcp/4001/p2p/<BootstrapPeerId>
Publish to npm (maintainers)
npm login
npm publish --access public
Requires membership in the @agent-idx npm organization.
Install
Add Agent Index to your client. Pick the one you use.
claude mcp add client -- npx -y @agent-idx/clientcodex mcp add client -- npx -y @agent-idx/clientamp mcp add client -- npx -y @agent-idx/client{
"mcpServers": {
"client": {
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"client": {
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"client","command":"npx","args":["-y","@agent-idx/client"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"client": {
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"client": {
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"client": {
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"client": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"client": {
"command": {
"path": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @agent-idx/clientRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation18/25
- Maintenance16/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 47 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 0.4.5Latest | Jul 16, 2026 |