feat: Added NPX support
This commit is contained in:
parent
6abca3e7d0
commit
c72336b460
5 changed files with 196 additions and 6 deletions
48
.npmignore
Normal file
48
.npmignore
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
# Source files
|
||||||
|
src/
|
||||||
|
*.ts
|
||||||
|
!*.d.ts
|
||||||
|
|
||||||
|
# Development files
|
||||||
|
.gitignore
|
||||||
|
tsconfig.json
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Test files
|
||||||
|
test/
|
||||||
|
*.test.js
|
||||||
|
*.spec.js
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
*.log
|
||||||
|
node_modules/
|
||||||
|
.npm/
|
||||||
|
|
||||||
|
# OS files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Editor files
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
|
# Documentation source
|
||||||
|
docs/
|
||||||
|
|
||||||
|
# Scripts (except built ones)
|
||||||
|
scripts/
|
||||||
|
|
||||||
|
# Setup guides (keep README)
|
||||||
|
SETUP_GUIDE.md
|
||||||
|
SETUP_GUIDE_SERVER.md
|
||||||
|
|
||||||
|
# Git
|
||||||
|
.git/
|
||||||
|
.gitattributes
|
||||||
|
|
||||||
|
# Other
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
44
CHANGELOG.md
Normal file
44
CHANGELOG.md
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.2.0] - 2025-06-04
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Complete implementation of all Bitbucket MCP tools
|
||||||
|
- Support for both Bitbucket Cloud and Server
|
||||||
|
- Core PR lifecycle tools:
|
||||||
|
- `create_pull_request` - Create new pull requests
|
||||||
|
- `update_pull_request` - Update PR details
|
||||||
|
- `merge_pull_request` - Merge pull requests
|
||||||
|
- `list_branches` - List repository branches
|
||||||
|
- `delete_branch` - Delete branches
|
||||||
|
- Enhanced `add_comment` with inline comment support
|
||||||
|
- Code review tools:
|
||||||
|
- `get_pull_request_diff` - Get PR diff/changes
|
||||||
|
- `approve_pull_request` - Approve PRs
|
||||||
|
- `unapprove_pull_request` - Remove approval
|
||||||
|
- `request_changes` - Request changes on PRs
|
||||||
|
- `remove_requested_changes` - Remove change requests
|
||||||
|
- npm package configuration for easy installation via npx
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Author filter for Bitbucket Server (uses `role.1=AUTHOR` and `username.1=email`)
|
||||||
|
- Branch deletion handling for 204 No Content responses
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Package name to `@nexus2520/bitbucket-mcp-server` for npm publishing
|
||||||
|
|
||||||
|
## [0.1.0] - 2025-06-03
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Initial implementation with basic tools:
|
||||||
|
- `get_pull_request` - Get PR details
|
||||||
|
- `list_pull_requests` - List PRs with filters
|
||||||
|
- Support for Bitbucket Cloud with app passwords
|
||||||
|
- Support for Bitbucket Server with HTTP access tokens
|
||||||
|
- Authentication setup script
|
||||||
|
- Comprehensive documentation
|
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Parth Dogra
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
49
README.md
49
README.md
|
@ -1,6 +1,9 @@
|
||||||
# Bitbucket MCP Server
|
# Bitbucket MCP Server
|
||||||
|
|
||||||
An MCP (Model Context Protocol) server that provides tools for interacting with the Bitbucket API.
|
[](https://www.npmjs.com/package/@nexus2520/bitbucket-mcp-server)
|
||||||
|
[](https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
An MCP (Model Context Protocol) server that provides tools for interacting with the Bitbucket API, supporting both Bitbucket Cloud and Bitbucket Server.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -24,6 +27,50 @@ An MCP (Model Context Protocol) server that provides tools for interacting with
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
### Using npx (Recommended)
|
||||||
|
|
||||||
|
The easiest way to use this MCP server is directly with npx:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"bitbucket": {
|
||||||
|
"command": "npx",
|
||||||
|
"args": [
|
||||||
|
"-y",
|
||||||
|
"@nexus2520/bitbucket-mcp-server"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"BITBUCKET_USERNAME": "your-username",
|
||||||
|
"BITBUCKET_APP_PASSWORD": "your-app-password"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
For Bitbucket Server:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"bitbucket": {
|
||||||
|
"command": "npx",
|
||||||
|
"args": [
|
||||||
|
"-y",
|
||||||
|
"@nexus2520/bitbucket-mcp-server"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"BITBUCKET_USERNAME": "your.email@company.com",
|
||||||
|
"BITBUCKET_TOKEN": "your-http-access-token",
|
||||||
|
"BITBUCKET_BASE_URL": "https://bitbucket.yourcompany.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### From Source
|
||||||
|
|
||||||
1. Clone or download this repository
|
1. Clone or download this repository
|
||||||
2. Install dependencies:
|
2. Install dependencies:
|
||||||
```bash
|
```bash
|
||||||
|
|
40
package.json
40
package.json
|
@ -1,17 +1,47 @@
|
||||||
{
|
{
|
||||||
"name": "bitbucket-mcp-server",
|
"name": "@nexus2520/bitbucket-mcp-server",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"description": "MCP server for Bitbucket API integration",
|
"description": "MCP server for Bitbucket API integration - supports both Cloud and Server",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./build/index.js",
|
"main": "./build/index.js",
|
||||||
|
"bin": {
|
||||||
|
"bitbucket-mcp-server": "./build/index.js"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"build/**/*",
|
||||||
|
"README.md",
|
||||||
|
"LICENSE",
|
||||||
|
"CHANGELOG.md"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
|
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
|
||||||
"dev": "tsc --watch",
|
"dev": "tsc --watch",
|
||||||
"start": "node build/index.js"
|
"start": "node build/index.js",
|
||||||
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"keywords": ["mcp", "bitbucket", "api"],
|
"keywords": [
|
||||||
"author": "",
|
"mcp",
|
||||||
|
"bitbucket",
|
||||||
|
"api",
|
||||||
|
"model-context-protocol",
|
||||||
|
"bitbucket-server",
|
||||||
|
"bitbucket-cloud",
|
||||||
|
"pull-request",
|
||||||
|
"code-review"
|
||||||
|
],
|
||||||
|
"author": "Parth Dogra",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.pratiknarola.com/Pdogra/bitbucket-mcp-server"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://git.pratiknarola.com/Pdogra/bitbucket-mcp-server/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://git.pratiknarola.com/Pdogra/bitbucket-mcp-server#readme",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16.0.0"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@modelcontextprotocol/sdk": "^1.12.1",
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
||||||
"axios": "^1.9.0"
|
"axios": "^1.9.0"
|
||||||
|
|
Loading…
Reference in a new issue