mcpField
M
Model Finder

Model Finder

本地服务
github.com/AbhiindiglooAI 与智能体32 周前更新

关于 Model Finder

Model Finder 是供团队按自有评测和预算比较 AI 模型的本地工具集。它包含四种 Agent Skills 和只读 MCP 工具,可审计代码库、评测模型、生成路由并估算本地模型内存。

主要功能

  1. 01审计代码库中的模型和 SDK
  2. 02从提示词草拟评测示例
  3. 03测量通过率、延迟和成本
  4. 04按通过答案的成本排序
  5. 05生成带质量保护的模型路由
  6. 06估算本地模型内存

适用场景

  1. 01寻找通过特定任务评测的低成本模型
  2. 02检查代码库中的模型 ID 和路由
  3. 03根据评测结果生成路由
  4. 04将本地模型内存需求与硬件对照

MCP 相关

本地 stdio MCP 服务提供十种只读工具,用于代码库审计、评测配置与分析、路由、成本和内存估算以及敏感数据扫描。它不发起网络请求、不读取密钥,也不写入文件。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"co-indigloo-model-finder": {
"command": "uvx",
"args": [
"model-finder-mcp"
]
}
}
}
启动命令uvx model-finder-mcp

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
pypimodel-finder-mcp1.3.5

工具

10

收录的工具列表 · 更新于 2 周前

参数类型必填说明
pathstring否工作区内相对于项目根目录的目录(例如 "services/api")。默认为项目根目录。如果调用因项目未知而失败,请传入项目的绝对路径(当前工作目录)。
limitinteger否每页条目数(1-200,默认 50)。
offsetinteger否要跳过的条目数;使用上一页返回的 next_offset。
hard_coded_onlyboolean否仅包含未从配置或环境中读取的 ID。
provider_familyenum否仅包含此系列中的模型,例如 "anthropic"。anthropic | openai | google | meta | mistral | deepseek | alibaba | xai | cohere
response_formatenum否markdown(默认),用于易读摘要;json,用于完整的机器可读结果。markdown | json

详细介绍

Model Finder:按成本排序的 16 个候选模型的测试结果一览,达到阈值的最低成本模型以朱红色标出

测试 Python 3.9+ 无依赖项 MCP:本地 stdio MIT 许可证

找到能通过你自己的测试的最低成本 AI 模型,并让它始终保持如此。
Claude · Gemini · OpenAI · Bedrock · Vertex AI · 本地模型 — 由 Indigloo 发布

安装  ·  工作原理  ·  MCP 工具  ·  快速开始  ·  隐私  ·  安全

说明

在本地运行。 Model Finder 是一组包含 4 个 Agent Skills 和一个本地 MCP 服务(mcp/server.py,使用 Python 3.9+ 标准库,无依赖项)。该服务不会进行网络调用,无需 API 密钥,不会写入文件,也绝不会向 Indigloo 发送任何信息。只有评测脚本及其生成的路由器会在你运行时使用你自己的密钥调用模型提供方。

工作原理

flowchart LR
    A["Audit<br/><sub>models and SDKs in your repo</sub>"] --> B["Draft evals<br/><sub>from your prompts, PII dropped</sub>"]
    B --> C["Evaluate<br/><sub>your keys · pass rate · latency · cost</sub>"]
    C --> D["Rank<br/><sub>cost per passing answer</sub>"]
    D --> E["Route<br/><sub>cheapest first, escalate on failure</sub>"]
    F["Size<br/><sub>weights + KV cache vs your GPU</sub>"] -.-> C
    classDef step fill:#f3f0e8,stroke:#1c1b19,color:#1c1b19;
    classDef pick fill:#f3f0e8,stroke:#cd462a,color:#cd462a;
    class A,B,C,E,F step;
    class D pick;
技能功能
find-model根据你的任务、预算和路由需求,在 Claude、Gemini、OpenAI、云端和本地选项中推荐模型,包括 IDE 中的编码子任务。
eval-models使用你自己的密钥,让候选模型运行你的示例,并衡量通过率、延迟和计费成本。
route-models构建按成本从低到高的路由方案:包含质量保护措施的独立路由器以及 LiteLLM 配置。
size-local-model估算权重和 KV 缓存的内存用量,并与硬件配置进行比较。

仅供参考:不会部署任何内容,不会更改你当前使用的模型,数据只会发送到你配置并批准的服务提供方。默认情况下,发送前会拦截个人数据和机密信息;关于这与印度 DPDP 法案的对应关系,请参阅 DATA-PROTECTION.md。

安装

需要在 PATH 中提供 Python 3.9+,可通过 python3 调用(参见 Windows)。无需通过 pip install 安装任何内容。

客户端命令技能MCP 工具
Claude Code/plugin marketplace add Abhiindigloo/EvalHarness 然后运行 /plugin install model-finder@model-finder✅✅ 通过 .mcp.json
OpenAI Codex CLIcodex plugin marketplace add Abhiindigloo/EvalHarness 然后运行 codex plugin add model-finder@model-finder✅✅ 通过 mcp.json(Agent Plugins 格式,运行 ./mcp/server.py)。Codex 不会向服务提供工作区,因此 Agent 会传递项目路径
GitHub Copilot CLIcopilot plugin marketplace add Abhiindigloo/EvalHarness 然后运行 copilot plugin install model-finder@model-finder✅✅ 通过 mcp.json
Gemini CLIgemini extensions install https://github.com/Abhiindigloo/EvalHarness✅✅ 通过 gemini-extension.json
Cursor带技能的插件:cursor.directory/plugins/model-finder,或克隆到 ~/.cursor/plugins/local/model-finder 并重新加载窗口✅✅ 通过 mcp.json 或 .cursor-plugin/plugin.json → .mcp.json
Cursor,仅 MCP添加到 Cursor(一键安装;运行 uvx model-finder-mcp==1.3.5,需要 uv)—✅
任意 MCP 客户端,通过 PyPIuvx model-finder-mcp==1.3.5(PyPI,MCP Registry:co.indigloo/model-finder)—✅
VS Code、JetBrains、Windsurf 等将服务添加到客户端的 MCP 设置中(手动设置)—✅
其他 Agent Skills 客户端将 skills/<name>/ 复制到客户端的技能目录✅—

Gemini CLI 只会在你信任的文件夹中启动扩展 MCP 服务;首次打开项目时会询问你。

手动设置 MCP
VS Code — .vscode/mcp.json(顶层键为 servers)
{
  "servers": {
    "model-finder": {
      "type": "stdio",
      "command": "python3",
      "args": ["/absolute/path/to/EvalHarness/mcp/server.py"],
      "env": { "MODEL_FINDER_ROOT": "${workspaceFolder}" }
    }
  }
}
Cursor — 项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
  "mcpServers": {
    "model-finder": {
      "command": "python3",
      "args": ["/absolute/path/to/EvalHarness/mcp/server.py"],
      "env": { "MODEL_FINDER_ROOT": "${workspaceFolder}" }
    }
  }
}
JetBrains、Windsurf、Claude Desktop 等 — mcpServers

如果客户端没有工作区变量,请填写项目路径:

{
  "mcpServers": {
    "model-finder": {
      "command": "python3",
      "args": ["/absolute/path/to/EvalHarness/mcp/server.py"],
      "env": { "MODEL_FINDER_ROOT": "/absolute/path/to/your/project" }
    }
  }
}

克隆一次仓库,并替换 /absolute/path/to/EvalHarness。仓库工具只会读取工作区内的内容:客户端通过 MCP 共享的根目录、MODEL_FINDER_ROOT 指定的目录,或服务的工作目录。拒绝使用文件系统根目录或主目录。

Windows

Codex、Copilot CLI 和 Cursor 会以 ./mcp/server.py 启动服务,该脚本依赖 #!/usr/bin/env python3 行;在 Windows 上,请使用手动设置或 uvx model-finder-mcp。如果 PATH 中没有 python3,MCP 服务将无法启动。请从 python.org 安装 Python(勾选“Add python.exe to PATH”),然后创建 python3 别名,或使用手动设置,将 "command": "py" 和 "args": ["-3", "C:/path/to/EvalHarness/mcp/server.py"] 填入配置。

MCP 工具

十个只读工具,因此所有受支持的 IDE 都能使用相同功能:

工具功能
modelfinder_audit_models列出代码仓库中的 AI 模型 ID 和 SDK,并提供文件:行号位置、路由及硬编码 ID
modelfinder_draft_eval_examples根据提示词文件和测试样例起草评估示例,并剔除任何个人数据或机密信息
modelfinder_create_eval_config · modelfinder_validate_eval_config创建并检查评估配置:调用次数、环境变量名称、未定价的模型、守护规则判定
modelfinder_check_output根据评估检查或路由守护规则测试回复
modelfinder_rank_eval_results按每个通过答案的成本对结果排名,并应用成本/可靠性级联策略
modelfinder_generate_routing根据评估结果生成 routing.json 和 LiteLLM 配置
modelfinder_estimate_cost估算每月 Token 成本及每个通过结果的成本
modelfinder_estimate_memory估算权重和 KV 缓存的本地内存占用
modelfinder_scan_sensitive_data扫描个人数据和机密信息(仅提供类别和数量)

默认情况下,每个工具都会返回易读的 Markdown 摘要,以及结构化 JSON 格式的完整结果(response_format: "json" 也会在文本中包含 JSON)。大型结果会分页(limit、offset、has_more、next_offset);modelfinder_audit_models 可按提供商系列或硬编码 ID 筛选;不支持的参数会被拒绝,并附上有效参数列表。服务绝不会建立网络连接、读取 API 密钥或写入文件。只有在你运行 eval_models.py 和生成的 router.py 时,它们才会使用你的密钥调用模型提供商。

快速开始

在 IDE 中询问:“审查此代码仓库使用了哪些 AI 模型,然后根据我们的提示词起草评估,并测试更便宜的模型能否通过。”助手会使用 MCP 工具进行审查和起草,与你确认检查项,并在付费运行前征求同意。

在终端中:

cp skills/eval-models/assets/example-config.json my-eval.json   # fill in verified model IDs and prices
export ANTHROPIC_API_KEY=... GEMINI_API_KEY=... OPENAI_API_KEY=...
python3 skills/eval-models/scripts/repo_scan.py audit .            # what the repo uses
python3 skills/eval-models/scripts/repo_scan.py examples .         # draft examples from prompt files
python3 skills/eval-models/scripts/eval_models.py my-eval.json --dry-run
python3 skills/eval-models/scripts/eval_models.py my-eval.json --out results
python3 skills/route-models/scripts/make_routing.py --results results/results.json --guards guards.json --out routing
python3 routing/router.py routing/routing.json "your prompt"

评估本地模型的配置:

python3 skills/size-local-model/scripts/estimate_memory.py --params-b 8.03 --bits 16 \
  --layers 32 --kv-heads 8 --head-dim 128 --context 8192 --available-gib 24

测试

python3 -m unittest discover -s tests -v

端到端测试会针对 OpenAI 兼容、Anthropic 和 Gemini API 的本地模拟进行,并通过标准输入/输出驱动 MCP 服务;无需密钥或网络访问。evaluations/ 中包含一项针对 MCP 工具的 10 题 Agent 评估。

发布

  1. 在所有位置更新版本号(python3 tests/check_release_version.py 会列出不一致的字段),并添加一条 CHANGELOG 条目。
  2. 推送标签 vX.Y.Z。release.yml 会运行测试、检查版本号、构建软件包、通过可信发布将其发布到 PyPI,然后将 server.json 发布到官方 MCP 注册表。
  3. 一次性设置:
    • PyPI:为项目 model-finder-mcp 添加一个待处理的可信发布者(所有者 Abhiindigloo、仓库 EvalHarness、工作流 release.yml、环境 pypi),最好通过 Indigloo PyPI 组织添加,并在仓库设置中创建 pypi 环境。
    • MCP 注册表(co.indigloo/model-finder,通过 indigloo.co 域名验证)。在你自己的设备上,使用 OpenSSL 3:
      openssl genpkey -algorithm Ed25519 -out mcp-registry-key.pem
      echo "TXT record for indigloo.co: v=MCPv1; k=ed25519; p=$(openssl pkey -in mcp-registry-key.pem -pubout -outform DER | tail -c 32 | base64)"
      echo "GitHub secret MCP_REGISTRY_PRIVATE_KEY: $(openssl pkey -in mcp-registry-key.pem -noout -text | grep -A3 'priv:' | tail -n +2 | tr -d ' :\n')"
      
      在 indigloo.co 的顶级域添加 TXT 记录,创建仓库环境 mcp-registry,将十六进制密钥保存为该环境的密钥 MCP_REGISTRY_PRIVATE_KEY,然后删除 mcp-registry-key.pem,或将其保存在密码管理器中。
仓库布局
skills/                      shared Agent Skills (single source of truth)
mcp/server.py                local MCP server (stdio, standard library only)
.mcp.json                    MCP launch config for Claude Code and Cursor (${CLAUDE_PLUGIN_ROOT}); disabled as a
                             project config inside this repo by .claude/settings.json
mcp.json                     Agent Plugins MCP launch config (Codex, Copilot CLI, Cursor): runs ./mcp/server.py
server.json, pyproject.toml  MCP Registry entry and PyPI package (model-finder-mcp); pypi/ holds the package marker
glama.json                   Glama directory ownership
.github/workflows/           tests on every push; release.yml publishes tags to PyPI and the MCP Registry
.claude-plugin/              Claude Code (and Copilot CLI) plugin + marketplace manifests
.codex-plugin/               Codex plugin manifest
.agents/plugins/             Codex repository marketplace
.cursor-plugin/              Cursor plugin + marketplace manifests
gemini-extension.json        Gemini CLI extension (context: GEMINI.md)
plugin.json                  Agent Plugins manifest with OpenAI listing metadata
AGENTS.md, GEMINI.md         skill index for agents that read root instructions
PRIVACY.md, TERMS.md, SUPPORT.md  pages the marketplace listings link to
assets/                      logo, README plates, and DESIGN.md (the visual language)

skills/eval-models/scripts/mf_core.py 在 skills/route-models/scripts/ 中有一份副本,以便每个技能都能独立运行。若两份文件不一致,测试套件会失败。


支持 · 隐私 · 条款 · 安全 · 数据保护
MIT 许可证 · © 2026 Indigloo Softwares Private Limited

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。