{"_id":"@auliaadil/bitbucket-2.0-mcp","_rev":"2-79c41b5d224b40596382371a90a05de2","name":"@auliaadil/bitbucket-2.0-mcp","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@auliaadil/bitbucket-2.0-mcp","version":"1.0.0","keywords":["mcp","bitbucket","api","model-context-protocol"],"author":{"name":"auliaadil"},"license":"MIT","_id":"@auliaadil/bitbucket-2.0-mcp@1.0.0","maintainers":[{"name":"auliatech","email":"aulia.techstudio@gmail.com"}],"bin":{"bitbucket-2.0-mcp":"dist/index.js"},"dist":{"shasum":"5d6e67f445d663ff4810259a5ac18c1a0021de49","tarball":"https://registry.npmjs.org/@auliaadil/bitbucket-2.0-mcp/-/bitbucket-2.0-mcp-1.0.0.tgz","fileCount":9,"integrity":"sha512-cC+mTOPHUJKIPg5rmW3VqaPhLSl2aWYgWTySdT6zz9X/iFBb+b6m8Uyc7QwX3YszjOB95fGV6gS4iZ7GzX113A==","signatures":[{"sig":"MEUCIGsD3203qGmxZXXJcSkOfUrnDFRh4vUuK8VnWJkCkeWhAiEAgMbOIkyfu6CtNG5F7BY3T2QVnBdbtUz8LXOXFbGiWQs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36372},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"7629b0d32c93f6cc0f0c9e296c39b3385f1aaf84","scripts":{"dev":"tsc --watch","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"auliatech","email":"aulia.techstudio@gmail.com"},"_npmVersion":"11.4.2","description":"MCP server for Bitbucket API access","directories":{},"_nodeVersion":"24.3.0","dependencies":{"axios":"^1.7.9","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/bitbucket-2.0-mcp_1.0.0_1770233519028_0.4406375397494602","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@auliaadil/bitbucket-2.0-mcp","version":"1.0.1","description":"MCP server for Bitbucket API access","type":"module","main":"dist/index.js","bin":{"bitbucket-2.0-mcp":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsc --watch","prepare":"npm run build"},"keywords":["mcp","bitbucket","api","model-context-protocol"],"author":{"name":"auliaadil"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.0.4","axios":"^1.7.9"},"devDependencies":{"@types/node":"^22.10.5","typescript":"^5.7.2"},"_id":"@auliaadil/bitbucket-2.0-mcp@1.0.1","gitHead":"c696408336b2269313593e2267c59c7f3147ccd4","types":"./dist/index.d.ts","_nodeVersion":"24.3.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-vsCIyeWZT9ARxrg38dLy2wLbQt31ibUmEX3QqbRN5aQZkWmv3yjO7sZjDZNYOpy6kuuPJRxUeqotVCLumi671g==","shasum":"fd8e92bac92e06fa2126dcad01065b5cc51a5cba","tarball":"https://registry.npmjs.org/@auliaadil/bitbucket-2.0-mcp/-/bitbucket-2.0-mcp-1.0.1.tgz","fileCount":9,"unpackedSize":39526,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCr+RmHKqhNYBhFT/TfCBIJXpUlHqz6nk6XpKF0aAGcDQIgUlMFJd3sQXjgcENJnmO/Bw24Xq3uf5R4ddpbeJMVWrs="}]},"_npmUser":{"name":"auliatech","email":"aulia.techstudio@gmail.com"},"directories":{},"maintainers":[{"name":"auliatech","email":"aulia.techstudio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bitbucket-2.0-mcp_1.0.1_1770253481166_0.2854114724927823"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-04T19:31:58.954Z","modified":"2026-02-05T01:04:41.492Z","1.0.0":"2026-02-04T19:31:59.171Z","1.0.1":"2026-02-05T01:04:41.332Z"},"author":{"name":"auliaadil"},"license":"MIT","keywords":["mcp","bitbucket","api","model-context-protocol"],"description":"MCP server for Bitbucket API access","maintainers":[{"name":"auliatech","email":"aulia.techstudio@gmail.com"}],"readme":"# Bitbucket MCP Server\n\nA Model Context Protocol (MCP) server that provides access to Bitbucket Cloud API. This server enables AI assistants like Claude to interact with Bitbucket repositories, pull requests, issues, and more.\n\n## Features\n\nThis MCP server provides tools for:\n\n- **Repositories**: List and get repository details\n- **Pull Requests**: List, view, and create pull requests\n- **Branches**: List repository branches\n- **Commits**: List and view commits\n- **Issues**: List, view, and create issues\n- **Diffs**: Get diffs for PRs or between commits\n\n## Prerequisites\n\n- Node.js 18 or higher\n- A Bitbucket Cloud account\n- Atlassian API Token (see setup instructions below)\n\n## Creating an Atlassian API Token\n\n1. Go to [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens)\n2. Click **Create API token**\n3. Give it a label (e.g., \"Bitbucket MCP Server\")\n4. Select the following scopes based on your needs:\n\n   **Required scopes** (minimum for read-only access):\n   - `read:repository:bitbucket` - View repositories, branches, commits, and diffs\n   - `read:pullrequest:bitbucket` - View pull requests\n   - `read:issue:bitbucket` - View issues\n\n   **Additional scopes** (for write operations):\n   - `write:pullrequest:bitbucket` - Create and modify pull requests\n   - `write:issue:bitbucket` - Create and modify issues\n\n   **Optional scopes** (for enhanced functionality):\n   - `read:workspace:bitbucket` - View workspace information\n   - `read:project:bitbucket` - View project information\n   - `read:account` - View user profiles\n\n5. Click **Create**\n6. **Important**: Copy the generated token immediately (you won't be able to see it again)\n\n## Installation\n\n### Option 1: Install via npm (Recommended)\n\n```bash\nnpm install -g @auliaadil/bitbucket-2.0-mcp\n```\n\n### Option 2: Install from source (for development)\n\n```bash\n# Clone the repository\ngit clone https://github.com/auliaadil/bitbucket-2.0-mcp.git\ncd bitbucket-2.0-mcp\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n```\n\n## Configuration\n\n### For Claude Desktop\n\nAdd the following to your Claude Desktop configuration file:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n**Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\nIf you installed via npm (Option 1):\n\n```json\n{\n  \"mcpServers\": {\n    \"bitbucket\": {\n      \"command\": \"bitbucket-2.0-mcp\",\n      \"env\": {\n        \"BITBUCKET_WORKSPACE\": \"your-workspace-slug\",\n        \"BITBUCKET_EMAIL\": \"your-email@example.com\",\n        \"BITBUCKET_API_TOKEN\": \"your-atlassian-api-token\"\n      }\n    }\n  }\n}\n```\n\nIf you installed from source (Option 2):\n\n```json\n{\n  \"mcpServers\": {\n    \"bitbucket\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/bitbucket-2.0-mcp/dist/index.js\"],\n      \"env\": {\n        \"BITBUCKET_WORKSPACE\": \"your-workspace-slug\",\n        \"BITBUCKET_EMAIL\": \"your-email@example.com\",\n        \"BITBUCKET_API_TOKEN\": \"your-atlassian-api-token\"\n      }\n    }\n  }\n}\n```\n\nReplace:\n- `your-workspace-slug` with your Bitbucket workspace slug (e.g., \"my-team\")\n- `your-email@example.com` with your Atlassian account email\n- `your-atlassian-api-token` with the Atlassian API token you created\n- `/path/to/bitbucket-2.0-mcp` with the actual path (only for source installation)\n\n### For Claude Code CLI\n\nAdd the following to your Claude Code CLI configuration file (`~/.claude/config.json`):\n\nIf you installed via npm (Option 1):\n\n```json\n{\n  \"mcpServers\": {\n    \"bitbucket\": {\n      \"command\": \"bitbucket-2.0-mcp\",\n      \"env\": {\n        \"BITBUCKET_WORKSPACE\": \"your-workspace-slug\",\n        \"BITBUCKET_EMAIL\": \"your-email@example.com\",\n        \"BITBUCKET_API_TOKEN\": \"your-atlassian-api-token\"\n      }\n    }\n  }\n}\n```\n\nIf you installed from source (Option 2):\n\n```json\n{\n  \"mcpServers\": {\n    \"bitbucket\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/bitbucket-2.0-mcp/dist/index.js\"],\n      \"env\": {\n        \"BITBUCKET_WORKSPACE\": \"your-workspace-slug\",\n        \"BITBUCKET_EMAIL\": \"your-email@example.com\",\n        \"BITBUCKET_API_TOKEN\": \"your-atlassian-api-token\"\n      }\n    }\n  }\n}\n```\n\n### For GitHub Copilot CLI\n\nAdd the following to your Copilot CLI configuration file (`~/.github/copilot-cli/config.json`):\n\nIf you installed via npm (Option 1):\n\n```json\n{\n  \"mcpServers\": {\n    \"bitbucket\": {\n      \"command\": \"bitbucket-2.0-mcp\",\n      \"env\": {\n        \"BITBUCKET_WORKSPACE\": \"your-workspace-slug\",\n        \"BITBUCKET_EMAIL\": \"your-email@example.com\",\n        \"BITBUCKET_API_TOKEN\": \"your-atlassian-api-token\"\n      }\n    }\n  }\n}\n```\n\nIf you installed from source (Option 2):\n\n```json\n{\n  \"mcpServers\": {\n    \"bitbucket\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/bitbucket-2.0-mcp/dist/index.js\"],\n      \"env\": {\n        \"BITBUCKET_WORKSPACE\": \"your-workspace-slug\",\n        \"BITBUCKET_EMAIL\": \"your-email@example.com\",\n        \"BITBUCKET_API_TOKEN\": \"your-atlassian-api-token\"\n      }\n    }\n  }\n}\n```\n\n### For other MCP clients\n\nIf you installed via npm (Option 1):\n\nSet the following environment variables:\n\n```bash\nexport BITBUCKET_WORKSPACE=\"your-workspace-slug\"\nexport BITBUCKET_EMAIL=\"your-email@example.com\"\nexport BITBUCKET_API_TOKEN=\"your-atlassian-api-token\"\n```\n\nThen run the server:\n\n```bash\nbitbucket-2.0-mcp\n```\n\nIf you installed from source (Option 2):\n\nSet the following environment variables:\n\n```bash\nexport BITBUCKET_WORKSPACE=\"your-workspace-slug\"\nexport BITBUCKET_EMAIL=\"your-email@example.com\"\nexport BITBUCKET_API_TOKEN=\"your-atlassian-api-token\"\n```\n\nThen run the server:\n\n```bash\nnode /path/to/bitbucket-2.0-mcp/dist/index.js\n```\n\n## Scope Requirements by Tool\n\nThe following table shows which Atlassian API token scopes are required for each tool:\n\n| Tool | Required Scopes |\n|------|----------------|\n| `list_repositories` | `read:repository:bitbucket` |\n| `get_repository` | `read:repository:bitbucket` |\n| `list_pull_requests` | `read:pullrequest:bitbucket` |\n| `get_pull_request` | `read:pullrequest:bitbucket` |\n| `create_pull_request` | `read:pullrequest:bitbucket`, `write:pullrequest:bitbucket` |\n| `list_branches` | `read:repository:bitbucket` |\n| `list_commits` | `read:repository:bitbucket` |\n| `get_commit` | `read:repository:bitbucket` |\n| `list_issues` | `read:issue:bitbucket` |\n| `get_issue` | `read:issue:bitbucket` |\n| `create_issue` | `read:issue:bitbucket`, `write:issue:bitbucket` |\n| `get_diff` | `read:repository:bitbucket` |\n\n## Available Tools\n\n### Repository Tools\n\n#### `list_repositories`\nList all repositories in the workspace.\n\n**Parameters:**\n- `page` (optional): Page number for pagination\n- `pagelen` (optional): Items per page (max: 100)\n\n#### `get_repository`\nGet detailed information about a repository.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n\n### Pull Request Tools\n\n#### `list_pull_requests`\nList pull requests for a repository.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `state` (optional): Filter by state (OPEN, MERGED, DECLINED, SUPERSEDED)\n- `page` (optional): Page number\n\n#### `get_pull_request`\nGet details about a specific pull request.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `pr_id` (required): Pull request ID\n\n#### `create_pull_request`\nCreate a new pull request.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `title` (required): PR title\n- `source_branch` (required): Source branch name\n- `destination_branch` (optional): Destination branch (default: main)\n- `description` (optional): PR description\n- `close_source_branch` (optional): Close source after merge (default: false)\n\n### Branch Tools\n\n#### `list_branches`\nList all branches in a repository.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `page` (optional): Page number\n\n### Commit Tools\n\n#### `list_commits`\nList commits in a repository.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `branch` (optional): Branch name\n- `page` (optional): Page number\n\n#### `get_commit`\nGet details about a specific commit.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `commit_hash` (required): Commit hash\n\n### Issue Tools\n\n#### `list_issues`\nList issues for a repository.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `state` (optional): Filter by state (new, open, resolved, etc.)\n- `page` (optional): Page number\n\n#### `get_issue`\nGet details about a specific issue.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `issue_id` (required): Issue ID\n\n#### `create_issue`\nCreate a new issue.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `title` (required): Issue title\n- `content` (optional): Issue description\n- `kind` (optional): Issue type (bug, enhancement, proposal, task)\n- `priority` (optional): Issue priority (trivial, minor, major, critical, blocker)\n\n### Diff Tools\n\n#### `get_diff`\nGet the diff for a pull request or between commits.\n\n**Parameters:**\n- `repo_slug` (required): Repository name\n- `spec` (required): Diff spec (e.g., \"master..feature\" or PR ID)\n\n## Usage Examples\n\nWhen using with Claude Desktop, you can ask questions like:\n\n- \"List all repositories in my Bitbucket workspace\"\n- \"Show me open pull requests for the project-name repository\"\n- \"Create a pull request from feature-branch to main in my-repo\"\n- \"What are the latest commits on the develop branch?\"\n- \"Create a bug issue in my-repo titled 'Fix login error'\"\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build and watch for changes\nnpm run dev\n\n# Build for production\nnpm run build\n```\n\n## Troubleshooting\n\n### Authentication Errors\n\nIf you get 401 or 403 errors:\n1. Verify your email and Atlassian API token are correct\n2. Ensure your API token hasn't expired or been revoked\n3. Confirm your Atlassian account has access to the workspace\n4. Ensure your workspace slug is correct\n\n### Permission/Scope Errors\n\nIf specific tools fail with permission errors:\n1. Check that your API token has the required scopes (see \"Scope Requirements by Tool\" section)\n2. Verify you have the necessary permissions in your Bitbucket workspace\n3. Some operations (like creating PRs or issues) require write scopes - ensure these are enabled on your token\n4. You may need to regenerate your token with additional scopes if you initially created it with limited permissions\n\n### Tool Not Found\n\nIf tools aren't appearing:\n1. Restart your MCP client (Claude Desktop, Claude Code CLI, etc.) after configuration changes\n2. Check the logs in your client's developer console\n3. For npm installations: Verify the installation with `npm list -g @auliaadil/bitbucket-2.0-mcp`\n4. For source installations: Verify the path to `index.js` is correct\n\n### Rate Limiting\n\nBitbucket API has rate limits. If you hit them:\n- Wait a few minutes before retrying\n- Reduce the number of requests\n- Consider implementing caching if needed\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues or pull requests.\n\n## License\n\nMIT\n\n## Resources\n\n- [Bitbucket API Documentation](https://developer.atlassian.com/cloud/bitbucket/rest/intro/)\n- [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens)\n- [Bitbucket OpenAPI Specification](./docs/bitbucket-openapi-spec.json) - Complete API spec included in this repository\n- [Model Context Protocol Documentation](https://modelcontextprotocol.io/)\n- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)\n","readmeFilename":"README.md"}