Skip to content

Share one server over HTTP

github-actions[bot] edited this page Nov 29, 2026 · 2 revisions

One server can answer a whole team. Everyone sees what the server's own LibreNMS, Unimus and Graylog accounts can see: a token is permission to use the server, not a LibreNMS sign-in.

Start it

  1. Make a token of its own for each person:

    openssl rand -hex 32
  2. Put the settings in a file only its owner can read:

    LIBRENMS_URL=https://librenms.example.net
    LIBRENMS_TOKEN=your-token
    MCP_TRANSPORT=http
    MCP_HTTP_TOKENS=alice:<alice's token>,bob:<bob's token>
    
  3. Start it:

    docker run -d --name dashynms-mcp --restart unless-stopped -p 127.0.0.1:8080:8080 --env-file dashynms.env ghcr.io/dashynms/mcp:latest

    If you run the standalone program instead of Docker, set the same environment variables and start dashynms-mcp with no arguments. It listens on 127.0.0.1:8080 by default.

Put HTTPS in front of it

The server speaks plain HTTP, so don't publish its port. Put a reverse proxy with HTTPS in front. With Caddy, this is the whole configuration:

mcp.example.net {
    reverse_proxy 127.0.0.1:8080
}

With nginx, turn buffering off:

location / {
    proxy_pass http://127.0.0.1:8080;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_buffering off;
    proxy_read_timeout 300s;
}

Connect each person

Point each assistant at /mcp with that person's token. In Claude Code, set DASHYNMS_TOKEN where your shell keeps its secrets, and add this to .mcp.json in your project. The token stays out of the file and your shell's history:

{
  "mcpServers": {
    "dashynms": {
      "type": "http",
      "url": "https://mcp.example.net/mcp",
      "headers": { "Authorization": "Bearer ${DASHYNMS_TOKEN}" }
    }
  }
}

In another coding assistant that edits its own configuration, you can ask it directly:

Add a Streamable HTTP MCP server named dashynms at https://mcp.example.net/mcp.
Send an Authorization header with "Bearer " followed by my DASHYNMS_TOKEN environment variable.
Do not write the token into any tracked file.

Check on it

  • /health answers ok while the server is running.
  • /ready answers ready, or 503 when LibreNMS doesn't answer. A server that offers only help is always ready. LibreNMS is checked at most once every 15 seconds, and that check doesn't count towards MCP_MAX_CONCURRENT_REQUESTS.

Neither probe needs a token. Everything else requires a valid token and answers 401 without one. Each token can have up to 64 requests open at once, streams included; further requests receive 429.

To add or remove someone, change MCP_HTTP_TOKENS and restart the server. The audit trail records whose token was used.

Clone this wiki locally