@devpuccino/mcp-woodpecker 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BerryJ
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,345 @@
1
+ # MCP Woodpecker Server
2
+
3
+ [![npm version](https://badge.fury.io/js/mcp-woodpecker.svg)](https://www.npmjs.com/package/mcp-woodpecker)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
6
+ [![status-badge](https://woodpecker.devpuccino.com/api/badges/2/status.svg?events=tag)](https://woodpecker.devpuccino.com/repos/2)
7
+
8
+ A comprehensive [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for seamlessly integrating [Woodpecker CI](https://woodpecker-ci.org) with AI-powered tools. This server provides 41+ tools to manage repositories, pipelines, secrets, registries, crons, and organization settings programmatically. Fully compatible with Woodpecker CI 3.13.0 API.
9
+
10
+ Perfect for automating CI/CD workflows, integrating with Claude AI, or building custom Woodpecker management tools.
11
+
12
+ ## 🔄 Compatibility
13
+
14
+ | Component | Version | Notes |
15
+ |-----------|---------|-------|
16
+ | **mcp-woodpecker** | 1.0.0+ | MCP Server implementation |
17
+ | **Woodpecker CI API** | 3.13.0+ | Tested against Woodpecker CI v3.13.0 (January 2026) |
18
+ | **Node.js** | 18.0.0+ | Minimum required version |
19
+ | **MCP SDK** | ^1.27.1 | Model Context Protocol SDK |
20
+
21
+ This server is compatible with Woodpecker CI 3.13.0 and later. The implementation follows the official Woodpecker API specification with support for modern endpoints and features.
22
+
23
+ ## ✨ Features
24
+
25
+ - **Repository Management** - List, get, activate, update, and delete repositories
26
+ - **Pipeline Management** - Trigger, cancel, monitor pipelines with detailed logs and status
27
+ - **Secrets Management** - Create and manage repository and organization-level secrets securely
28
+ - **Registry Configuration** - Manage Docker registry credentials for authenticated builds
29
+ - **Cron Jobs** - Schedule and manage automated pipeline executions with flexible expressions
30
+ - **User & Server Info** - Get authenticated user details and server information
31
+ - **Full Type Safety** - Built with TypeScript for reliable development
32
+
33
+ ## 🚀 Quick Start
34
+
35
+ ### Installation
36
+
37
+ ```bash
38
+ npm install -g mcp-woodpecker
39
+ ```
40
+
41
+ Or as a project dependency:
42
+
43
+ ```bash
44
+ npm install mcp-woodpecker
45
+ ```
46
+
47
+ ### Prerequisites
48
+
49
+ - **Node.js** 18.0.0 or higher
50
+ - **Woodpecker CI** instance running and accessible
51
+ - **API Token** from your Woodpecker instance (Personal Access Token)
52
+
53
+ ### Basic Setup
54
+
55
+ 1. **Get your Woodpecker API token:**
56
+ - Navigate to your Woodpecker instance (e.g., https://woodpecker.example.com/)
57
+ - Go to Settings → Personal Access Tokens
58
+ - Create a new token with appropriate permissions
59
+
60
+ 2. **Set environment variables:**
61
+
62
+ ```bash
63
+ export WOODPECKER_URL=https://woodpecker.example.com/
64
+ export WOODPECKER_API_KEY=your_api_token_here
65
+ ```
66
+
67
+ 3. **Run the MCP server:**
68
+
69
+ ```bash
70
+ mcp-woodpecker
71
+ ```
72
+
73
+ Or in development mode with hot reload:
74
+
75
+ ```bash
76
+ npm install --save-dev mcp-woodpecker
77
+ npm run dev
78
+ ```
79
+
80
+ ### Using with npx (No Installation)
81
+
82
+ Run the server directly without installing it globally:
83
+
84
+ ```bash
85
+ export WOODPECKER_URL=https://woodpecker.example.com/
86
+ export WOODPECKER_API_KEY=your_api_token_here
87
+ npx mcp-woodpecker
88
+ ```
89
+
90
+ This is useful for testing, CI/CD pipelines, or ephemeral environments.
91
+
92
+ ### Using with Claude AI
93
+
94
+ Add to your `.claude/config.json`:
95
+
96
+ ```json
97
+ {
98
+ "servers": {
99
+ "woodpecker": {
100
+ "command": "npx",
101
+ "args":["-y","mcp-woodpecker"],
102
+ "env": {
103
+ "WOODPECKER_URL": "https://woodpecker.example.com/",
104
+ "WOODPECKER_API_KEY": "your_api_token"
105
+ }
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ ## Environment Variables
112
+
113
+ | Variable | Description | Example |
114
+ |----------|-------------|---------|
115
+ | `WOODPECKER_URL` | Base URL of your Woodpecker instance | `https://woodpecker.example.com` |
116
+ | `WOODPECKER_API_KEY` | Personal access token for API authentication | `eyJ...` |
117
+
118
+ ## Available Tools
119
+
120
+ ### Repository Tools
121
+
122
+ - `list_repositories` - List all accessible repositories
123
+ - `get_repository` - Get details of a specific repository
124
+ - `activate_repository` - Activate a repository
125
+ - `update_repository` - Update repository settings (trusted status, visibility, config path)
126
+ - `delete_repository` - Remove a repository from Woodpecker
127
+
128
+ ### Pipeline Tools
129
+
130
+ - `list_pipelines` - List pipelines with optional filtering by branch or status
131
+ - `get_pipeline` - Get detailed pipeline information
132
+ - `get_pipeline_status` - Get pipeline status badge data
133
+ - `trigger_pipeline` - Trigger a new pipeline execution
134
+ - `cancel_pipeline` - Cancel a running pipeline
135
+ - `get_pipeline_logs` - Retrieve logs from a specific step
136
+ - `delete_pipeline_logs` - Clear pipeline logs
137
+
138
+ ### Secret Management Tools
139
+
140
+ **Repository Secrets:**
141
+ - `list_secrets` - List all secrets in a repository
142
+ - `get_secret` - Get a specific secret
143
+ - `create_secret` - Create a new secret
144
+ - `update_secret` - Update an existing secret
145
+ - `delete_secret` - Remove a secret
146
+
147
+ **Organization Secrets:**
148
+ - `list_org_secrets` - List organization-level secrets
149
+ - `get_org_secret` - Get a specific org secret
150
+ - `create_org_secret` - Create a new org secret
151
+ - `update_org_secret` - Update an org secret
152
+ - `delete_org_secret` - Remove an org secret
153
+
154
+ ### Registry Tools
155
+
156
+ - `list_registries` - List configured Docker registries
157
+ - `get_registry` - Get registry configuration
158
+ - `create_registry` - Add a new registry
159
+ - `update_registry` - Update registry credentials (new in v1.0.0)
160
+ - `delete_registry` - Remove a registry
161
+
162
+ ### Cron Job Tools
163
+
164
+ - `list_crons` - List scheduled cron jobs
165
+ - `get_cron` - Get cron job details
166
+ - `create_cron` - Create a new scheduled job
167
+ - `update_cron` - Update cron configuration
168
+ - `delete_cron` - Remove a cron job
169
+
170
+ ### Server Tools
171
+
172
+ - `get_current_user` - Get authenticated user information
173
+ - `get_server_info` - Get Woodpecker server version and info
174
+
175
+ ## CI/CD Pipeline
176
+
177
+ This project includes a `.woodpecker.yml` configuration that provides:
178
+
179
+ ### Build & Test Stages
180
+
181
+ - **Feature Builds**: Manual trigger for testing features
182
+ - **Development Builds**: Automatic on push to `develop` branch
183
+ - **Production Builds**: Automatic on version tags (v*)
184
+
185
+ ### Docker Builds
186
+
187
+ - Multi-stage Docker builds with registry authentication
188
+ - Separate images for test, dev, and production environments
189
+
190
+ ### Deployment Stages
191
+
192
+ - **Test Deployment**: Manual deployment of test image
193
+ - **Development Deployment**: Automatic deployment on develop push
194
+ - **Production Deployment**: Automatic deployment on version tag + npm publish
195
+
196
+ ### npm Publishing
197
+
198
+ Production releases are automatically published to the npm registry on version tags.
199
+
200
+ ## Required Secrets
201
+
202
+ For CI/CD to work, configure these secrets in your Woodpecker instance:
203
+
204
+ | Secret | Description |
205
+ |--------|-------------|
206
+ | `REGISTRY_USERNAME` | Docker registry username |
207
+ | `REGISTRY_PASSWORD` | Docker registry password/token |
208
+ | `NPM_TOKEN` | npm registry authentication token |
209
+ | `WOODPECKER_URL_TEST` | Test Woodpecker instance URL |
210
+ | `WOODPECKER_API_KEY_TEST` | Test instance API key |
211
+ | `WOODPECKER_URL_DEV` | Development Woodpecker instance URL |
212
+ | `WOODPECKER_API_KEY_DEV` | Development instance API key |
213
+ | `WOODPECKER_URL` | Production Woodpecker instance URL |
214
+ | `WOODPECKER_API_KEY` | Production instance API key |
215
+
216
+ ## Repository Structure
217
+
218
+ ```
219
+ feature/* → develop (feature development)
220
+ develop → master (testing environment)
221
+ master → production (stable releases)
222
+ v* → npm + docker registry (tagged releases)
223
+ ```
224
+
225
+ ## 🐳 Docker Usage
226
+
227
+ ### Build Docker Image
228
+
229
+ ```bash
230
+ docker build -t mcp-woodpecker:latest .
231
+ ```
232
+
233
+ ### Run in Docker
234
+
235
+ ```bash
236
+ docker run -d \
237
+ -e WOODPECKER_URL=https://woodpecker.example.com \
238
+ -e WOODPECKER_API_KEY=your_token \
239
+ --name mcp-woodpecker \
240
+ mcp-woodpecker:latest
241
+ ```
242
+
243
+ ### Docker Compose
244
+
245
+ ```yaml
246
+ version: '3.8'
247
+ services:
248
+ mcp-woodpecker:
249
+ build: .
250
+ environment:
251
+ WOODPECKER_URL: https://woodpecker.example.com
252
+ WOODPECKER_API_KEY: ${WOODPECKER_API_KEY}
253
+ restart: unless-stopped
254
+ ```
255
+
256
+ ## 📝 Publishing to npm
257
+
258
+ This package is published to npm as [@devpuccino/mcp-woodpecker](https://www.npmjs.com/package/mcp-woodpecker).
259
+
260
+ ### Version Management
261
+
262
+ Versions follow [Semantic Versioning](https://semver.org/):
263
+ - **MAJOR**: Breaking API changes
264
+ - **MINOR**: New features (backward compatible)
265
+ - **PATCH**: Bug fixes and patches
266
+
267
+ ### Release Process
268
+
269
+ 1. **Update version in package.json:**
270
+
271
+ ```bash
272
+ npm version major|minor|patch
273
+ ```
274
+
275
+ 2. **Push changes:**
276
+
277
+ ```bash
278
+ git push origin master --tags
279
+ ```
280
+
281
+ 3. **Publish to npm:**
282
+
283
+ ```bash
284
+ npm publish
285
+ ```
286
+
287
+ The Woodpecker CI pipeline automatically publishes to npm on version tags.
288
+
289
+ ## 🤝 Contributing
290
+
291
+ Contributions are welcome! See [CONTRIBUTE.md](CONTRIBUTE.md) for detailed guidelines on:
292
+
293
+ - Setting up your development environment
294
+ - Adding new tools to the MCP server
295
+ - Code quality standards
296
+ - Pull request process
297
+ - Commit message conventions
298
+
299
+ For bug reports and feature requests, please open an [issue](https://github.com/berryj85/mcp-woodpecker/issues).
300
+
301
+ ## 🐛 Troubleshooting
302
+
303
+ ### Authentication Error
304
+ ```
305
+ Error: Woodpecker API error: 401 Unauthorized
306
+ ```
307
+ - Verify `WOODPECKER_API_KEY` is correct
308
+ - Check token hasn't expired
309
+ - Ensure user has API access permissions
310
+
311
+ ### Connection Refused
312
+ ```
313
+ Error: connect ECONNREFUSED
314
+ ```
315
+ - Verify `WOODPECKER_URL` is accessible
316
+ - Check network connectivity
317
+ - Ensure Woodpecker instance is running
318
+
319
+ ### Module Not Found
320
+ ```
321
+ Error: Cannot find module '@modelcontextprotocol/sdk'
322
+ ```
323
+ - Run `npm install` to install dependencies
324
+ - Clear npm cache: `npm cache clean --force`
325
+ - Delete node_modules and reinstall: `rm -rf node_modules && npm install`
326
+
327
+ ## 📄 License
328
+
329
+ MIT License © 2026 BerryJ
330
+
331
+ See [LICENSE](LICENSE) file for details.
332
+
333
+ ## 🔗 Resources
334
+
335
+ - **[Woodpecker CI Documentation](https://woodpecker-ci.org)** - Official Woodpecker documentation
336
+ - **[MCP Specification](https://modelcontextprotocol.io)** - Model Context Protocol details
337
+ - **[Woodpecker API Reference](https://woodpecker-ci.org/api)** - REST API documentation
338
+ - **[npm Package](https://www.npmjs.com/package/mcp-woodpecker)** - npm registry entry
339
+ - **[GitHub Repository](https://github.com/berryj85/mcp-woodpecker)** - Source code
340
+
341
+ ## 🙋 Support
342
+
343
+ - **Issues:** [GitHub Issues](https://github.com/berryj85/mcp-woodpecker/issues)
344
+ - **Discussions:** [GitHub Discussions](https://github.com/berryj85/mcp-woodpecker/discussions)
345
+ - **npm Profile:** [@devpuccino](https://www.npmjs.com/~devpuccino)
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=woodpecker-client.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"woodpecker-client.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/woodpecker-client.test.ts"],"names":[],"mappings":""}