包版本 Mcp 服务器
概览
什么是 mcp-package-version?
mcp-package-version 是由用户 ### sammcj 在 GitHub 上创建的一个仓库。该仓库旨在管理和跟踪 MCP(多通道包)生态系统中的软件包版本。它为需要维护版本控制并确保不同软件包版本之间兼容性的开发人员提供了一个重要工具。
mcp-package-version 的特点
- 版本控制:该仓库允许用户管理多个软件包版本,使得根据需要回滚或升级变得更容易。
- 兼容性跟踪:它有助于跟踪哪些软件包版本彼此兼容,从而减少冲突的风险。
- 公开访问:作为一个公共仓库,它允许其他开发人员进行协作和贡献,增强了软件包管理过程的整体功能和可靠性。
- 文档:提供全面的文档,帮助用户理解如何有效使用该仓库及其功能。
如何使用 mcp-package-version
-
克隆仓库:首先使用以下命令将仓库克隆到本地计算机:
git clone https://github.com/sammcj/mcp-package-version.git
-
安装依赖:导航到克隆的目录,并根据文档中的说明安装任何必要的依赖项。
-
管理版本:使用提供的命令添加、更新或删除软件包版本。确保遵循版本控制指南以保持兼容性。
-
协作:如果您希望贡献,请先分叉仓库,进行更改,然后提交拉取请求以供审核。
-
保持更新:定期检查仓库的更新,以确保您使用的是最新的功能和修复。
常见问题解答
Q1: mcp-package-version 仓库的目的是什么?
A1: mcp-package-version 仓库旨在帮助开发人员管理和跟踪 MCP 生态系统中的软件包版本,确保兼容性和易用性。
Q2: 我如何能为 mcp-package-version 仓库做贡献?
A2: 您可以通过分叉仓库、进行更改并提交拉取请求来贡献。确保遵循文档中提供的贡献指南。
Q3: mcp-package-version 仓库是否对公众开放?
A3: 是的,该仓库是公开的,允许任何人访问、使用和贡献。
Q4: 我在哪里可以找到 mcp-package-version 的文档?
A4: 文档通常在仓库内部提供,通常在 README.md
文件或专门的 docs
目录中。
Q5: 我如何报告 mcp-package-version 仓库中的问题或错误?
A5: 您可以通过导航到仓库中的“问题”标签,提交一个新问题,并详细描述问题来报告问题。
详情
Package Version MCP Server
An MCP server that provides tools for checking latest stable package versions from multiple package registries:
- npm (Node.js/JavaScript)
- PyPI (Python)
- Maven Central (Java)
- Go Proxy (Go)
- Swift Packages (Swift)
- AWS Bedrock (AI Models)
- Docker Hub (Container Images)
- GitHub Container Registry (Container Images)
- GitHub Actions
This server helps LLMs ensure they're recommending up-to-date package versions when writing code.
IMPORTANT: I'm slowly moving across this tool to a component of my mcp-devtools server
<a href="https://glama.ai/mcp/servers/zkts2w92ba"><img width="380" height="200" src="https://glama.ai/mcp/servers/zkts2w92ba/badge" alt="https://github.com/sammcj/mcp-package-version MCP server" /></a>
Screenshot
Installation
Requirements:
- A modern go version installed (See Go Installation)
Using go install
(Recommended for MCP Client Setup):
go install github.com/sammcj/mcp-package-version/v2@HEAD
Then setup your client to use the MCP server. Assuming you've installed the binary with go install github.com/sammcj/mcp-package-version/v2@HEAD
and your $GOPATH
is /Users/sammcj/go/bin
, you can provide the full path to the binary:
{
"mcpServers": {
"package-version": {
"command": "/Users/sammcj/go/bin/mcp-package-version"
}
}
}
- For the Cline VSCode Extension this will be
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
- For Claude Desktop
~/Library/Application\ Support/Claude/claude_desktop_config.json
- For GoMCP
~/.config/gomcp/config.yaml
Other Installation Methods
Or clone the repository and build it:
git clone https://github.com/sammcj/mcp-package-version.git
cd mcp-package-version
make
You can also run the server in a container:
docker run -p 18080:18080 ghcr.io/sammcj/mcp-package-version:main
Note: If running in a container, you'll need to configure the client to use the URL instead of command, e.g.:
{
"mcpServers": {
"package-version": {
"url": "http://localhost:18080",
}
}
}
Tip: Go Path
If $GOPATH/bin
is not in your PATH
, you'll need to provide the full path to the binary when configuring your MCP client (e.g. /Users/sammcj/go/bin/mcp-package-version
).
If you haven't used go applications before and have only just installed go, you may not have a $GOPATH
set up in your environment. This is important for any go install
command to work correctly.
Understanding
$GOPATH
The
go install
command downloads and compiles Go packages, placing the resulting binary executable in thebin
subdirectory of your$GOPATH
. By default,$GOPATH
is > usually located at$HOME/go
on Unix-like systems (including macOS). If you haven't configured$GOPATH
explicitly, Go uses this default.The location
$GOPATH/bin
(e.g.,/Users/your_username/go/bin
) needs to be included in your system'sPATH
environment variable if you want to run installed Go binaries directly by name from any terminal location.You can add the following line to your shell configuration file (e.g.,
~/.zshrc
,~/.bashrc
) to set$GOPATH
to the default if it's not already set, and ensure$GOPATH/bin
is in yourPATH
:[ -z "$GOPATH" ] && export GOPATH="$HOME/go"; echo "$PATH" | grep -q ":$GOPATH/bin" || export PATH="$PATH:$GOPATH/bin"
After adding this line, restart your terminal or MCP client.
Usage
The server supports two transport modes: stdio (default) and SSE (Server-Sent Events).
STDIO Transport (Default)
mcp-package-version
SSE Transport
mcp-package-version --transport sse --port 18080 --base-url "http://localhost:18080"
This would make the server available to clients at http://localhost:18080/sse
(Note the /sse
suffix!).
Command-line Options
--transport
,-t
: Transport type (stdio or sse). Default: stdio--port
: Port to use for SSE transport. Default: 18080--base-url
: Base URL for SSE transport. Default: http://localhost
Docker Images
Docker images are available from GitHub Container Registry:
docker pull ghcr.io/sammcj/mcp-package-version:main
You can also see the example docker-compose.yaml.
Tools
NPM Packages
Check the latest versions of NPM packages:
{
"name": "check_npm_versions",
"arguments": {
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"lodash": "4.17.21"
},
"constraints": {
"react": {
"majorVersion": 17
}
}
}
}
Python Packages (requirements.txt)
Check the latest versions of Python packages from requirements.txt:
{
"name": "check_python_versions",
"arguments": {
"requirements": [
"requests==2.28.1",
"flask>=2.0.0",
"numpy"
]
}
}
Python Packages (pyproject.toml)
Check the latest versions of Python packages from pyproject.toml:
{
"name": "check_pyproject_versions",
"arguments": {
"dependencies": {
"dependencies": {
"requests": "^2.28.1",
"flask": ">=2.0.0"
},
"optional-dependencies": {
"dev": {
"pytest": "^7.0.0"
}
},
"dev-dependencies": {
"black": "^22.6.0"
}
}
}
}
Java Packages (Maven)
Check the latest versions of Java packages from Maven:
{
"name": "check_maven_versions",
"arguments": {
"dependencies": [
{
"groupId": "org.springframework.boot",
"artifactId": "spring-boot-starter-web",
"version": "2.7.0"
},
{
"groupId": "com.google.guava",
"artifactId": "guava",
"version": "31.1-jre"
}
]
}
}
Java Packages (Gradle)
Check the latest versions of Java packages from Gradle:
{
"name": "check_gradle_versions",
"arguments": {
"dependencies": [
{
"configuration": "implementation",
"group": "org.springframework.boot",
"name": "spring-boot-starter-web",
"version": "2.7.0"
},
{
"configuration": "testImplementation",
"group": "junit",
"name": "junit",
"version": "4.13.2"
}
]
}
}
Go Packages
Check the latest versions of Go packages from go.mod:
{
"name": "check_go_versions",
"arguments": {
"dependencies": {
"module": "github.com/example/mymodule",
"require": [
{
"path": "github.com/gorilla/mux",
"version": "v1.8.0"
},
{
"path": "github.com/spf13/cobra",
"version": "v1.5.0"
}
]
}
}
}
Docker Images
Check available tags for Docker images:
{
"name": "check_docker_tags",
"arguments": {
"image": "nginx",
"registry": "dockerhub",
"limit": 5,
"filterTags": ["^1\\."],
"includeDigest": true
}
}
AWS Bedrock Models
List all AWS Bedrock models:
{
"name": "check_bedrock_models",
"arguments": {
"action": "list"
}
}
Search for specific AWS Bedrock models:
{
"name": "check_bedrock_models",
"arguments": {
"action": "search",
"query": "claude",
"provider": "anthropic"
}
}
Get the latest Claude Sonnet model:
{
"name": "get_latest_bedrock_model",
"arguments": {}
}
Swift Packages
Check the latest versions of Swift packages:
{
"name": "check_swift_versions",
"arguments": {
"dependencies": [
{
"url": "https://github.com/apple/swift-argument-parser",
"version": "1.1.4"
},
{
"url": "https://github.com/vapor/vapor",
"version": "4.65.1"
}
],
"constraints": {
"https://github.com/apple/swift-argument-parser": {
"majorVersion": 1
}
}
}
}
GitHub Actions
Check the latest versions of GitHub Actions:
{
"name": "check_github_actions",
"arguments": {
"actions": [
{
"owner": "actions",
"repo": "checkout",
"currentVersion": "v3"
},
{
"owner": "actions",
"repo": "setup-node",
"currentVersion": "v3"
}
],
"includeDetails": true
}
}
Releases and CI/CD
This project uses GitHub Actions for continuous integration and deployment. The workflow automatically:
- Builds and tests the application on every push to the main branch and pull requests
- Creates a release when a tag with the format
v*
(e.g.,v1.0.0
) is pushed - Builds and pushes Docker images to GitHub Container Registry
License
Server配置
{
"mcpServers": {
"mcp-package-version": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--sammcj--mcp-package-version--mcp-package-version",
"./out --transport transport --base-url base-url"
],
"env": {}
}
}
}