关于 mcpindex
mcpindex 是供 Agent 查找、比较和安装 MCP 服务的 MCP 服务,并可在调用工具前提供信任评估。它将目录搜索与默认拒绝放行的评估结合起来,但评估仅供参考,不代表安全保证。
主要功能
- 01按任务推荐服务
- 02关键词与语义搜索
- 03提供客户端安装指令
- 04并排比较服务
- 05调用前检查工具与服务
适用场景
- 01按 Agent 任务寻找合适服务
- 02比较服务质量与配置信息
- 03调用工具前检查对应服务
- 04获取特定客户端的安装配置
MCP 相关
向 MCP 客户端提供六种工具,用于发现、比较服务、获取安装指引和进行参考性信任检查。可作为本地 stdio 服务或托管远程 MCP 服务使用。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://mcpindex.ai/api/mcpclaude mcp add --transport http gautamgb-mcp-server-mcpindex https://mcpindex.ai/api/mcp{"mcpServers":{"gautamgb-mcp-server-mcpindex":{"type":"http","url":"https://mcpindex.ai/api/mcp"}}}在 Cursor 中打开{"servers":{"gautamgb-mcp-server-mcpindex":{"type":"http","url":"https://mcpindex.ai/api/mcp"}}}在 VS Code 中打开{"mcpServers":{"gautamgb-mcp-server-mcpindex":{"type":"http","url":"https://mcpindex.ai/api/mcp"}}}{"mcpServers":{"gautamgb-mcp-server-mcpindex":{"serverUrl":"https://mcpindex.ai/api/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
6| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| task | string | 是 | 任务的自然语言描述,例如 "read PDFs and write to S3"。 |
详细介绍
mcp-server-mcpindex
用于查找 MCP 服务的 MCP 服务,还提供咨询式信任判定,供 Agent 框架在调用工具前使用,来自 mcpindex.ai。
可直接接入的 MCP 服务,让你的 Agent 能在 Agent 循环中发现、比较、安装其他 MCP 服务,并在调用前进行检查。由 mcpindex.ai 提供支持——这是官方注册表的 Agent 原生 MCP 服务索引(实时数量见 mcpindex.ai/stats),每天进行筛查并监控漂移。
在线站点 · npx mcp-server-mcpindex · 远程 MCP · 安装门禁 · 文档 · 信任
安装
npm install -g mcp-server-mcpindex
这是一个目录/咨询客户端(推荐、搜索、信任)。它不会安装路径内的漂移门禁——该门禁的安装方式是 curl -fsSL https://mcpindex.ai/install.sh | sh。
需要 Node 20+。通过标准输入/输出支持两个协议时期:2026-07-28 修订版(server/discover、每个请求的 _meta 封装)以及所有当前客户端使用的 initialize 握手(从 2025-11-25 到 2024-10-07),并按连接选择。
或远程连接(无需安装)
不想安装任何内容?mcpindex 也提供托管的远程 MCP 服务。将支持远程 MCP 的任意客户端(Claude 连接器、Cursor 等)指向:
https://mcpindex.ai/api/mcp
使用 Streamable HTTP,无需凭据。与 npm 包提供相同的六个工具。
Claude Code
claude mcp add --scope user mcpindex -- npx -y mcp-server-mcpindex@latest
Gemini CLI
gemini mcp add -s user mcpindex npx -y mcp-server-mcpindex@latest
在 Claude Desktop 中使用
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mcpindex": {
"command": "npx",
"args": ["-y", "mcp-server-mcpindex@latest"]
}
}
}
@latest可确保你使用最新版本:这是咨询式发现服务(不是路径内的漂移 门禁),因此不固定版本——npx会在下次主机重启时获取最新版本,无需 手动升级。
重启 Claude Desktop。然后询问:
“帮我找一个能读取 PDF 并将内容写入 S3 的 MCP 服务。”
Claude 会调用 recommend_mcp_for_task,并返回排名靠前的 3 个服务及其安装命令。
在 Cursor 中使用
添加到 .cursor/mcp.json:
{
"mcpServers": {
"mcpindex": {
"command": "npx",
"args": ["-y", "mcp-server-mcpindex@latest"]
}
}
}
在 Cline 中使用
添加到 cline_mcp_settings.json:
{
"mcpServers": {
"mcpindex": {
"command": "npx",
"args": ["-y", "mcp-server-mcpindex@latest"]
}
}
}
在 Zed 中使用
Zed 从 context_servers 读取 MCP 服务,而不是从 mcpServers 读取。添加到 ~/.config/zed/settings.json:
{
"context_servers": {
"mcpindex": {
"command": "npx",
"args": ["-y", "mcp-server-mcpindex@latest"]
}
}
}
暴露的工具
| 工具 | 功能 |
|---|---|
recommend_mcp_for_task | 传入自然语言任务。返回排名前 3 的服务及其推理说明、安装命令和质量评分。 |
search_mcp_servers | 在整个注册表中进行关键词和语义搜索。可选类别筛选。 |
get_install_command | 获取指定服务和客户端的准确安装 JSON/CLI(Claude Desktop、Claude Code、Cursor、Gemini CLI、Cline、Zed)。 |
compare_servers | 并排比较 2-5 个服务,包括质量评分、安装路径和环境变量。 |
check_tool_trust | 在调用前,对特定服务上的工具给出咨询性判定。故障时默认关闭:若没有现成判定,则返回 UNVERIFIED。 |
assess_server | 汇总某个服务上所有工具的调用前判定。格式与 check_tool_trust 相同。 |
Agent 框架集成:调用前咨询性筛查
check_tool_trust 是目录客户端集成接口(不是路径内的 mcpindex-gate)。它让 Agent 框架(Composio、Mastra、LangChain、DSPy、原始 LLM 工具调用循环)能够在分发调用前请求咨询性筛查判定。在 v1 中,你会看到 REVIEW 或 UNVERIFIED,而不是安全许可。
使用 Mastra? 同系列软件包
@mcp-index/mastra提供了这一筛查功能,可直接作为现成的beforeToolCall钩子使用——npm i @mcp-index/mastra,无需额外配置。
判定约定(v1)
该工具返回 API 原样发送的判定(字段和值均与托管端点 /api/mcp 返回的相同),并在末尾附加此客户端添加的 4 个扁平便捷字段:server_id、tool_name、source_url、fetched_at。
{
"subject": { "server_id": "github", "tool_name": "create_pull_request", "tool_verified": false },
"directive": "ALLOW" | "DENY" | "REVIEW" | "UNVERIFIED",
"status": "EVALUATED" | "PARTIAL" | "STALE" | "ERROR",
"granularity": "description-level" | null, // scope of a PARTIAL screen
"dimensions": [
{ "id": "tool_safety", "verdict": "PASS", "severity": "INFO" }
],
"expires_at": "2026-06-30T00:00:00Z",
"honest_limits": [
"semantic_only_no_conformance",
"calibrated_false_v1",
"description_level_screen",
"advisory",
"tool_name_not_independently_verified"
],
"verdict_contract_version": "1.1.0",
"server_id": "github",
"tool_name": "create_pull_request",
"source_url": "https://mcpindex.ai/api/v1/trust/tool/github/create_pull_request",
"fetched_at": "2026-05-28T18:42:11.118Z"
}
verdict_contract_version 是 API 自身的版本,客户端绝不会改写。subject.tool_verified: false 表示 API 未确认该工具名称存在于该服务上:当前的筛查基于描述级别,因此在经过筛查的服务上,任何工具名称都会获得该服务的判定。
免费层级的判定包含指令、维度和时效性信息。证据引文、LLM 推理说明和链历史属于付费层级功能,因此在此有意省略。
诚实说明的限制(请将其固定显示在你的闸门 UI 中)
honest_limits 是 API 提供的列表,客户端会原样转发;你的闸门 SHOULD 在每次分发决策时展示该列表。经筛查的判定会包含筛查本身的限制(例如 semantic_only_no_conformance、description_level_screen、tool_name_not_independently_verified)。如果没有现成判定,或客户端故障时默认关闭,则该列表采用 v1 的最低限制:
conformance_monitored_not_enforced- 发布者自行声明;mcpindex 会监控偏移,但不会在网络层拦截。calibrated_false_v1- 维度严重程度尚未根据真实事件数据完成校准。advisory_deployment- 判定仅供参考;决策者是 Agent(或审核该 Agent 的人工人员)。
客户端绝不会将最低限制合并进 API 已发送的列表,因为这样可能与其矛盾。
历史锚定:锚定至 OTS Bitcoin 的历史;经 6 次确认后视为 Bitcoin 最终确认(约 1 小时);约 10 分钟后进入待处理状态。子窗口精度仅为声明,尚未证实。
集成模式(LangChain 风格,直接 LLM 工具调用约定)
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
const mcpindex = new Client({ name: 'gate', version: '1.0.0' }, { capabilities: {} });
await mcpindex.connect(new StdioClientTransport({
command: 'npx', args: ['-y', 'mcp-server-mcpindex@latest'],
}));
// gateToolCall wraps any agent tool dispatch. Plug it in front of
// the LangChain / DSPy / Mastra / Composio tool-call hook.
async function gateToolCall({ serverId, toolName, invoke, askHuman }) {
const res = await mcpindex.callTool({
name: 'check_tool_trust',
arguments: { server_id: serverId, tool_name: toolName },
});
const verdict = JSON.parse(res.content[0].text);
// Pin the v1 caveats in the audit log no matter what.
audit.log({ verdict, caveats: verdict.honest_limits });
switch (verdict.directive) {
case 'REVIEW':
// Fail-CLOSED to human. Do NOT auto-execute on REVIEW.
// At v1 this is the common screened outcome (semantic-only).
return askHuman({ verdict, action: `${serverId}/${toolName}` });
case 'UNVERIFIED':
// No verdict on file (or upstream unreachable). Fail-CLOSED.
// Recommend human review. Do NOT fail-open to invoke().
return askHuman({
verdict,
action: `${serverId}/${toolName}`,
note: 'No trust verdict on file. Human review required before first use.',
});
case 'ALLOW':
// Reserved in the contract — not produced by the v1 public screen.
// Keep the branch for future conformance-earned ALLOW; do not expect it today.
return invoke();
case 'DENY':
// Reserved in the contract — not produced by the v1 public screen.
throw new Error(
`mcpindex denied ${serverId}/${toolName}: ${JSON.stringify(verdict.dimensions)}`,
);
default:
// Unknown directive. Fail-CLOSED.
return askHuman({ verdict, action: `${serverId}/${toolName}` });
}
}
核心规则:绝不默认放行
如果裁决端点无法访问、返回非 2xx 状态、超时、返回格式错误的 JSON、收到的 server_id / tool_name 会导致 API 路径遍历(..、/、空值),或者该服务尚无已记录的裁决,check_tool_trust 会返回 directive: "UNVERIFIED" + status: "ERROR"。它绝不会默默将结果强制转换为 ALLOW。你的门控代码 SHOULD 将 UNVERIFIED 视为“需要人工审核”,绝不能认为“看起来没问题,可以发布”。
status 表示筛查是否完整的遥测信息,与 directive 信任判定不同:EVALUATED(完整筛查)、PARTIAL(仅筛查部分范围,例如描述级——参见 granularity)、STALE(裁决已超出其有效期)、ERROR(无法访问/无已记录的裁决)。PARTIAL 筛查绝不会报告为 EVALUATED。
此行为经过测试。参见 test/trust.test.mjs。
直接使用该库(不使用 MCP)
信任客户端也以纯 ES 模块形式导出:
import { checkToolTrust, assessServer } from 'mcp-server-mcpindex/src/trust.mjs';
const verdict = await checkToolTrust({
serverId: 'github',
toolName: 'create_pull_request',
});
if (verdict.directive !== 'ALLOW') {
// Hand to a human, log, or block.
}
后端
默认情况下,调用会发送到 https://mcpindex.ai。如果你自行托管,可通过 MCPINDEX_API_BASE=... 覆盖。
免费套餐的速率限制为每个 IP 每分钟 60 次请求。更高吞吐量以及包含完整证据的裁决(证据引文、大模型理由、链历史记录)即将通过付费密钥提供。
相关软件包
将 mcpindex 引入 Agent 的三种方式,适用于不同场景:
| 软件包 | 安装 | 功能 |
|---|---|---|
mcp-server-mcpindex (本软件包) | npm i -g mcp-server-mcpindex | 作为 MCP 服务提供目录和建议性筛查:按任务查找服务,并在调用前使用 check_tool_trust。 |
@mcp-index/mastra | npm i @mcp-index/mastra | 将相同的建议性筛查接入 Mastra,作为 beforeToolCall 钩子(警告/强制执行)。 |
@mcp-index/sdk | npm i @mcp-index/sdk | 调用路径中的漂移门控:对 MCP 会话使用 wrap(),当工具的契约与固定版本不一致时,HOLD 该调用。 |
**建议性筛查与漂移门控:**本软件包和 @mcp-index/mastra 会向 mcpindex 查询“这个工具经过审查了吗?”(网络裁决)。@mcp-index/sdk 则在本地询问另一个问题:“自从我固定该工具以来,它的契约是否发生了变化?”两者相辅相成,且互不依赖。
许可证
MIT。
项目
- 网站:mcpindex.ai
- 方法论:mcpindex.ai/methodology
- 筛查服务:mcpindex.ai/screen
- 指南:按任务查找合适的 MCP 服务
- 源代码:github.com/mcpindex-ai
非官方项目。与 Anthropic 无关联。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。