# HTTP / Docker Mode `context serve` can run as an HTTP MCP server instead of stdio. Use this when you need to share a single context server across multiple agents, run it in a container, or expose it to remote clients. ## Start as HTTP server ```bash # Localhost only (default) context serve --http # Specific port context serve --http 3000 # All interfaces (for Docker or remote access) context serve --http 8080 --host 0.0.0.0 ``` ## Docker ```bash docker run -p 8080:8080 \ -v ~/.context:/root/.context \ neuledge/context \ context serve --http 8080 --host 0.0.0.0 ``` The volume mount (`-v ~/.context:/root/.context`) reuses packages already downloaded on the host. Omit it if you want an isolated container with its own package store. ## Client configuration Point remote agents at `http://:8080` as an HTTP MCP server. For Claude Desktop, Cursor, or VS Code Copilot, use the same JSON structure as stdio mode but set `url` instead of `command`: ```json { "mcpServers": { "context": { "url": "http://localhost:8080" } } } ``` ## Security note HTTP mode has no built-in authentication. Do not expose `--host 0.0.0.0` on a public interface without a reverse proxy or firewall rule. On shared systems, bind to `127.0.0.1` (the default) and use an SSH tunnel if remote access is needed. ## Scope restriction `--libs` works in HTTP mode the same as in stdio mode: ```bash context serve --http 8080 --host 0.0.0.0 --libs react next typescript ```