@aashari/mcp-server-atlassian-bitbucket
Version:
Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MC
156 lines (155 loc) • 3.53 kB
TypeScript
import { ContentSearchParams, ContentSearchResponse } from './vendor.atlassian.search.types.js';
/**
* Search options for code search in a workspace
*/
export interface SearchCodeParams {
workspaceSlug: string;
searchQuery: string;
page?: number;
pageLen?: number;
repoSlug?: string;
fields?: string;
language?: string;
extension?: string;
}
/**
* Search options for commit search in a repository
*/
export interface SearchCommitsParams {
workspaceSlug: string;
repoSlug: string;
searchQuery: string;
page?: number;
pageLen?: number;
fields?: string;
}
/**
* Response type for code search API
*/
export interface CodeSearchResponse {
size: number;
page: number;
pagelen: number;
query_substituted: boolean;
values: CodeSearchResult[];
}
/**
* Response type for commits API
*/
export interface CommitsResponse {
size: number;
page: number;
pagelen: number;
next?: string;
previous?: string;
values: CommitResult[];
}
/**
* Commit result type
*/
export interface CommitResult {
hash: string;
date: string;
message: string;
type: string;
author: {
raw: string;
type: string;
user?: {
display_name: string;
account_id: string;
links: {
self: {
href: string;
};
avatar: {
href: string;
};
};
};
};
links: {
self: {
href: string;
};
html: {
href: string;
};
};
repository?: {
name: string;
full_name: string;
links: {
self: {
href: string;
};
html: {
href: string;
};
};
};
}
/**
* Code search result type
*/
export interface CodeSearchResult {
type: string;
content_match_count: number;
content_matches: ContentMatch[];
path_matches: PathMatch[];
file: {
path: string;
type: string;
links: {
self: {
href: string;
};
};
};
}
/**
* Content match type
*/
export interface ContentMatch {
lines: {
line: number;
segments: {
text: string;
match?: boolean;
}[];
}[];
}
/**
* Path match type
*/
export interface PathMatch {
text: string;
match?: boolean;
}
/**
* Search for commits in a repository using the Bitbucket API
*
* @param {SearchCommitsParams} params - Parameters for the commit search
* @returns {Promise<CommitsResponse>} The search results from the Bitbucket API
*/
export declare function searchCommits(params: SearchCommitsParams): Promise<CommitsResponse>;
/**
* Search for code in a workspace using the Bitbucket API
*
* @param {SearchCodeParams} params - Parameters for the code search
* @returns {Promise<CodeSearchResponse>} The search results from the Bitbucket API
*/
export declare function searchCode(params: SearchCodeParams): Promise<CodeSearchResponse>;
/**
* Search for content in Bitbucket
*
* @param params Search parameters
* @returns Content search response
*/
declare function searchContent(params: ContentSearchParams): Promise<ContentSearchResponse>;
declare const _default: {
searchCode: typeof searchCode;
searchCommits: typeof searchCommits;
searchContent: typeof searchContent;
};
export default _default;