Skip to content

Run the MCP server

The server ships with the repository. Run it locally or next to your own deployment:

export CODEINTENT_MCP_TOKEN="$(python3 -c 'import secrets; print(secrets.token_urlsafe(32))')"
uv run python -m scripts.mcp_server   # http://127.0.0.1:8220/mcp, plus an open GET /healthz

Configuration

VariableDefaultMeaning
CODEINTENT_MCP_TOKENnoneBearer token clients must send. Required when CODEINTENT_ENV=production, where the server refuses to start without it. Elsewhere a missing token logs a warning and leaves the endpoint open, for development only.
PORT / HOST8220 / 127.0.0.1Listen address. Use HOST=0.0.0.0 in containers and on Heroku.
CODEINTENT_MCP_ALLOWED_HOSTSnoneComma-separated public hostnames. When set, requests with any other Host header get 421.
CODEINTENT_MCP_CONCURRENCY2Repository analyses that may run at once. A caller that waits more than 60 s for a slot gets a "busy, retry" tool error.
FORWARDED_ALLOW_IPS127.0.0.1Proxies whose X-Forwarded-* headers are trusted. Set it to * behind the Heroku router.
GITHUB_TOKENnoneOptional. Raises GitHub's anonymous rate limit for tarball downloads.

Release files are cached in CODEINTENT_ARTIFACT_CACHE after the first run for a package.