dox_mcp 3.1.2
dox_mcp: ^3.1.2 copied to clipboard
Model Context Protocol (MCP) server for the Dox framework: tools over Streamable HTTP, with signed sessions that work on every isolate.
3.1.2 #
- New:
McpDtoTool<T>, a tool that takes a@Dtoclass as its input.inputSchemacomes from the DTO, so@Describetexts show up. The arguments are checked like a DTO in a controller (async rules too), andhandlegets the typed object. Bad arguments are a tool result withisError: truethat lists each problem. - New:
McpToolResult.invalidArguments(tool, issues), the error result for bad arguments. - Fix: a
code_verifierwith non-ASCII characters made the token route crash with a 500. Now a verifier must be 43 to 128 characters ofA-Z a-z 0-9 - . _ ~(RFC 7636). Other verifiers getinvalid_request. approvenow checks thatcode_challengeis 43 base64url characters, the shape of an S256 challenge.- A redirect address at registration may be at most 2048 characters (
McpOAuth.maxRedirectUriLength). Longer ones getinvalid_redirect_uri. - Docs: the consent page must show the redirect host and HTML-escape the client name.
3.1.1 #
- New:
McpOAuth, the OAuth 2.1 sign-in of the MCP spec. Discovery files (RFC 9728, RFC 8414), dynamic client registration with signed client ids (nothing stored), PKCES256, one-time codes in a Dox cache shared by the isolates,authenticateforAuthorization: Bearer, andunauthorizedwithWWW-Authenticate. The app gives the consent page and the tokens (McpOAuthTokens). - Use
RequestBodyandBodyKindfrom the publicpackage:dox_core/dox_core.dartlibrary. Needsdox_core3.1.1.
3.1.0 #
- First release:
McpServer(Streamable HTTP, JSON replies),McpToolwithdox_validationinput schemas,McpTool.of,McpToolResult,McpContext, andSignedMcpSessions(HMAC-signed ids fromAPP_KEY, an optional cache store for ended ids).