stash-mcp
Provides tools for Bitbucket Server/Data Center, enabling project and repository discovery, pull request lifecycle management (create, review, merge, decline), comment management, diff viewing with truncation, and code search.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stash-mcpshow open pull requests in project PROJ"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Stash MCP
Professional MCP (Model Context Protocol) server for Bitbucket Server/Data Center (formerly Stash). It provides high-signal tools for project discovery, repository browsing, pull request workflows, and code search.
Features
Project and repository discovery
Pull request lifecycle management (create, review, merge, decline)
Commenting and inline review notes
Diff viewing with safe truncation for large files
Code search (when enabled on the server)
Read-only mode to prevent write operations
Related MCP server: Bitbucket MCP Server
Requirements
Node.js 18+
Bitbucket Server/Data Center (Stash) REST API access
Install
npm install
npm run buildOr use the helper script:
./scripts/install.shConfiguration
Add to ~/.claude/user-mcps.json:
{
"mcpServers": {
"stash": {
"command": "node",
"args": ["/absolute/path/to/stash-mcp/dist/index.js"],
"env": {
"BITBUCKET_URL": "https://stash.example.com",
"BITBUCKET_TOKEN": "your-access-token",
"BITBUCKET_DEFAULT_PROJECT": "PROJ"
}
}
}
}Environment Variables
BITBUCKET_URL(required): Base URL of your Bitbucket Server instance.BITBUCKET_TOKEN: Personal access token (recommended).BITBUCKET_USERNAME/BITBUCKET_PASSWORD: Basic auth alternative.BITBUCKET_DEFAULT_PROJECT: Default project key whenprojectis omitted.BITBUCKET_DIFF_MAX_LINES_PER_FILE: Diff truncation limit per file.BITBUCKET_READ_ONLY: Set totrueto disable write operations.
Dependencies
Hermes — Authentication broker. Manages OAuth2/SSO token acquisition, refresh, and serving for this MCP server.
ToolHive — Container runtime. Hosts this server as a Docker container with streamable HTTP transport.
MCP Gateway — Aggregation layer. Provides unified tool access across all MCP backends.
node-vault-mcp — Credential storage. AES-256-GCM encrypted file vault (replaces macOS Keychain/keytar).
Architecture
This MCP server runs as a Docker container managed by ToolHive:
Container — Built from the local Dockerfile and published as
localhost:5555/stash-mcp:latestTransport — Streamable HTTP via the ToolHive proxy
Authentication — Managed by Hermes (
http://127.0.0.1:9876)Discovery — Exposed through MCP Gateway at
http://127.0.0.1:3100/mcpCredentials — Stored in
~/.claude/secrets.vaultvia node-vault-mcp (AES-256-GCM)
Usage
List projects
list_projects:
limit: 25List repositories
list_repositories:
project: PROJReview a pull request
get_pull_request:
project: PROJ
repository: my-repo
prId: 123Search for a file
search:
query: README.md
type: file
project: PROJRead-Only Mode
Set BITBUCKET_READ_ONLY=true to block write operations. Read-only mode allows safe browsing and review without modifying repositories.
Development
npm run build
npm test
npm run lintSecurity
Please report security issues privately. See SECURITY.md for guidance.
License
MIT. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables interaction with Bitbucket Cloud through 25+ tools for managing repositories, pull requests, branches, commits, issues, pipelines, and code search with OAuth 2.0 authentication.Last updated34151MIT
- Alicense-qualityCmaintenanceEnables interaction with Bitbucket repositories through the Model Context Protocol, supporting code search, repository management, branch creation, pull requests, and more.Last updated1MIT
- Alicense-qualityDmaintenanceEnables AI systems to interact with Atlassian Bitbucket Server/Data Center for accessing projects, repositories, branches, files, and managing pull requests.Last updatedMIT
- AlicenseAqualityBmaintenanceEnables retrieval of pull request metadata and diffs from Bitbucket Cloud and Server/Data Center, with optional comment creation.Last updated3MIT
Related MCP Connectors
Connect to Atlassian Jira, Confluence, and Compass to search, create, and manage your work.
A MCP server built for developers enabling Git based project management with project and personal…
Shortcut project management. Create, update, search stories and manage workflows.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/schwarztim/stash-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server