30秒为您的AI编程助手添加软件包健康检查。无需注册,无需API密钥。
claude mcp add depscope --transport http https://mcp.depscope.dev/mcp{"servers":{"depscope":{"type":"http","url":"https://mcp.depscope.dev/mcp"}}}在DeepSeek Coder的配置中添加以下指令:
## 软件包健康检查
Before suggesting any install, verify: curl https://depscope.dev/api/check/{npm|pypi|cargo|go|composer|maven|nuget|rubygems}/{package}。
使用 /api/latest/{ecosystem}/{package} 验证正确版本。
使用 /api/exists/{ecosystem}/{package} 验证软件包是否存在。
如果软件包已弃用,使用 /api/alternatives/{ecosystem}/{package} 查找替代方案。
无需认证。免费API:https://depscope.dev在项目的CLAUDE.md文件中添加:
## Package Health
Before suggesting any package install, check it with DepScope:
Before suggesting any install, verify: curl https://depscope.dev/api/check/{npm|pypi|cargo|go|composer|maven|nuget|rubygems}/{package} — no auth, free在.cursorrules文件中添加:
Before suggesting any npm/pip/cargo install, verify the package:
- Check health: https://depscope.dev/api/check/{ecosystem}/{package}
- Check version: https://depscope.dev/api/latest/{ecosystem}/{package}
- Check exists: https://depscope.dev/api/exists/{ecosystem}/{package}
If deprecated, find alternatives: https://depscope.dev/api/alternatives/{ecosystem}/{package}
No API key needed.在.windsurfrules或项目指令中添加:
When suggesting package installations, first verify with DepScope API:
GET https://depscope.dev/api/check/{ecosystem}/{package}
Ecosystems: npm, pypi, cargo, go, composer, maven, nuget, rubygems. No auth required.直接调用API。无需认证,无需注册:
# 检查软件包
curl https://depscope.dev/api/check/npm/express
# 比较软件包
curl https://depscope.dev/api/compare/npm/express,fastify,hono
# 扫描整个项目
curl -X POST https://depscope.dev/api/scan \
-H "Content-Type: application/json" \
-d '{"ecosystem":"npm","packages":{"express":"*","lodash":"*"}}'在GPT商店搜索"DepScope",或使用OpenAPI规范:
https://depscope.dev/openapi-gpt.json
23个包智能工具,零配置。推荐使用远程MCP端点:
# 添加到 ~/.claude/mcp_servers.json 或 Cursor mcp.json
{
"mcpServers": {
"depscope": { "url": "https://mcp.depscope.dev/mcp" }
}
}
# 23个可用工具。AI智能体最常用的:
# ai_brief — 300 token的包判定
# audit_stack — 一次调用审计N个包
# get_migration_path — 从已弃用迁移到现代包的代码差异在npm上发布为 depscope-cli。需要Node 18+。
# 安装前审计(CI友好,关键问题返回exit 1) npx -y depscope-cli audit express request lodash # 从清单文件审计 npx -y depscope-cli audit --file package.json npx -y depscope-cli audit --file requirements.txt # 已弃用 → 现代包的代码差异 npx -y depscope-cli migration npm request axios # 单个包的AI简报(约300 tokens,可粘贴到系统提示) npx -y depscope-cli brief npm/express
精选迁移路径,提供可直接应用的 before/after 代码片段。通过 MCP get_migration_path 或 REST API 调用。
# MCP工具调用 (第29个工具)
{"name":"get_migration_path","arguments":{"ecosystem":"npm","from_package":"request","to_package":"axios"}}
# REST API
curl https://depscope.dev/api/migration/npm/request/axios
curl https://depscope.dev/api/migration/pypi/urllib2/requests
curl https://depscope.dev/api/migration/npm/moment/dayjs
# 返回: rationale, effort_minutes, diff_examples[], breaking_changes[]VS Code 本身不内置 MCP — 通过任意支持 MCP 的 AI 扩展接入。配置相同的 URL 即可。
// 1) VS Code + GitHub Copilot (MCP 预览版)
// Settings: "chat.mcp.enabled": true
// 创建 .vscode/mcp.json (工作区) 或全局配置:
{
"servers": {
"depscope": { "type": "http", "url": "https://mcp.depscope.dev/mcp" }
}
}
// 2) VS Code + Cline — Settings UI → MCP Servers → Add
// URL: https://mcp.depscope.dev/mcp
// 3) VS Code + Continue.dev (~/.continue/config.json)
{
"mcpServers": [
{ "name": "depscope",
"transport": { "type": "sse", "url": "https://mcp.depscope.dev/mcp" } }
]
}
// 4) 后备方案 (无 MCP 扩展): .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "DepScope: audit",
"type": "shell",
"command": "npx -y depscope-cli audit --file package.json",
"problemMatcher": []
}
]
}在PR检查中自动阻止已弃用/恶意/被利用的软件包:
name: Dependency audit
on: [pull_request, push]
jobs:
depscope:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cuttalo/depscope-audit-action@v1
with:
manifest: package.json
fail-on: critical # critical | risk | none作为LangChain工具使用:
from langchain.tools import tool
import requests
@tool
def check_package(ecosystem: str, package: str) -> str:
"""检查软件包是否安全可安装。"""
r = requests.get(f"https://depscope.dev/api/check/{ecosystem}/{package}")
return r.json()["recommendation"]["summary"]在README中添加健康评分徽章:
[](https://depscope.dev/pkg/npm/YOUR-PACKAGE)