Skip to main content

Model Context Protocol (MCP)

Early Access

Try our newest feature! Only available through reach out. Contact us to join the early access program and get priority support.

Unizo offers an MCP server that integrates SCM platforms with any LLM provider supporting the MCP protocol. This enables your AI agent to perform repository operations across GitHub, GitLab, Bitbucket, and Azure DevOps via a single MCP server.

Supported Tools & Use Cases

The following tools are available in the SCM MCP Server:

Tool NameDescription
list_repositoriesBrowse repositories with filtering and search capabilities
get_file_contentRead source files, configuration, and documentation
list_branchesExplore repository branches and their protection status
list_commitsAnalyze commit history with author and change information
create_pull_requestCreate pull requests with AI-generated descriptions
search_codeFind code patterns, vulnerabilities, and configurations

list_repositories

Lists repositories from the specified integration.

Parameters:

  • integration (string, required): SCM integration identifier
  • organization (string): Filter by organization or namespace
  • page (number): Page number for pagination (default: 1)
  • limit (number): Results per page (default: 20, max: 100)

Returns: Array of repository objects with metadata

get_file_content

Retrieves the content of a file from a repository.

Parameters:

  • integration (string, required): SCM integration identifier
  • repository (string, required): Repository name or ID
  • path (string, required): File path relative to repository root
  • branch (string): Branch name (default: repository's default branch)

Returns: File content as string

list_branches

Lists all branches in a repository.

Parameters:

  • integration (string, required): SCM integration identifier
  • repository (string, required): Repository name or ID
  • page (number): Page number for pagination (default: 1)
  • limit (number): Results per page (default: 20, max: 100)

Returns: Array of branch objects with protection status

list_commits

Retrieves commit history from a repository.

Parameters:

  • integration (string, required): SCM integration identifier
  • repository (string, required): Repository name or ID
  • branch (string): Branch name (default: repository's default branch)
  • since (string): ISO 8601 date to filter commits after
  • until (string): ISO 8601 date to filter commits before
  • page (number): Page number for pagination (default: 1)
  • limit (number): Results per page (default: 20, max: 100)

Returns: Array of commit objects with author, message, and timestamp

create_pull_request

Creates a new pull request.

Parameters:

  • integration (string, required): SCM integration identifier
  • repository (string, required): Repository name or ID
  • title (string, required): Pull request title
  • source_branch (string, required): Branch containing changes
  • target_branch (string, required): Target branch for merge
  • description (string): Pull request description

Returns: Created pull request object with ID and URL

search_code

Searches for code patterns across repositories.

Parameters:

  • integration (string, required): SCM integration identifier
  • query (string, required): Search query string
  • file_pattern (string): File pattern filter (e.g., ".yaml", ".py")
  • repository (string): Limit search to specific repository
  • page (number): Page number for pagination (default: 1)
  • limit (number): Results per page (default: 20, max: 100)

Returns: Array of search results with file paths and matching lines

Installation

Prerequisites

  • A Unizo API key
  • An active SCM integration (GitHub, GitLab, Bitbucket, or Azure DevOps)
  • Node.js v20 or higher

MCP Configuration

Here is an example configuration for setting up the Unizo SCM MCP server:

{
"mcpServers": {
"unizo-scm": {
"command": "npx",
"args": [
"mcp-remote",
"http://api.unizo.ai/mcp/scm",
"--allow-http",
"--header",
"apikey:${UNIZO_API_KEY}"
],
"env": {
"UNIZO_API_KEY": "your_api_key"
}
}
}
}

Client Setup

For detailed setup instructions with specific AI clients:

Environment Variables

The following environment variables are required:

Error Handling

All tools return errors in a consistent format:

{
"error": {
"code": "REPOSITORY_NOT_FOUND",
"message": "Repository 'example/repo' not found"
}
}

Common error codes:

  • INTEGRATION_NOT_FOUND: Invalid integration ID
  • REPOSITORY_NOT_FOUND: Repository doesn't exist or no access
  • BRANCH_NOT_FOUND: Branch doesn't exist
  • FILE_NOT_FOUND: File path not found
  • RATE_LIMIT_EXCEEDED: API rate limit reached
  • UNAUTHORIZED: Invalid credentials or permissions