Agent Index MCP server
✓ VerifiedEnables AI agents to publish and search decentralized web indexes over a peer-to-peer libp2p network.
Also known as agent-idx/mcp, mcp, @agent-idx/client
- Stars
- 0
- Tools
- 10
- Downloads, 30 days
- 162
- Latest version
- 0.4.5
- Last commit
- Jul 16, 2026
- License
- —
What is Agent Index MCP?
Agent Index enables AI agents to publish and search decentralized web indexes over a peer-to-peer libp2p network. It exposes 10 tools, such as get_network_setup, publish_index, search_index.
Summary generated from the project's README
About Agent Index MCP server
Agent Index provides a decentralized way for AI agents to publish and discover web indexes through a peer-to-peer libp2p network. This MCP server acts as an edge client that connects to routing and relay peers to facilitate data exchange without a central authority. Developers use it to allow their agents to advertise local index records using specific keywords and to fetch records from other peers via direct libp2p streams.
To set up the server, users must provide bootstrap and relay multiaddrs obtained from the Active Nodes directory. The client handles network plumbing, including NAT traversal through circuit-relay and DCUtR hole-punching. It includes tools like publish_index for advertising summaries, search_index for discovering records via keywords, and query_peer_index for direct peer communication. Users can also manage their presence on the network using add_keywords, remove_keywords, or set_keywords to control which topics they represent.
Written from the project's README. Every use case is checked against a quote from it.
How to install Agent Index MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Agent Index MCP in Claude Code
$ claude mcp add mcp -- npx -y @agent-idx/clientInstall Agent Index MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}Install Agent Index MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}Install Agent Index MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@agent-idx/client"]}'Install Agent Index MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}Install Agent Index MCP in Codex
$ codex mcp add mcp -- npx -y @agent-idx/clientInstall Agent Index MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp] command = "npx" args = ["-y", "@agent-idx/client"]
Install Agent Index MCP in Gemini CLI
$ gemini mcp add -s user mcp npx -- -y @agent-idx/clientInstall Agent Index MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@agent-idx/client"
]
}
}
}Agent Index MCP tools 10
Detected from the READMEget_network_setuppublish_indexsearch_indexquery_peer_indexadd_keywordsremove_keywordsset_keywordsfind_peers_by_keywordget_peer_statusget_peer_profile
| get_network_setup | — | |
| publish_index | — | |
| search_index | — | |
| query_peer_index | — | |
| add_keywords | — | |
| remove_keywords | — | |
| set_keywords | — | |
| find_peers_by_keyword | — | |
| get_peer_status | — | |
| get_peer_profile | — |
Configuration
AGENT_INDEX_DIRECTORY_URLURL of the network Active Nodes directory (routing/relay multiaddrs)
| Name | Description | |
|---|---|---|
| AGENT_INDEX_DIRECTORY_URL | URL of the network Active Nodes directory (routing/relay multiaddrs) |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachableagent-idx/mcp is public and reachablegithub.com/agent-idx/mcp ↗Pass
- Package names this repository as its source@agent-idx/client names agent-idx/mcp as sourcenpmjs.com/package/@agent-idx/client ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-07-16github.com/agent-idx/mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @agent-idx/clientPass
- No critical advisory in the package or its dependencies155 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model10 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHub@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.
Agent Index MCP questions
How do I add Agent Index MCP to Claude Code?
Run claude mcp add mcp -- npx -y @agent-idx/client in your terminal. Add --scope user to make it available in every project.
How do I add Agent Index MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Agent Index MCP provide?
It exposes 10 tools, including get_network_setup, publish_index, search_index, query_peer_index, add_keywords.
What should I do if I am behind a NAT or home router?
You should use a relay peer with the -r flag to enable circuit-relay and DCUtR hole-punching for a direct connection.
How can I see a summary of the network configuration?
You can call the get_network_setup MCP tool to receive a machine-readable summary of the network setup.