Documentation
¶
Overview ¶
Package mcp serves the Model Context Protocol at /mcp: AI clients (Claude, …) read and edit pads and use their chat with a token (Authorization: Bearer ep_…). What a call may do is the token's: its account's rights of the moment, cut down to the token's scopes and pad pattern, checked per pad like everywhere else.
The server keeps nothing between requests (stateless Streamable HTTP), so every instance of a cluster answers every request and no sticky sessions are needed.
Index ¶
Constants ¶
const Path = "/mcp"
Path is where the MCP server answers.
const ResourceMetadataPath = "/.well-known/oauth-protected-resource"
ResourceMetadataPath is OAuth 2.0 protected resource metadata (RFC 9728).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OAuth ¶
type OAuth interface {
MCPAccessToken(token string) (*oidc.MCPAccess, error)
MCPOAuthIssuer() (string, bool)
}
OAuth checks the access tokens of MCP clients that connected with a login and the person's consent (lib/api/oidc).