一款强大的模型上下文协议(MCP)服务器,通过人工智能革新了NPM包分析。该服务器旨在与Claude和Anthropic AI集成,提供实时智能,包括包的安全性、依赖关系和性能分析。此MCP服务器提供了即时洞察和智能分析,以保护和优化您的npm生态系统,使包管理决策更快更安全,适用于现代开发工作流程。
注意:该服务器通过MCP集成提供AI辅助分析。
此MCP服务器现在支持STDIO和HTTP可流式传输。您现有的STDIO配置将继续正常工作,无需更改。
新功能:
开发命令:
# 开发服务器带游乐场
npm run dev
# 构建HTTP
npm run build:http
# 启动HTTP服务器
npm run start:http
<img alt="在VS Code中安装(npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=安装NPM%20Sentinel%20MCP&color=0098FF"> <img alt="在VS Code Insiders中安装(npx)" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=安装NPM%20Sentinel%20MCP&color=24bfa5">
将以下内容添加到您的VS Code MCP配置文件中。更多信息请参阅VS Code MCP文档。
{
"servers": {
"npm-sentinel": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@nekzus/mcp-server@latest"]
}
}
}
此MCP服务器现在通过Smithery.ai支持HTTP可流式传输,以增强可扩展性和性能。您可以直接在Smithery.ai上部署它:
HTTP部署的好处:
Smithery.ai配置:
{
"mcpServers": {
"npm-sentinel": {
"type": "http",
"url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
}
}
}
# 构建Docker镜像
docker build -t nekzus/npm-sentinel-mcp .
您可以使用Docker运行MCP服务器,并挂载目录到/projects:
{
"mcpServers": {
"npm-sentinel-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-w", "/projects",
"--mount", "type=bind,src=${PWD},dst=/projects",
"nekzus/npm-sentinel-mcp",
"node",
"dist/index.js"
]
}
}
}
对于多个目录:
{
"mcpServers": {
"npm-sentinel-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-w", "/projects",
"--mount", "type=bind,src=/path/to/workspace,dst=/projects/workspace",
"--mount", "type=bind,src=/path/to/other/dir,dst=/projects/other/dir,ro",
"nekzus/npm-sentinel-mcp",
"node",
"dist/index.js"
]
}
}
}
注意:所有挂载的目录必须位于/projects下,以便正确访问。
将以下内容添加到您的claude_desktop_config.json:
{
"mcpServers": {
"npmsentinel": {
"command": "npx",
"args": ["-y", "@nekzus/mcp-server@latest"]
}
}
}
配置文件位置:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"npm-sentinel-mcp": {
"command": "npx",
"args": [
"-y",
"@nekzus/mcp-server@latest"
]
}
}
}
服务器通过Model Context Protocol公开其工具。所有工具都遵循标准化的响应格式:
{
"content": [
{
"type": "text",
"text": "string",
"isError": boolean // 可选
}
// 如有必要,更多内容项
]
}
npm://registry: NPM注册表接口npm://security: 安全分析接口npm://metrics: 包度量接口服务器还提供了以下信息资源,可通过MCP GetResource请求访问:
doc://server/readme:
README.md文件内容。text/markdowndoc://mcp/specification:
llms-full.txt内容,提供全面的Model Context Protocol规范。text/plainpackages (字符串数组)packages (字符串数组)packages (字符串数组)packages (字符串数组)packages (字符串数组)packages (字符串数组)packages (字符串数组)period ("last-week" | "last-month" | "last-year")packages (字符串数组)packages (字符串数组)packages (字符串数组)packages (字符串数组)query (字符串)limit (数字,可选)packages (字符串数组)packages (字符串数组)packages (字符串数组)packages (字符串数组)packages (字符串数组)packages (字符串数组)packages (字符串数组)# 安装依赖
npm install
# 为STDIO构建(传统)
npm run build:stdio
# 为HTTP构建(Smithery)
npm run build:http
# 开发服务器
npm run dev
此MCP服务器采用MIT许可证。这意味着您可以自由地使用、修改和分发软件,但需遵守MIT许可证的条款和条件。详情请参阅项目存储库中的LICENSE文件。
MIT © nekzus