@4da/mcp-server
@4da/mcp-server
面向 AI 编码代理的依赖智能工具。 提供实时 CVE 扫描、依赖健康检查、升级规划、生态系统新闻以及持久化的决策记忆。零配置,隐私优先。
You: "Check my dependency health"
Claude: Health: 72/100. 47 dependencies scanned, 3 vulnerable, 1 deprecated, 8 outdated.
CRITICAL openssl-sys 0.9.93 CVE-2025-4231 -> 0.9.96
HIGH serde 1.0.197 RUSTSEC-2026-12 -> 1.0.210
MEDIUM cookie 0.17.0 deprecated -> 0.18.1
Quick wins: 6 patch upgrades, 2 minor. Run upgrade_planner for full plan.一条命令即可安装。无需 API 密钥。无需账户。代码绝不会离开您的机器。
安装
claude mcp add 4da -- npx @4da/mcp-server添加到 ~/.cursor/mcp.json 或 ~/.windsurf/mcp.json:
{
"mcpServers": {
"4da": {
"command": "npx",
"args": ["@4da/mcp-server"]
}
}
}添加到 ~/.vscode/mcp.json:
{
"servers": {
"4da": {
"type": "stdio",
"command": "npx",
"args": ["@4da/mcp-server"]
}
}
}添加到 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"4da": {
"command": "npx",
"args": ["@4da/mcp-server"]
}
}
}npx @4da/mcp-server --setup然后询问您的 AI:"Check my dependency health" (检查我的依赖健康状况) 或 "Scan for vulnerabilities" (扫描漏洞)。
Related MCP server: DepsGuard MCP
工作原理
启动时,服务器会读取您的清单和锁定文件 (package.json, Cargo.toml, go.mod, pyproject.toml),解析确切的依赖版本,并查询实时 API:
OSV.dev:用于跨所有生态系统的已知 CVE
npm registry:用于版本新鲜度、弃用状态和每周下载量
crates.io sparse index:用于 Rust 包版本 (避免 1 req/s 的 API 限制)
PyPI JSON API:用于带有许可证标准化的 Python 包元数据
Go module proxy:用于 Go 模块版本
Hacker News Algolia API:用于根据您的技术栈过滤的生态系统新闻
结果会被缓存(注册表数据缓存 24 小时,漏洞缓存 1 小时,新闻缓存 30 分钟)并按来源进行速率限制。
通过网络发送的内容: 包名称 + 版本,通用的技术关键词。这些数据与您 package.json 中可见的数据相同。不包含源代码,不包含文件路径,不包含个人数据。设置 FOURDA_OFFLINE=true 可禁用所有网络调用。
支持的生态系统: npm, crates.io (Rust), PyPI (Python), Go。
您可以询问的内容
"Check my dependency health" -> dependency_health
"Scan for vulnerabilities" -> vulnerability_scan
"Which deps should I upgrade first?" -> upgrade_planner
"What should I know before I start coding?" -> what_should_i_know
"What's happening in the ecosystem?" -> ecosystem_pulse
"What's my tech stack?" -> get_context
"Record a decision: we chose Postgres" -> decision_memory
"Does switching to MySQL align?" -> check_decision_alignment
"Remember: never use ORM for batch inserts" -> agent_memory全部 14 个工具
依赖安全
工具 | 功能 |
| 通过 OSV.dev 进行实时 CVE 扫描。提供严重程度、修复版本、CVSS 分数。 |
| 健康评分 (0-100) + 版本新鲜度、弃用情况、每个依赖的 CVE 数量。 |
| 排名后的升级建议。区分快速修复与重大变更。按风险排序。 |
智能分析
工具 | 功能 |
| 任务前智能简报:漏洞、决策、信号、生态系统更新。 |
| 来自 Hacker News 的实时生态系统新闻,根据您检测到的技术栈进行过滤。 |
| 您的技术栈、已解析的依赖版本、兴趣、关联偏好。 |
| 评分后的内容源 — 按相关性排名的文章、公告、发布信息。 |
| 分类警报:安全公告、重大变更、热门仓库。 |
| 您每天使用但从未深入了解的依赖项。揭示被遗漏的 CVE 和更新。 |
| 保存或忽略项目以教会 4DA 什么是重要的。优化未来的评分。 |
决策与记忆
工具 | 功能 |
| 在会话间记录、查询和管理架构决策。 |
| 验证提议的技术变更是否与已记录的决策一致。 |
| 在会话、代理和编辑器之间持久存在的记忆。 |
身份识别
工具 | 功能 |
| 您的技术身份:主要技术栈、参与模式、盲点。 |
* 需要 4DA 桌面应用 以获取完整数据。
独立模式 vs. 完整模式
MCP 服务器无需桌面应用即可工作。首次运行时,它会创建一个本地数据库并扫描您的项目:
功能 | 独立模式 | 配合 4DA 桌面版 |
漏洞扫描 (OSV.dev) | 是 | 是 |
依赖健康 (4 个注册表) | 是 | 是 |
升级规划 | 是 | 是 |
生态系统新闻 (Hacker News) | 是 | 是 |
任务前智能简报 | 是 | 是 |
技术栈检测 + 已解析版本 | 是 | 是 |
决策记忆 + 一致性检查 | 是 | 是 |
代理记忆 (跨会话) | 是 | 是 |
评分内容源 (20+ 来源) | -- | 是 |
可操作信号 + 知识缺口 | -- | 是 |
复合智能 (随时间学习) | -- | 是 |
下载 4DA 以获得完整体验。
传输方式
stdio (默认) -- 适用于所有 MCP 主机:
npx @4da/mcp-serverStreamable HTTP -- 适用于远程或多客户端设置:
npx @4da/mcp-server --http --port 4840CLI 参考
npx @4da/mcp-server # Start server (stdio)
npx @4da/mcp-server --http # Start server (Streamable HTTP)
npx @4da/mcp-server --setup # Auto-configure your editors
npx @4da/mcp-server --doctor # Verify installation health
npx @4da/mcp-server --version # Print version环境变量
变量 | 描述 | 默认值 |
| 4DA 的 SQLite 数据库路径 | 自动检测 |
| 禁用所有网络调用 |
|
常见问题解答
这会将我的代码发送到任何地方吗?
不会。服务器仅将包名称和版本发送到公共 API (OSV.dev, npm registry, crates.io, PyPI, Go proxy),并将通用技术关键词发送到 HN Algolia。这些数据与您 package.json 中可见的公共数据相同。不包含源代码,不包含文件路径,不包含个人数据。设置 FOURDA_OFFLINE=true 可禁用所有网络调用。
我需要 4DA 桌面应用吗? 不需要。9 个工具可以独立工作:漏洞扫描、依赖健康、升级规划、生态系统新闻、任务前简报、项目上下文、决策记忆、一致性检查和代理记忆。桌面应用增加了来自 20 多个来源的评分内容,这些内容会随时间积累。
它适用于哪些 AI 工具? 任何支持 MCP 的工具:Claude Code, Claude Desktop, Cursor, Windsurf, VS Code (Copilot) 以及任何自定义 MCP 客户端。
从源码构建
git clone https://github.com/runyourempire/4DA.git
cd 4DA/mcp-4da-server
pnpm install
pnpm build
pnpm test # 71 contract tests许可证
MIT
由 4DA 构建
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides crowdsourced package intelligence and security alerts for AI coding assistants by analyzing project dependencies and framework co-occurrence. It enables automated project scans, package alternative discovery, and data-driven recommendations across multiple programming ecosystems.1032MIT
- AlicenseAqualityCmaintenanceAI-powered dependency vulnerability and breaking change analyzer that scans dependencies, identifies vulnerabilities via OSV.dev, and uses AI to assess real impact and suggest fixes.3Apache 2.0
- AlicenseNot gradedqualityFmaintenanceOpen source intelligence for AI agents — GitHub project-health scoring, package dependency-risk analysis, trending repositories, license checks, and side-by-side package comparison.MIT
- AlicenseAqualityDmaintenanceDependency security & health auditing for AI agents with no account or API key required.22MIT
Related MCP Connectors
Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/4DA-Systems/4DA'
If you have feedback or need assistance with the MCP directory API, please join our Discord server