Skip to main content
Glama

Bitbucket MCP Server

by pdogra1299

search_code

Find code snippets across Bitbucket repositories using context-aware search patterns. Filter by workspace, repository, file type, or specific code contexts like assignments, declarations, or usages.

Instructions

Search for code across Bitbucket repositories with enhanced context-aware search patterns (currently only supported for Bitbucket Server)

Input Schema

NameRequiredDescriptionDefault
file_patternNoFile path pattern to filter results (e.g., "*.java", "src/**/*.ts") (optional)
include_patternsNoAdditional custom search patterns to include (e.g., ["variable =", ".variable"]) (optional)
limitNoMaximum number of results to return (default: 25)
repositoryNoRepository slug to search in (optional, searches all repos if not specified)
search_contextNoContext to search for: assignment (term=value), declaration (defining term), usage (calling/accessing term), exact (quoted match), or any (all patterns)
search_queryYesThe search term or phrase to look for in code (e.g., "variable")
startNoStart index for pagination (default: 0)
workspaceYesBitbucket workspace/project key (e.g., "PROJ")

Input Schema (JSON Schema)

{ "properties": { "file_pattern": { "description": "File path pattern to filter results (e.g., \"*.java\", \"src/**/*.ts\") (optional)", "type": "string" }, "include_patterns": { "description": "Additional custom search patterns to include (e.g., [\"variable =\", \".variable\"]) (optional)", "items": { "type": "string" }, "type": "array" }, "limit": { "description": "Maximum number of results to return (default: 25)", "type": "number" }, "repository": { "description": "Repository slug to search in (optional, searches all repos if not specified)", "type": "string" }, "search_context": { "description": "Context to search for: assignment (term=value), declaration (defining term), usage (calling/accessing term), exact (quoted match), or any (all patterns)", "enum": [ "assignment", "declaration", "usage", "exact", "any" ], "type": "string" }, "search_query": { "description": "The search term or phrase to look for in code (e.g., \"variable\")", "type": "string" }, "start": { "description": "Start index for pagination (default: 0)", "type": "number" }, "workspace": { "description": "Bitbucket workspace/project key (e.g., \"PROJ\")", "type": "string" } }, "required": [ "workspace", "search_query" ], "type": "object" }

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/pdogra1299/bitbucket-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server