Please do not open a public issue. Use GitHub's private vulnerability reporting (Security tab → Report a vulnerability) on this repository. You will get an answer as soon as possible.
- gomcp is a resource server: it verifies tokens, it never issues them.
gomcp serve,watchandbuildcompile and run the project you point them at. Only use them on code you trust.- The generated server listens on
GOMCP_ADDR(default127.0.0.1:8080, loopback only). SetGOMCP_ADDR(or--addr) to expose it, and configure@MCP.Authfirst. - Any error a tool returns, not only
mcp.ToolError, is sent to the model as text. Never put secrets, DSNs or paths in it. ctx.ResourceUpdated(uri)reaches every listener subscribed to that exact URI (subject to the resource scopes). Use per-user URIs and authorize them in the resource handler viactx.Principal().- Over stdio (
gomcp stdio,--stdio,GOMCP_TRANSPORT=stdio) there is no authentication and scopes are not checked: the caller is the process that started the server. Only start it for clients you trust, and do not wire it to a network socket. examples/features/uses a stub token verifier that accepts every non-empty token. Never copy it into production.- Features of the example that check scopes (
@MCP.AuthScopes) apply to tools, prompts, resources, completion and resource subscriptions.