Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

create_repository

Create a new repository in a Bitbucket Cloud workspace to organize and manage code projects with customizable settings for privacy, language, and features.

Instructions

Create a new repository in the specified workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
nameNoRepository name
descriptionNoRepository description
is_privateNoWhether the repository is private
languageNoPrimary language
has_issuesNoEnable issue tracker
has_wikiNoEnable wiki
project_keyNoProject key to add repo to

Implementation Reference

  • MCP tool handler case for 'create_repository': parses arguments with Zod schema and calls RepositoriesAPI.create to execute the tool.
    case 'create_repository': { const params = toolSchemas.create_repository.parse(args); return this.repos.create(params); }
  • Executes the repository creation by sending a POST request to Bitbucket API endpoint `/repositories/{workspace}/{repo_slug}` with the provided parameters.
    async create(params: CreateRepositoryParams): Promise<BitbucketRepository> { const { workspace, repo_slug, ...body } = params; return this.client.post<BitbucketRepository>(`/repositories/${workspace}/${repo_slug}`, body); }
  • Zod schema definition for validating input parameters of the create_repository tool.
    create_repository: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), name: z.string().optional().describe('Repository name'), description: z.string().optional().describe('Repository description'), is_private: z.boolean().optional().describe('Whether the repository is private'), language: z.string().optional().describe('Primary language'), has_issues: z.boolean().optional().describe('Enable issue tracker'), has_wiki: z.boolean().optional().describe('Enable wiki'), project_key: z.string().optional().describe('Project key to add repo to'), }),
  • Registers the create_repository tool in the toolDefinitions array for MCP, including name, description, and JSON schema for inputs.
    { name: 'create_repository', description: 'Create a new repository in the specified workspace.', inputSchema: { type: 'object' as const, properties: { workspace: { type: 'string', description: 'The workspace slug' }, repo_slug: { type: 'string', description: 'The repository slug' }, name: { type: 'string', description: 'Repository name' }, description: { type: 'string', description: 'Repository description' }, is_private: { type: 'boolean', description: 'Whether the repository is private' }, language: { type: 'string', description: 'Primary language' }, has_issues: { type: 'boolean', description: 'Enable issue tracker' }, has_wiki: { type: 'boolean', description: 'Enable wiki' }, project_key: { type: 'string', description: 'Project key to add repo to' }, }, required: ['workspace', 'repo_slug'], }, },
  • TypeScript interface defining the parameters for creating a repository, used in RepositoriesAPI.create.
    export interface CreateRepositoryParams { workspace: string; repo_slug: string; name?: string; description?: string; is_private?: boolean; language?: string; has_issues?: boolean; has_wiki?: boolean; project_key?: string; }

Latest Blog Posts

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

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