SDK reference · Rails

@provenanceauth/rails/mcp

@provenanceauth/rails/mcp in the Rails: 5 methods. @provenanceauth/rails/mcp, handing a Provenance grant to another agent over MCP.

Methods

withMcpGrant

withMcpGrant(meta: Record<string, unknown> | undefined, data: DelegationMessageData): Record<string, unknown>

A request's _meta with the grant under (other keys kept; never the legacy key).

legacyGrantKeyRead

legacyGrantKeyRead(opts?: ReadMcpGrantOptions): boolean

True while the legacy key is still read.

readMcpGrantKeyed

readMcpGrantKeyed(meta: unknown, opts?: ReadMcpGrantOptions): { data: DelegationMessageData; key: McpGrantKey } | null

The grant an MCP request's _meta carries and the key it was under, or null.

readMcpGrant

readMcpGrant(meta: unknown, opts?: ReadMcpGrantOptions): DelegationMessageData | null

The grant an MCP request's _meta carries, or null (absent, or not a token string).

acceptMcpGrant

acceptMcpGrant(meta: unknown, opts: AcceptGrantOptions & ReadMcpGrantOptions): Promise<DelegationVerdict>

A tool server's check of the grant in a request's _meta (see acceptDelegation in @provenanceauth/rails/a2a).

Was this page helpful? Send us feedback

LLM? Read llms.txt.