Описание
MCP server for Bitbucket Server
README
A Model Context Protocol (MCP) server that connects AI assistants to Bitbucket Server/Data Center. Review pull requests, manage repositories, search users, and interact with your Bitbucket instance through natural language in Claude and other AI assistants.
🚀 Quick Start
Get Your Bitbucket Server Credentials
- Log into your Bitbucket Server instance
- Go to Profile → Manage account → Personal access tokens
- Click Create a token
- Give it a name and select appropriate permissions:
- Project permissions: Read (or Write for commenting)
- Repository permissions: Read (or Write for commenting)
- Copy the generated token
- Note your Bitbucket Server URL (e.g.,
https://bitbucket.yourcompany.com)
Configuration
Claude Code
Add the server using the Claude Code CLI:
claude mcp add -s user \
bitbucket-server \
npx mcp-bitbucket-server@latest \
-e "BITBUCKET_URL=https://bitbucket.yourcompany.com" \
-e "BITBUCKET_TOKEN=your_personal_access_token"
Manual Configuration (Any MCP Client)
Alternatively, add this configuration to your MCP client's configuration file:
{
"mcpServers": {
"bitbucket-server": {
"command": "npx",
"args": ["mcp-bitbucket-server@latest"],
"type": "stdio",
"env": {
"BITBUCKET_URL": "https://bitbucket.yourcompany.com",
"BITBUCKET_TOKEN": "your_personal_access_token"
}
}
}
}
✨ Features
- 👥 User Management - Search users and get profiles
- 📁 Project & Repository Discovery - List projects and repositories
- 🔍 Pull Request Review - Get PR details, changes, diffs, and activities
- 💬 Smart Comments - Add general, reply, and inline comments on PRs
- 📊 PR Inbox - See all PRs where you're a reviewer across all projects
- 🎯 Token Optimized - Responses optimized to reduce token usage
- 🔒 Secure Authentication - Uses Personal Access Tokens
- 🛡️ Simple & Direct - Minimal abstractions, direct API access
🛠️ Available Tools
The server provides 11 MCP tools for Bitbucket Server operations:
User Management
bitbucket_get_user_profile- Get detailed user informationbitbucket_get_all_users- List and search all users
Projects & Repositories
bitbucket_list_projects- Discover available projectsbitbucket_list_repositories- List repositories in a project
Pull Request Operations
bitbucket_get_inbox_pull_requests- Get all PRs needing your reviewbitbucket_get_pull_request_changes- List all changed files in a PRbitbucket_get_pull_request_file_diff- Get structured line-by-line diffbitbucket_get_pull_request_activities- Get PR comments, approvals, and activitybitbucket_add_pr_comment- Add general, reply, or inline comments
💡 Example Queries
- "Show me all pull requests I need to review"
- "Get the changes in pull request #123 in the PROJ repository"
- "Show me the diff for src/main.ts in PR #456"
- "Add a comment on line 42 of src/app.ts suggesting we use const instead"
- "List all repositories in the DEV project"
- "Find users named John"
- "What are the recent activities on PR #789?"
🏗️ Development
From Source
# Clone and setup
git clone https://github.com/evrimalacan/mcp-bitbucket-server.git
cd mcp-bitbucket-server
npm install
# Build
npm run build
# Development mode
npm run dev
Adding New Tools
- Check the Bitbucket Server Swagger documentation (
BitbucketServerSwagger.json) - Create a new tool file in the appropriate domain folder under
src/tools/ - Export it from the domain's
index.ts - Register it in
src/tools/index.ts
See CLAUDE.md for detailed development guidelines.
🐛 Troubleshooting
Common Issues
"Authentication failed"
- Verify your Personal Access Token is correct
- Ensure the token has appropriate permissions
"Access forbidden"
- Check your Bitbucket user has permission for the resource
- Verify token permissions include required scopes
"Resource not found"
- Confirm the project key, repository slug, or PR ID is correct
- Check you have access to the specified resource
📚 Documentation
- Development Guide - Detailed development and contribution guide
- Bitbucket Server REST API - Official API reference
- Model Context Protocol - MCP specification
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Follow the development guide in
CLAUDE.md - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
MIT License - see LICENSE file for details.
🌟 Support
- 🐛 Bug Reports: GitHub Issues
- 💡 Feature Requests: GitHub Discussions
- 📖 Documentation: See CLAUDE.md for comprehensive guide
Built for developers who want AI assistance with Bitbucket Server
Установить Bitbucket Server в Claude Desktop, Claude Code, Cursor
unyly install bitbucket-serverСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add bitbucket-server -- npx -y mcp-bitbucket-serverFAQ
Bitbucket Server MCP бесплатный?
Да, Bitbucket Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Bitbucket Server?
Нет, Bitbucket Server работает без API-ключей и переменных окружения.
Bitbucket Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Bitbucket Server в Claude Desktop, Claude Code или Cursor?
Открой Bitbucket Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Bitbucket Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
