|
| 1 | +# PackagePulse Quick Start Guide |
| 2 | + |
| 3 | +This guide will help you quickly set up and run PackagePulse MCP server for vulnerability scanning and package health analysis. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- **Go 1.24.3 or higher** - Required for building the project |
| 8 | +- Terminal/Command line access |
| 9 | + |
| 10 | +## Installation |
| 11 | + |
| 12 | +### 1. Clone the Repository |
| 13 | + |
| 14 | +```bash |
| 15 | +git clone https://github.com/rayprogramming/PackagePulse.git |
| 16 | +cd PackagePulse |
| 17 | +``` |
| 18 | + |
| 19 | +### 2. Install Dependencies |
| 20 | + |
| 21 | +```bash |
| 22 | +go mod download |
| 23 | +``` |
| 24 | + |
| 25 | +### 3. Build the Project |
| 26 | + |
| 27 | +```bash |
| 28 | +go build -o PackagePulse |
| 29 | +``` |
| 30 | + |
| 31 | +This will create a `PackagePulse` binary in your current directory. |
| 32 | + |
| 33 | +## Running PackagePulse |
| 34 | + |
| 35 | +### Basic Usage |
| 36 | + |
| 37 | +PackagePulse runs as an MCP (Model Context Protocol) server using stdio transport: |
| 38 | + |
| 39 | +```bash |
| 40 | +./PackagePulse |
| 41 | +``` |
| 42 | + |
| 43 | +The server will start and communicate via stdin/stdout, ready to accept MCP protocol messages. |
| 44 | + |
| 45 | +### Using with MCP Inspector |
| 46 | + |
| 47 | +To test the server interactively, use the official MCP Inspector: |
| 48 | + |
| 49 | +```bash |
| 50 | +npx @modelcontextprotocol/inspector ./PackagePulse |
| 51 | +``` |
| 52 | + |
| 53 | +### Using with MCP Clients |
| 54 | + |
| 55 | +Configure your MCP client (e.g., Claude Desktop, VSCode extensions) to connect to PackagePulse: |
| 56 | + |
| 57 | +**Example Claude Desktop configuration** (`claude_desktop_config.json`): |
| 58 | + |
| 59 | +```json |
| 60 | +{ |
| 61 | + "mcpServers": { |
| 62 | + "packagepulse": { |
| 63 | + "command": "/path/to/PackagePulse/PackagePulse" |
| 64 | + } |
| 65 | + } |
| 66 | +} |
| 67 | +``` |
| 68 | + |
| 69 | +## Available Features |
| 70 | + |
| 71 | +PackagePulse provides the following MCP tools: |
| 72 | + |
| 73 | +### 1. Vulnerability Scanning (`vulns`) |
| 74 | +Check packages for known security vulnerabilities using OSV database. |
| 75 | + |
| 76 | +**Example:** |
| 77 | +```json |
| 78 | +{ |
| 79 | + "ecosystem": "npm", |
| 80 | + "package": "lodash", |
| 81 | + "version": "4.17.19" |
| 82 | +} |
| 83 | +``` |
| 84 | + |
| 85 | +### 2. Package Health Analysis (`health`) |
| 86 | +Analyze package maintenance status, update frequency, and overall health. |
| 87 | + |
| 88 | +**Example:** |
| 89 | +```json |
| 90 | +{ |
| 91 | + "ecosystem": "npm", |
| 92 | + "package": "express" |
| 93 | +} |
| 94 | +``` |
| 95 | + |
| 96 | +### 3. License Information (`license`) |
| 97 | +Retrieve SPDX license details, compatibility, and categorization. |
| 98 | + |
| 99 | +**Example:** |
| 100 | +```json |
| 101 | +{ |
| 102 | + "license_id": "MIT" |
| 103 | +} |
| 104 | +``` |
| 105 | + |
| 106 | +### 4. Upgrade Planning (`upgrade-plan`) |
| 107 | +Generate smart upgrade recommendations based on vulnerabilities and package health. |
| 108 | + |
| 109 | +**Example:** |
| 110 | +```json |
| 111 | +{ |
| 112 | + "ecosystem": "npm", |
| 113 | + "package": "lodash", |
| 114 | + "current_version": "4.17.19" |
| 115 | +} |
| 116 | +``` |
| 117 | + |
| 118 | +## Development |
| 119 | + |
| 120 | +### Running Tests |
| 121 | + |
| 122 | +```bash |
| 123 | +go test -v ./... |
| 124 | +``` |
| 125 | + |
| 126 | +**Note:** Some tests require network access to external APIs (OSV, deps.dev). They may fail in restricted environments but this is expected. |
| 127 | + |
| 128 | +### Linting |
| 129 | + |
| 130 | +```bash |
| 131 | +go vet ./... |
| 132 | +``` |
| 133 | + |
| 134 | +For comprehensive linting with golangci-lint: |
| 135 | + |
| 136 | +```bash |
| 137 | +# Install golangci-lint |
| 138 | +go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest |
| 139 | + |
| 140 | +# Run linter |
| 141 | +golangci-lint run ./... |
| 142 | +``` |
| 143 | + |
| 144 | +### Local Development |
| 145 | + |
| 146 | +For active development, you can run the server directly: |
| 147 | + |
| 148 | +```bash |
| 149 | +go run main.go |
| 150 | +``` |
| 151 | + |
| 152 | +## Troubleshooting |
| 153 | + |
| 154 | +### Binary Not Found |
| 155 | +If you get "command not found" after building: |
| 156 | +- Make sure you're in the correct directory |
| 157 | +- Use `./PackagePulse` (with `./` prefix) on Unix/Linux/macOS |
| 158 | +- Use `PackagePulse.exe` on Windows |
| 159 | + |
| 160 | +### Build Failures |
| 161 | +If `go build` fails: |
| 162 | +- Verify your Go version: `go version` (must be 1.24.3+) |
| 163 | +- Ensure dependencies are downloaded: `go mod download` |
| 164 | +- Try cleaning the build cache: `go clean -cache` |
| 165 | + |
| 166 | +### Connection Issues |
| 167 | +If the MCP client can't connect: |
| 168 | +- Verify the binary path in your client configuration |
| 169 | +- Check that the binary has execute permissions: `chmod +x PackagePulse` |
| 170 | +- Review client logs for specific error messages |
| 171 | + |
| 172 | +## Project Structure |
| 173 | + |
| 174 | +``` |
| 175 | +PackagePulse/ |
| 176 | +├── main.go # Server entry point |
| 177 | +├── go.mod # Go module definition |
| 178 | +├── internal/ |
| 179 | +│ ├── tools/ # MCP tool implementations |
| 180 | +│ ├── resources/ # MCP resource handlers |
| 181 | +│ └── providers/ # External API clients |
| 182 | +│ ├── osv/ # OSV vulnerability database |
| 183 | +│ ├── depsdev/ # Google deps.dev API |
| 184 | +│ └── spdx/ # SPDX license information |
| 185 | +└── QUICKSTART.md # This file |
| 186 | +``` |
| 187 | + |
| 188 | +## Next Steps |
| 189 | + |
| 190 | +- Explore the [hypermcp framework documentation](https://github.com/rayprogramming/hypermcp) |
| 191 | +- Review the [MCP protocol specification](https://modelcontextprotocol.io) |
| 192 | +- Check out example integrations in the `examples/` directory (coming soon) |
| 193 | + |
| 194 | +## Support |
| 195 | + |
| 196 | +For issues, questions, or contributions: |
| 197 | +- Open an issue on [GitHub](https://github.com/rayprogramming/PackagePulse/issues) |
| 198 | +- Review existing documentation in the repository |
| 199 | + |
| 200 | +--- |
| 201 | + |
| 202 | +**Version:** 1.0.0 |
| 203 | +**Last Updated:** 2025-10-15 |
0 commit comments