Skip to main content
Glama

add_private_app

Add a private Git repository to Codemagic CI/CD using SSH authentication. Configure repository access with SSH keys to enable automated builds and deployments.

Instructions

Add a new private repository to Codemagic using an SSH key.

Args: repository_url: The SSH URL of the private Git repository. ssh_key_data: Base64-encoded SSH private key. ssh_passphrase: Optional passphrase for the SSH key. project_type: Optional project type (e.g. "flutter-app", "react-native"). team_id: Optional team ID to add the app to.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repository_urlYes
ssh_key_dataYes
ssh_passphraseNo
project_typeNo
team_idNo

Implementation Reference

  • The MCP tool handler for 'add_private_app' which calls the CodemagicClient.
    @mcp.tool()
    async def add_private_app(
        repository_url: str,
        ssh_key_data: str,
        ssh_passphrase: str | None = None,
        project_type: str | None = None,
        team_id: str | None = None,
    ) -> Any:
        """Add a new private repository to Codemagic using an SSH key.
    
        Args:
            repository_url: The SSH URL of the private Git repository.
            ssh_key_data: Base64-encoded SSH private key.
            ssh_passphrase: Optional passphrase for the SSH key.
            project_type: Optional project type (e.g. "flutter-app", "react-native").
            team_id: Optional team ID to add the app to.
        """
        async with CodemagicClient() as client:
            return await client.add_private_app(
                repository_url=repository_url,
                ssh_key_data=ssh_key_data,
                ssh_passphrase=ssh_passphrase,
                project_type=project_type,
                team_id=team_id,
            )
  • The underlying API client method that executes the POST request to add a private app.
    async def add_private_app(
        self,
        repository_url: str,
        ssh_key_data: str,
        ssh_passphrase: str | None = None,
        project_type: str | None = None,
        team_id: str | None = None,
    ) -> Any:
        payload: dict[str, Any] = {
            "repositoryUrl": repository_url,
            "sshKey": {"data": ssh_key_data},
        }
        if ssh_passphrase is not None:
            payload["sshKey"]["passphrase"] = ssh_passphrase
        if project_type is not None:
            payload["projectType"] = project_type
        if team_id is not None:
            payload["teamId"] = team_id
        return await self._post("/apps/new", json=payload)

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/AgiMaulana/CodemagicMcp'

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