Quickstart
This guide takes you from an admitted beta account to your first execution from the terminal. You do not need to build the client from source.
Before you start
Section titled “Before you start”You need access to the mPaka console and a terminal on Linux, macOS, or Windows. The console manages your account and credentials; the CLI submits the workload.
1. Install the CLI
Section titled “1. Install the CLI”The mPaka download page is the source of truth for supported platforms, manual downloads, and installer verification.
On Linux or macOS, run:
curl -fsSL https://cli.mpaka.dev/install | bashOn Windows PowerShell, run:
irm https://cli.mpaka.dev/install.ps1 | iexOpen a new terminal if the installer asks you to refresh your PATH, then
verify the installation:
mpaka --version2. Create an API key
Section titled “2. Create an API key”Open API keys in the console, create a key for this client, and copy its token when it appears. The token is shown once. You can also create it with the CLI after signing in:
mpaka login --email user@example.commpaka api-keys create --name hello-pythonCreating or rotating a key with the CLI requires an owner account. The CLI prints the token once and does not save it; handle it as a secret.
Set it for your current terminal session without putting the token in shell history. For longer-lived use, store it in a secret manager.
Linux or macOS:
printf 'mPaka API key: 'read -r -s MPAKA_API_KEYprintf '\n'export MPAKA_API_KEYWindows PowerShell:
$secureKey = Read-Host 'mPaka API key' -AsSecureString$env:MPAKA_API_KEY = (New-Object System.Net.NetworkCredential('', $secureKey)).PasswordRemove-Variable secureKeyRead API keys before configuring a shared or deployed client.
3. Create a Python file
Section titled “3. Create a Python file”Create hello.py:
print("Hello from mPaka")Source must be non-empty Python and no larger than 16 KiB.
4. Run it
Section titled “4. Run it”mpaka run --file hello.pyThe CLI prints the execution ID and lifecycle status, then polls until the execution reaches a terminal state. Its final output includes:
Status— the lifecycle outcome.Mode— how the service handled the workload.Exit code— the Python process result when one is available.stdoutandstderr— the program output returned by the service.
The CLI also prints a generated idempotency key to standard error before a new submission. Keep it if the network fails and you need to recover the same request without creating a duplicate.
Interpret the result
Section titled “Interpret the result”A run succeeds only when all three conditions are true:
Statusiscompleted.Modeis notmock_no_code_execution.Exit codeis0.
Any other combination returns a non-zero CLI exit status. In particular,
mock_no_code_execution means the source was not executed, even if the
lifecycle record says completed.
If polling ends before the execution becomes terminal, the CLI reports the execution ID and last known status. Inspect it without submitting again:
mpaka executions get <EXECUTION_ID>Next steps
Section titled “Next steps”- See every command and option in the CLI reference.
- Connect an MCP client with the MCP server guide.
- Learn the fixed input bounds and lifecycle states in Limits and results.
- Use the HTTP API when integrating without the CLI.
- Manage keys and choose secure storage in API keys.
Run with Python packages
Section titled “Run with Python packages”For code that needs third-party packages, create a text file such as
requirements.txt with pinned versions:
requests==2.32.3Create the environment, wait for it to become ready, and submit using its ID:
mpaka environments create --requirements requirements.txtmpaka environments wait <ENVIRONMENT_ID>mpaka run --file hello.py --environment <ENVIRONMENT_ID>Run the execution only after the wait reports ready. If the environment is
failed, inspect it with mpaka environments get <ENVIRONMENT_ID> and stop
before submitting. Environment builds are asynchronous and depend on
deployment configuration. See the CLI reference for listing and
timeout behavior, or the HTTP API for
the full contract.