{"_id":"@droplinkperformance/bitbucket-mcp-server","_rev":"3-5b1b2362ea298063fb648c2a6f260cc5","name":"@droplinkperformance/bitbucket-mcp-server","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@droplinkperformance/bitbucket-mcp-server","version":"1.0.0","license":"MIT","_id":"@droplinkperformance/bitbucket-mcp-server@1.0.0","maintainers":[{"name":"droplinkperformance","email":"droplink.ai@gmail.com"}],"homepage":"https://github.com/droplinkperformance/bitbucket-mcp-server#readme","bugs":{"url":"https://github.com/droplinkperformance/bitbucket-mcp-server/issues"},"bin":{"bitbucket-mcp-server":"dist/index.js"},"dist":{"shasum":"1bf687a46bdc30a5298fe26607b47864881b29f7","tarball":"https://registry.npmjs.org/@droplinkperformance/bitbucket-mcp-server/-/bitbucket-mcp-server-1.0.0.tgz","fileCount":291,"integrity":"sha512-uX6Q4GLY/l8aQD9cOIGaWtOiUN5rDwwEiG7Pnqir7oaox+rnrWBQymy3urDYnyU2FYHQ6/IybcXGakD/U/KHCw==","signatures":[{"sig":"MEUCIHgmmSWBzxEA8qPhJ0p2Zz1LYsikvUIkuoP6SOQjvJ9LAiEArd50yCHbSdjyKYmiEEJDh9JEs6O0eeGk5CAkj1SQWBw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":288747},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=23"},"gitHead":"51d60d3107cd7607d7e9edbf17f5f17fef27a27f","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["package.json","package-lock.json"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]],"branches":["main"]},"scripts":{"dev":"tsx watch src/index.ts","lint":"eslint . --ext .ts","test":"vitest run","build":"tsc -p tsconfig.json","start":"node dist/index.js","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint . --ext .ts --fix","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts\"","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"droplinkperformance","email":"droplink.ai@gmail.com"},"repository":{"url":"git+https://github.com/droplinkperformance/bitbucket-mcp-server.git","type":"git"},"_npmVersion":"10.9.9","description":"Provider-agnostic, AI-review-first MCP server for Bitbucket Cloud.","directories":{},"_nodeVersion":"23.11.1","dependencies":{"zod":"^3.23.8","pino":"^9.5.0","axios":"^1.7.7","fastify":"^4.28.1","@opentelemetry/api":"^1.9.0","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^8.57.1","vitest":"^2.1.5","prettier":"^3.3.3","typescript":"^5.6.3","@types/node":"^22.9.0","semantic-release":"^24.2.9","@vitest/coverage-v8":"^2.1.5","@semantic-release/git":"^10.0.1","eslint-config-prettier":"^9.1.0","@typescript-eslint/parser":"^8.14.0","@typescript-eslint/eslint-plugin":"^8.14.0"},"optionalDependencies":{"ioredis":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/bitbucket-mcp-server_1.0.0_1787663834118_0.8716915814109183","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@droplinkperformance/bitbucket-mcp-server","version":"1.1.0","license":"MIT","_id":"@droplinkperformance/bitbucket-mcp-server@1.1.0","maintainers":[{"name":"droplinkperformance","email":"droplink.ai@gmail.com"}],"homepage":"https://github.com/droplinkperformance/bitbucket-mcp-server#readme","bugs":{"url":"https://github.com/droplinkperformance/bitbucket-mcp-server/issues"},"bin":{"bitbucket-mcp-server":"dist/index.js"},"dist":{"shasum":"fc323d3bbcb9fdf675b96fdf3ffa27863f15dc65","tarball":"https://registry.npmjs.org/@droplinkperformance/bitbucket-mcp-server/-/bitbucket-mcp-server-1.1.0.tgz","fileCount":291,"integrity":"sha512-fiCvZJVoC5AeuSbSB2Fg+7sizCCiCDoFzwRh+cTLSZWhkWSRdieQ/tXGkiO1Uv1JvU54o68zibEqDCWVQL8qQA==","signatures":[{"sig":"MEYCIQCoLOP3B3aNfttpsBtvMo5JqFnJuARe9/ZTzs8sJE1G9QIhAOfAs4CLssZkHklBV+4WbZs9n+AFcdA7h6WtoCCbzWNs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":289196},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=23"},"gitHead":"120a5e6144ce55c7dc60d474b56de4e77a253267","mcpName":"io.github.droplinkperformance/bitbucket-mcp-server","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["package.json","package-lock.json","server.json"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]],"branches":["main"]},"scripts":{"dev":"tsx watch src/index.ts","lint":"eslint . --ext .ts","test":"vitest run","build":"tsc -p tsconfig.json","start":"node dist/index.js","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint . --ext .ts --fix","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts\"","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"droplinkperformance","email":"droplink.ai@gmail.com"},"repository":{"url":"git+https://github.com/droplinkperformance/bitbucket-mcp-server.git","type":"git"},"_npmVersion":"10.9.9","description":"Provider-agnostic, AI-review-first MCP server for Bitbucket Cloud.","directories":{},"_nodeVersion":"23.11.1","dependencies":{"zod":"^3.23.8","pino":"^9.5.0","axios":"^1.7.7","fastify":"^4.28.1","@opentelemetry/api":"^1.9.0","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^8.57.1","vitest":"^2.1.5","prettier":"^3.3.3","typescript":"^5.6.3","@types/node":"^22.9.0","semantic-release":"^24.2.9","@vitest/coverage-v8":"^2.1.5","@semantic-release/git":"^10.0.1","eslint-config-prettier":"^9.1.0","@typescript-eslint/parser":"^8.14.0","@typescript-eslint/eslint-plugin":"^8.14.0"},"optionalDependencies":{"ioredis":"^5.4.1"},"_npmOperationalInternal":{"tmp":"tmp/bitbucket-mcp-server_1.1.0_1787664956814_0.2199891633931339","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@droplinkperformance/bitbucket-mcp-server","version":"1.2.0","description":"Provider-agnostic, AI-review-first MCP server for Bitbucket Cloud.","type":"module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/droplinkperformance/bitbucket-mcp-server.git"},"mcpName":"io.github.droplinkperformance/bitbucket-mcp-server","publishConfig":{"access":"public"},"engines":{"node":">=23"},"bin":{"bitbucket-mcp-server":"dist/index.js"},"main":"dist/index.js","scripts":{"build":"tsc -p tsconfig.json","start":"node dist/index.js","dev":"tsx watch src/index.ts","typecheck":"tsc -p tsconfig.json --noEmit","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","format":"prettier --write \"src/**/*.ts\"","format:check":"prettier --check \"src/**/*.ts\"","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage"},"dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","@opentelemetry/api":"^1.9.0","pino":"^9.5.0","zod":"^3.23.8"},"optionalDependencies":{"ioredis":"^5.4.1"},"devDependencies":{"@semantic-release/git":"^10.0.1","@types/node":"^22.9.0","@typescript-eslint/eslint-plugin":"^8.14.0","@typescript-eslint/parser":"^8.14.0","@vitest/coverage-v8":"^2.1.5","eslint":"^8.57.1","eslint-config-prettier":"^9.1.0","prettier":"^3.3.3","semantic-release":"^24.2.9","tsx":"^4.19.2","typescript":"^5.6.3","vitest":"^2.1.5"},"release":{"branches":["main"],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["package.json","package-lock.json","server.json"],"message":"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"}]]},"_id":"@droplinkperformance/bitbucket-mcp-server@1.2.0","gitHead":"746a24af31ad989b06b2288c20b7bf8028b6700b","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/droplinkperformance/bitbucket-mcp-server/issues"},"homepage":"https://github.com/droplinkperformance/bitbucket-mcp-server#readme","_nodeVersion":"23.11.1","_npmVersion":"10.9.9","dist":{"integrity":"sha512-HplCD9NOIyMvZMCzutNtoA8r7egxq3aD/ENQb24x7T6D+714Sl1Je1w8Xz2+gdoi4K1tyVoxAF91K0nVDyjz5w==","shasum":"429cb98ec60fe111c553d994fb68b2f7887e77fd","tarball":"https://registry.npmjs.org/@droplinkperformance/bitbucket-mcp-server/-/bitbucket-mcp-server-1.2.0.tgz","fileCount":294,"unpackedSize":303028,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCa3H6mtInYL5Pn8EHtq7xM78mcr3YgYYO/EZc46R7d/wIgXyao1NylczIbYUGKRL6cSZUjwkGaLWtWr4hQSC+mSGI="}]},"_npmUser":{"name":"droplinkperformance","email":"droplink.ai@gmail.com"},"directories":{},"maintainers":[{"name":"droplinkperformance","email":"droplink.ai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bitbucket-mcp-server_1.2.0_1787670362593_0.02832161276892009"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-25T13:17:14.008Z","modified":"2026-08-25T15:06:02.943Z","1.0.0":"2026-08-25T13:17:14.290Z","1.1.0":"2026-08-25T13:35:56.991Z","1.2.0":"2026-08-25T15:06:02.753Z"},"bugs":{"url":"https://github.com/droplinkperformance/bitbucket-mcp-server/issues"},"license":"MIT","homepage":"https://github.com/droplinkperformance/bitbucket-mcp-server#readme","repository":{"type":"git","url":"git+https://github.com/droplinkperformance/bitbucket-mcp-server.git"},"description":"Provider-agnostic, AI-review-first MCP server for Bitbucket Cloud.","maintainers":[{"name":"droplinkperformance","email":"droplink.ai@gmail.com"}],"readme":"# @droplinkperformance/bitbucket-mcp-server\n\nProvider-agnostic, AI-review-first [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for Bitbucket Cloud.\n\nThe primary value of this server is **AI-powered code review and pull request analysis**, not CRUD against the Bitbucket API. Every major dependency (SCM access, cache, token storage, rate limiting, LLM, events) is hidden behind a provider-agnostic interface so the same business logic can later target GitHub / GitLab / Azure DevOps and OpenAI / Anthropic / Gemini / Bedrock without changes to use-cases, agents, or domain contracts.\n\n> Status: **Phase 1**. See [Roadmap](#roadmap).\n\n## Features (Phase 1)\n\n- Dual transports: **stdio** (Cursor / Claude Desktop) and **Streamable HTTP** (Node `http`, for remote/production).\n- **Auto-discovered tools** via a `ToolRegistry` — no manual registration.\n- Explicit **`BitbucketContext`** (`workspace` + optional `repository`) on every tool — multi-workspace ready.\n- Resilient `BitbucketClient`: auth injection, auto-pagination, retry/backoff, rate-limit handling, caching, secret masking.\n- Two auth strategies: **OAuth 2.0** (Authorization Code, with rotating refresh-token persistence) and **Bearer token**.\n- **AI code review** (`analyze_pull_request`) backed by a `CodeReviewAgent` that chunks large PRs and returns a standard `ReviewResult`.\n- Pluggable **LLM provider** (OpenAI / Anthropic / Gemini / Bedrock), **cache** (memory / Redis), and **token store** (file / memory / Redis).\n\n### Tools\n\n| Tool | Description |\n| --- | --- |\n| `get_current_user` | Authenticated user. |\n| `list_pull_requests` | List PRs (filter by state/query). |\n| `get_pull_request` | Fetch a PR by id. |\n| `create_pull_request` | Open a PR. |\n| `get_pull_request_diff` | Raw unified diff. |\n| `get_pull_request_files` | Changed files + line stats. |\n| `get_pull_request_comments` | PR comments. |\n| `comment_pull_request` | Add a (optionally inline) comment. |\n| `analyze_pull_request` | AI review returning a standard `ReviewResult`. |\n\nAll tool inputs accept `workspace` (optional if `BITBUCKET_DEFAULT_WORKSPACE` is set) and, where applicable, `repository`.\n\n## Architecture\n\n```\nsrc/\n  index.ts            entry: chooses transport\n  container.ts        composition root (the only place wiring concretes)\n  mcp/                McpServer + ToolRegistry (auto-discovery) + transports\n  tools/              thin MCP adapters (*.tool.ts) -> call exactly one use-case\n  application/        use-cases (CQRS-ish: command|query) with Input/Output DTOs\n  agents/             autonomous workflows implementing Agent<TInput,TOutput>\n  domain/             provider-agnostic types, repository contracts, ReviewResult\n  repositories/bitbucket/  Bitbucket implementations of the contracts\n  clients/bitbucket/  resilient REST client\n  auth/               AuthProvider (+ token/oauth) and TokenStore implementations\n  cache/              CacheProvider (+ memory/redis)\n  ratelimit/          RateLimitStrategy (+ bitbucket)\n  llm/                LlmProvider (+ openai/anthropic/gemini/bedrock)\n  events/             EventBus (+ in-memory)\n  services/           reusable services (masking, chunking)\n  telemetry/          OpenTelemetry bootstrap + metrics\n  infrastructure/     config, logger, http, attachments\n  shared/             errors, result envelope, http-status, BitbucketContext\n```\n\nFlow: `tool -> use-case -> (agent | repository contract) -> repositories/bitbucket -> BitbucketClient`. Agents may also use the `LlmProvider` and `EventBus`. Tools never contain business logic.\n\n## Requirements\n\n- Node.js 23+\n\n## Install\n\nPublished as [`@droplinkperformance/bitbucket-mcp-server`](https://www.npmjs.com/package/@droplinkperformance/bitbucket-mcp-server).\n\n```bash\nnpx -y @droplinkperformance/bitbucket-mcp-server\n```\n\nFrom source:\n\n```bash\nnpm install\nnpm run build\n```\n\n## Release\n\nMerges to `main` run [`.github/workflows/release.yml`](.github/workflows/release.yml): tests, build, then [semantic-release](https://semantic-release.gitbook.io/). Version and npm publish happen only when the merge includes [Conventional Commits](https://www.conventionalcommits.org/):\n\n| Commit | Bump |\n| --- | --- |\n| `fix:` | patch |\n| `feat:` | minor |\n| `BREAKING CHANGE` / `feat!:` | major |\n\nOther messages skip publish. The GitHub secret `NPM_TOKEN` (npm Automation token for the `droplinkperformance` org) is required.\n\nAfter a successful npm release, the same workflow publishes metadata to the [MCP Registry](https://modelcontextprotocol.io/registry/quickstart) as `io.github.droplinkperformance/bitbucket-mcp-server` (OIDC, no extra secret). [github.com/mcp](https://github.com/mcp) syncs from that registry; if the server does not appear, email partnerships@github.com.\n\nTo stay on `0.x` for the first release, tag the current commit (`git tag v0.1.0 && git push origin v0.1.0`) before the first conventional merge; otherwise semantic-release starts at `1.0.0`.\n\n## Configuration\n\nCopy `.env.example` to `.env` and fill in values. Load it with Node's built-in flag:\n\n```bash\nnode --env-file=.env dist/index.js\n```\n\nKey variables:\n\n| Variable | Default | Notes |\n| --- | --- | --- |\n| `MCP_TRANSPORT` | `stdio` | `stdio` or `http`. |\n| `HTTP_HOST` / `HTTP_PORT` | `0.0.0.0` / `3000` | HTTP transport bind. |\n| `BITBUCKET_DEFAULT_WORKSPACE` | – | Fallback when a tool omits `workspace`. |\n| `BITBUCKET_ACCESS_TOKEN` | – | API token (ATATT…), app password, or OAuth access token |\n| `BITBUCKET_EMAIL` | – | **Required** with API tokens (ATATT…) — your Atlassian account email |\n| `BITBUCKET_CLIENT_ID` / `BITBUCKET_CLIENT_SECRET` | – | Required for **OAuth** (when no access token). |\n| `BITBUCKET_REFRESH_TOKEN` | – | Optional seed for headless OAuth. |\n| `TOKEN_STORE` | `file` | `file` \\| `memory` \\| `redis`. |\n| `CACHE_PROVIDER` | `memory` | `memory` \\| `redis`. |\n| `LLM_PROVIDER` | `openai` | `openai` \\| `anthropic` \\| `gemini` \\| `bedrock`. |\n| `MAX_FILES_PER_CHUNK` / `MAX_DIFF_LINES_PER_CHUNK` | `50` / `5000` | Large-PR chunking thresholds. |\n| `OTEL_ENABLED` | `false` | No-op metrics unless enabled. |\n\n### Authentication\n\n**Bearer (OAuth access token):** set `BITBUCKET_ACCESS_TOKEN` only (non-ATATT tokens).\n\n**API token (recommended, ATATT…):** set `BITBUCKET_ACCESS_TOKEN` **and** `BITBUCKET_EMAIL` (your Atlassian account email from Bitbucket → Personal settings → Email aliases). API tokens use HTTP Basic auth, not Bearer.\n\n**App password (legacy, until June 2026):** set `BITBUCKET_ACCESS_TOKEN` and `BITBUCKET_USERNAME` (your Bitbucket username).\n\n**OAuth 2.0 (Authorization Code):** set `BITBUCKET_CLIENT_ID` / `BITBUCKET_CLIENT_SECRET`. Tokens are persisted by the configured `TOKEN_STORE`; Bitbucket rotates refresh tokens, and the server persists the new one on every refresh. For headless boot, provide a previously obtained `BITBUCKET_REFRESH_TOKEN`.\n\nBitbucket OAuth endpoints used: authorize `https://bitbucket.org/site/oauth2/authorize`, token `https://bitbucket.org/site/oauth2/access_token`. The authorize URL can be built from `OAuthProvider.buildAuthorizeUrl()` and the returned `?code=` exchanged via `OAuthProvider.loginWithCode(code)`.\n\n### LLM provider\n\nSet `LLM_PROVIDER` and the matching key:\n\n```env\nLLM_PROVIDER=openai      # OPENAI_API_KEY\nLLM_PROVIDER=anthropic   # ANTHROPIC_API_KEY\nLLM_PROVIDER=gemini      # GEMINI_API_KEY\nLLM_PROVIDER=bedrock     # AWS creds + BEDROCK_MODEL_ID (needs @aws-sdk/client-bedrock-runtime)\n```\n\n`ioredis` (Redis providers) and `@aws-sdk/client-bedrock-runtime` (Bedrock) are optional and loaded lazily — only needed when selected.\n\n## Running\n\n### stdio\n\n```bash\nMCP_TRANSPORT=stdio node --env-file=.env dist/index.js\n```\n\n### Streamable HTTP\n\n```bash\nMCP_TRANSPORT=http HTTP_PORT=3000 node --env-file=.env dist/index.js\n# health:   GET  http://localhost:3000/health\n# endpoint: POST http://localhost:3000/mcp\n```\n\n### MCP Inspector\n\n```bash\nnpx @modelcontextprotocol/inspector node dist/index.js\n```\n\n### Cursor\n\n`~/.cursor/mcp.json` (or project `.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"bitbucket\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@droplinkperformance/bitbucket-mcp-server\"],\n      \"env\": {\n        \"MCP_TRANSPORT\": \"stdio\",\n        \"BITBUCKET_ACCESS_TOKEN\": \"ATATT-your-api-token\",\n        \"BITBUCKET_EMAIL\": \"you@company.com\",\n        \"BITBUCKET_DEFAULT_WORKSPACE\": \"your-workspace\",\n        \"LLM_PROVIDER\": \"openai\",\n        \"OPENAI_API_KEY\": \"sk-...\"\n      }\n    }\n  }\n}\n```\n\n### Claude Desktop\n\n`claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"bitbucket\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@droplinkperformance/bitbucket-mcp-server\"],\n      \"env\": {\n        \"BITBUCKET_ACCESS_TOKEN\": \"your-token\",\n        \"BITBUCKET_DEFAULT_WORKSPACE\": \"your-workspace\",\n        \"LLM_PROVIDER\": \"anthropic\",\n        \"ANTHROPIC_API_KEY\": \"sk-ant-...\"\n      }\n    }\n  }\n}\n```\n\n## Development\n\n```bash\nnpm run dev          # tsx watch (stdio)\nnpm run typecheck\nnpm run lint\nnpm test\nnpm run test:coverage\n```\n\n## Roadmap\n\n- **Phase 1 (this release):** auth, abstractions, `BitbucketClient`, tool auto-discovery, PR tools, `analyze_pull_request`.\n- **Phase 2:** Pipelines + full-text paginated logs, `pipeline-investigator` agent, `auto_review_pull_request` (dry-run / publish inline comments).\n- **Phase 3:** Remaining CRUD — repositories, commits, branches, tags, issues, workspaces, members, search.\n- **Phase 4:** `analyze_dotnet_pull_request` (dotnet-review agent), advanced agents, automation workflows.\n- **Phase 5:** Docker, Compose, Helm, production deploy guide.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}