MCP server
Deploy Algebra MCP Server
Use this guide to run algebra-mcp-server from a published Docker image in GitHub Container Registry (ghcr.io).
Overview
The service exposes:
POST /mcpGET /healthGET /metrics
By default, the container listens on port 8080.
Tooling
Free tools:
getTokensapproveTokensgetPricequoteSwapgetPoolsgetPoolAPRaddLiquidityToPoolremoveLiquidityFromPoolgetPositionsbroadcastTx
Paid tools:
createPool
x402
createPool is protected with x402. The first unpaid call returns payment requirements. Retry the same request with the signed payment object in x402_payment.
Before You Start
Make sure the target machine has:
Docker installed
Network access to
ghcr.ioA valid runtime
.envfile
You also need a GitHub token that can read packages.
Step 1: Authenticate to GHCR
To pull a private image from GitHub Container Registry, log in first.
Required token
Use a GitHub Personal Access Token (classic) with:
read:packages
The GitHub account that owns the token must also have access to the package itself.
Login command
Step 2: Prepare Environment Variables
Create a .env file on the deployment host.
Use .env.example as the source of truth for all supported variables and comments.
Step 3: Pull the Image
Pull the default image:
To pull a specific tag:
ARM hosts
On Apple Silicon or another ARM-based host, you may need to force the image platform if only amd64 is available:
Step 4: Run the Container
Recommended: pass environment with --env-file
If you are pinning a specific tag:
ARM hosts: run with explicit platform
Alternative: pass variables inline
If you do not want to use an env file, you can pass variables with -e:
Step 5: Verify the Deployment
Check that the container is running:
Check health:
Expected response:
The MCP endpoint is available at:
References
Last updated