Repository navigation
Development and Docker
This page describes how to develop, build, and run the TP-Link Omada MCP server, including devcontainer and Docker usage.
From the main README:
- Node.js 20 or later
- npm 9 or later
- Access to a TP-Link Omada controller (e.g.
mbentley/omada-controller)
You also need suitable Omada credentials and controller configuration to obtain an OAuth client ID and secret.
npm installnpm run devThis:
- Compiles and runs the TypeScript server with
tsx. - Watches files and reloads automatically.
- Uses stdio or HTTP based on your environment variables.
npm run buildThis compiles TypeScript to JavaScript into the dist directory.
npm run checkThis runs linting and type checks according to the repo’s configuration.
npm startThis starts the compiled MCP server over stdio. Configure your MCP client (e.g. Claude Desktop) to run:
- Command:
npm start - Working directory: repo root
- Environment variables: your
.envfile or equivalent
To enable HTTP transport:
export MCP_SERVER_USE_HTTP=true
npm run dev # or: npm startDefaults:
- Port:
3000 - Bind address:
127.0.0.1 - Transport: Streamable HTTP (
MCP_HTTP_TRANSPORT=stream) - Endpoints:
-
/mcp– MCP (SSE + JSON-RPC) -
/healthz– healthcheck
-
For details on configuration and options, see Configuration and HTTP Transport.
The repository provides two Docker images:
- CLI/stdio image
- HTTP/SSE image
npm run docker:build # Build CLI/stdio image:
# ghcr.io/migueltvms/tplink-omada-mcp-cli:latest
npm run docker:run # Run CLI/stdio image with your .env fileThe docker:run script typically:
- Mounts your
.envfile inside the container. - Runs the server over stdio (useful for MCP clients that exec a container).
npm run docker:build:http # Build HTTP/SSE image:
# ghcr.io/migueltvms/tplink-omada-mcp-http:latest
npm run docker:run:http # Launch HTTP/SSE image and publish port 3000The HTTP image:
- Starts the MCP HTTP server by default (
MCP_SERVER_USE_HTTP=true). - Exposes port 3000 (by default) on the host.
You can override environment variables when running the container:
docker run --rm \
-p 3000:3000 \
-e OMADA_BASE_URL=https://omada-controller.local \
-e OMADA_CLIENT_ID=... \
-e OMADA_CLIENT_SECRET=... \
-e OMADA_OMADAC_ID=... \
ghcr.io/migueltvms/tplink-omada-mcp-http:latestIf you have access to the GitHub Container Registry for this project:
# Authenticate with GitHub Container Registry, then:
npm run docker:push # Push CLI/stdio image
npm run docker:push:http # Push HTTP/SSE imageThese tags follow the pattern:
ghcr.io/migueltvms/tplink-omada-mcp-cli:latestghcr.io/migueltvms/tplink-omada-mcp-http:latest
The repository includes a devcontainer configuration with:
- A Node.js development environment preconfigured for this repo.
- A sidecar Omada controller service for local testing.
You can open the repo in a devcontainer using:
- VS Code Remote Containers
- GitHub Codespaces
- Any other devcontainer-compatible environment
See .devcontainer/README.md in the repo for specific details and how to connect the Omada MCP server to the sidecar controller.
For configuration options, see Configuration.
For tool usage and Omada API mappings, see Tools.
For transport details, see HTTP Transport.