Repository navigation
Releases: PrefectHQ/fastmcp-ts
Release list
v1.8.1
Patch Changes
-
79fdac9: Security update: require
@modelcontextprotocol/server,@modelcontextprotocol/server-legacy, and@modelcontextprotocol/client2.3.1 or later. The previous range (^2.0.0) allowed versions with these advisories:- GHSA-jm63-cq47-j5jp (high, server): shared transport or server instances delivered one HTTP client's messages to another.
- GHSA-46jr-4wx8-v453 (high, server): one HTTP request within the default size limit could exhaust server memory during validation.
- GHSA-rvq5-wwqv-78pq (medium, server and server-legacy): server bearer authentication accepted tokens issued for another service.
- GHSA-6prh-2h8m-c8cw (medium, client): HTTP client transports and OAuth requests followed cross-origin redirects and re-sent custom headers and request bodies.
The published CLI inlines its dependency tree, so it now ships the patched SDK: server and server-legacy 2.0.0 -> 2.3.1 (#126, #128), client 2.2.0 -> 2.3.1.
Also bumps launch-editor 2.14.1 -> 2.14.2 (#124), vite 8.3.0 -> 8.3.4 (#125), and markdown-it 14.3.2 -> 14.3.3 (#127) for security fixes. These are dev-only and do not affect the published package.
v1.8.0
Minor Changes
- e2cb1d1: Servers that verify tokens from an external authorization server can now publish RFC 9728 protected resource metadata (#114). Wrap a token or request verifier with
remoteAuth({ verifier, authorizationServers, baseUrl })and pass it toauth: the HTTP server serves the document at the path-scoped well-known URL (/.well-known/oauth-protected-resource/mcpfor/mcp) and every 401 challenge names it inresource_metadata. The built-inoauthmode now serves its protected resource metadata at the same path-scoped URL and names it in its 401 challenges. The root URL/.well-known/oauth-protected-resourceno longer serves it.oauthProvider()now answers an unknown or expired token with 401invalid_tokeninstead of 500.
Patch Changes
- d5cb7a5: Fix MCP Apps on the stateless 2025-era HTTP path (#113).
fetch()andrun({ transport: 'http', stateless: true })serve each request on a fresh server instance, so onlyinitializesees the client's capabilities. FastMCP treated every later request as coming from a client without UI support: it removed_meta.uifromtools/list,resources/listandresources/read, and replaced UI tool results with a placeholder. When the client's capabilities are unknown, FastMCP now serves the UI metadata and the real tool result. Clients known to lack UI support still get no UI metadata. For those clients a UI tool now keeps its textcontentand drops onlystructuredContent, instead of returning[UI not available in this client]. A UI tool that declares an output schema keeps itsstructuredContent.
v1.7.3
Patch Changes
-
1c26cc3: Update bundled dependencies. The published CLI inlines its dependency tree, so these bumps change the shipped artifact:
Also bumps undici 7.29.0 -> 7.30.0 (#109), markdown-it 14.2.0 -> 14.3.2 (#107), and brace-expansion 5.0.7 -> 5.0.12 (#110), which are dev-only and do not affect the published package.
v1.7.2
Patch Changes
v1.7.1
Patch Changes
- 0d9c5c7: Validate URL string transport inputs against http/https schemes. A string passed to
Client(or aurlentry in anmcpServersconfig) that is not a validhttp:orhttps:URL now fails fast with a clear error that points atStdioTransportfor local scripts, instead of a bareInvalid URLTypeError or a doomed fetch against a non-HTTP scheme. Hardens the client against the transport-inference pitfall found in upstream python fastmcp, where a script path string could be silently executed; fastmcp-ts never executed strings, and now rejects them explicitly.
v1.7.0
Minor Changes
- 6342119: Add configurable CORS for the HTTP listener via
http.cors— restrict origins (string, list, or predicate), enable credentialed requests, extend the allowed/exposed header lists, replace the methods list, set a preflight max-age, or disable CORS entirely withcors: false. The OAuth serve path now applies the same CORS handling as the plain path (it previously had none), and responses now exposeMcp-Session-Idby default so cross-origin browser clients can read their session id. Defaults are otherwise unchanged (Access-Control-Allow-Origin: *). Non-preflight responses no longer includeAccess-Control-Allow-Methods/Access-Control-Allow-Headers; browsers read those only from preflight answers. - 1b458b9: Framework logs are now configurable.
FastMCPOptions.loggeraccepts any object withdebug/info/warn/errormethods (console and Winston work directly; Pino needs a four-line adapter, see the logging docs), andFastMCPOptions.logLevel(orFASTMCP_LOG_LEVEL, defaultinfo,silentto disable) gates what reaches it. The built-in default logger writes styled output with a startup banner when stderr is a TTY and plain[fastmcp] LEVEL messagelines otherwise, always to stderr. Server lifecycle events (start, listening URL, session open and close) are now logged, previously swallowed failures (proxied-server capability probes, schema-generation strategy failures) are now visible at warn or debug, andLoggingMiddlewareconstructed without an emit function now writes through the framework logger to stderr instead ofconsole.log; that last change moves its output off stdout, which previously corrupted the JSON-RPC stream on the stdio transport. Anything parsing LoggingMiddleware output from stdout must read stderr instead.createProxyandbuildProxyFromClientalso acceptloggerandlogLeveloptions, forwarded to the internal FastMCP instance that backs the proxy. TherunCLI command now shows a startup spinner while it waits for the server to report listening, on a TTY; the--quietflag also suppresses the "Server started" confirmation line that follows it.
v1.6.0
Minor Changes
- 7e37ebc: Allow embedded applications to customize the MCP client identity with
ClientOptions.clientInfoandMultiServerOptions.clientInfo. The default identity now reports the installed FastMCP package version instead of a hard-coded version.
v1.5.2
Patch Changes
- ba8ed39: Fix modern-era (2026-07-28) resource subscriptions (#88). FastMCP servers now advertise the
resources.subscribecapability on modern connections, sosubscriptions/listenresourceSubscriptionsfilters are honored instead of being silently pruned, andnotifyResourceUpdated()reaches modern subscribers on both HTTP and stdio (stdio delivery is routed through the SDK's listen router). Stateless legacy HTTP still withdraws the capability.Client.subscribeResource()on a modern connection now rejects with a clear error when the server does not honor the subscription, instead of registering a handler that can never fire.
v1.5.0
Minor Changes
- 6edacfe:
run()can now serve a configurable health endpoint on the HTTP transport (health: trueorhealth: { path, status, body }, defaultGET /healthzreturning200 ok), and the newcustomRoute()method registers arbitrary HTTP routes (for example Kubernetes probe or metrics endpoints) on the listenerrun()starts. Route handlers receive a web-standardRequest, return aResponse, and own the whole exchange: no MCP auth, no DNS-rebinding guards, and no CORS headers run in front of them. - 344dcf6:
createOpenAPIServernow omitsreadOnlyproperties from tool input schemas andwriteOnlyproperties from tool output schemas, following OpenAPI access-mode semantics. Removed names are also pruned from the correspondingrequiredlists. - 50d6111:
ToolConfignow accepts an optionalannotationsfield (ToolAnnotations:title,readOnlyHint,destructiveHint,idempotentHint,openWorldHint, MCP 2025-03-26). Annotations are forwarded verbatim intools/list, mirroring how resource annotations are already handled. Closes #76.
v1.4.0
Minor Changes
- 7e3f88d: Add a fetch-native
FastMCP.fetch()HTTP entrypoint for stateless legacy and modern MCP requests.