mcp-noderings is a Model Context Protocol server that exposes curated Noderings
capabilities to MCP clients (Cursor, Claude Desktop, etc.). It is an adapter in
front of the Noderings gRPC API, not a new product backend.
MCP Client
→ Transport (stdio | streamable-http | SSE)
→ HTTP caller auth (HTTP transports only)
→ MCP protocol adapter (mcp-go)
→ Tool layer (typed inputs/outputs)
→ Application / service layer
→ Buf-generated gRPC client (or HTTP-gateway fallback)
→ Noderings gRPC server / HTTP gateway
Transports share one tool and service layer. Tool handlers consume an already-
authenticated context.Context only; they do not implement transport auth.
| ID | Decision | Reason |
|---|---|---|
| Q1 | github.com/mark3labs/mcp-go |
Matches Grafana MCP; stdio + streamable-http + SSE |
| Q2 | Shared bearer is the default HTTP caller auth (server-auth-token); OAuth 2.1 (http.authMode: oauth) is opt-in |
OAuth verifies Noderings-issued JWTs (JWKS, iss, RFC 8707 aud, exp) and the SA impersonates the user. Modes are mutually exclusive |
| Q3 | v1 read-only tools; writes gated by --disable-write (default on) |
Least privilege / context window |
| Q4 | Chart is deploy/helm/noderings-mcp |
production: true requires image.digest (sha256:…) |
| Q5 | Module github.com/noderings/mcp |
Public path; not module backend |
| Q6 | Default replicaCount=1, HPA off; multi-replica requires sessionAffinity.enabled |
SessionBinder is process-local; not official-SDK stateless |
| Q7 | Env prefix NRMCP_ |
Avoid collision with backend NR_ |
| Q8 | Opt-in OTLP HTTP traces; Prometheus remains the metrics path | Default off. No secrets in spans |
| Q9 | GET /.well-known/oauth-protected-resource is 404 in shared-bearer; RFC 9728 metadata in oauth mode |
401s in oauth mode carry WWW-Authenticate: Bearer resource_metadata=… |
| Q11 | GET /.well-known/mcp.json is public discovery metadata (name, endpoint, icon). No token and no tool list. Host and Origin checks still apply |
Directories fetch this path before connecting. The endpoint is http.oauth.resource when set, so the document does not echo the request Host |
| Q10 | gRPC when grpcAddress is set; HTTP gateway only if that address is empty |
Proto is the contract; HTTP uses proto google.api.http paths, not frontend OpenAPI |
- Public contract: vendored
proto/v1, generated with Buf intogen/proto/v1. - Maintainer sync:
make proto-syncfrom a backend checkout, thenmake generate. See generate.md. - Vendored surface: client, provider, IAM, and subscription, with VNC, password, Stripe Connect, payout, and Proxmox CPU fields removed. Gameserver, notification, and roadmap are dropped. See generate.md.
- Do not use frontend
npm run api:update/openapi.v3.jsonfor Go types. - Do not
import backend/....
Two distinct credentials (never passthrough):
- MCP caller credential (HTTP/SSE only), one mode per process via
http.authMode:shared-bearer(default): secret compared toserverAuthToken/serverAuthTokenFile(one ≥32-char secret per line; prefer one per client). Required for every HTTP bind, including loopback.oauth(opt-in): Noderings-issued JWT access token verified againsthttp.oauth.jwksURL(iss, RFC 8707aud=http.oauth.resource,exp).user_id,org_id,org_typecome from claims. Every MCP request,initializeandtools/listincluded, requires the JWT and answers 401 withWWW-Authenticatewithout one.GET /.well-known/oauth-protected-resourceandGET /.well-known/mcp.jsonare the only public paths.http.oauth.allowAnonymousDiscovery: true(off by default) letsinitialize,notifications/initialized,ping, and the*/listmethods answer without a token so a directory can index the catalog;tools/callstill needs the JWT, an unauthenticatedGETis 405, and the first valid token adopts the discovery session.
- Noderings SA token: opaque JWT from
TOKEN/TOKEN_FILE, sent only as gRPC metadata or HTTPAuthorization: Bearer …. Shared-bearer adds optionalx-organization-id(pinned org). OAuth addsx-acting-user-idandx-organization-idfrom the verified token (impersonation: backend authorizes as that user/org). The caller's token is never forwarded. The HTTP-gateway path is used only whenbackend.grpcAddressis empty.
stdio trusts process/environment (MCP spec); logs go to stderr.
Curated snake_case tools by category (identity, vms, dns, tickets,
catalog, provider). No generic call_api. No progressive search_tools in v1.
Write tools (create_virtual_machine, update_virtual_machine_power,
delete_virtual_machine, create_snapshot, create_dns_zone, upsert_dns_record,
upsert_dns_geo_record, delete_dns_geo_record, create_ticket,
create_network, create_prefix, add_reserved_ip,
remove_reserved_ip, update_node_placement_policy, create_vm_template,
create_plan) are
registered only when tools.disableWrite is false (default true). VM create
uses SSH key IDs only. create_dns_zone creates a blank apex zone (no record
import). upsert_dns_record maps to proto UpsertDnsRecord and is create-only
unless allow_overwrite is true. upsert_dns_geo_record maps to
UpsertDnsGeoRecord with the same create-only default.
HTTP Host/Origin allowlists must not contain *. Tool concurrency is capped by
limits.maxConcurrentTools.
Security review: security-review.md.
Writes default off. OAuth is opt-in; shared-bearer remains the default. Optional live gRPC tests run only with NRMCP_IT=1.
- Grafana reference: https://github.com/grafana/mcp-grafana
- MCP transports: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports