mcp-server-0.1.0.21: CHANGELOG.md
# Revision history for mcp-server
## 0.1.0.21 - ???
* **BREAKING**: every handler (prompt/resource/tool; list and get/read/call)
now receives a `ClientContext` as its first argument, so a server can behave
differently depending on who is calling. On stdio the context is anonymous;
on HTTP it carries the request's bearer token and the principal returned by
the authorization callback.
* **BREAKING**: `HttpConfig` gains an `httpAuthorize` field — an optional
callback that validates the presented `Authorization: Bearer` token and
returns an application-defined principal (`Nothing` rejects with 401). As it
now holds a function, `HttpConfig` no longer derives `Show`/`Eq`.
* HTTP transport: accept requests without an `MCP-Protocol-Version` header
(the spec says to assume `2025-03-26`), exempt `initialize` from the header
check (it negotiates its version in the body), and keep rejecting a present
but unsupported header with 400. Previously every request without the header
was rejected, locking out pre-`2025-06-18` clients.
* `initialize` now advertises only the capabilities that actually have
handlers, so strict clients no longer drop the server when e.g.
`prompts/list` answers "not supported".
* CORS: preflight `OPTIONS` requests are exempt from authorization (browsers
send no credentials on preflight) and `Authorization` is included in
`Access-Control-Allow-Headers`.
* `http-simple-example` is now built with `-threaded`, which Warp requires;
previously every request crashed with a `TimerManager` error.
## 0.1.0.20 - ???
* Fix protocol version negotiation: echo back any compatible revision the client
proposes (`2024-11-05`, `2025-03-26`, `2025-06-18`, `2025-11-25`) instead of
always responding with the server's own version. Fixes clients (e.g. Claude
Code) that disconnect when they receive a different version than requested.
* Apply the same negotiation to the HTTP transport's `MCP-Protocol-Version`
header check, which previously rejected anything other than `2025-06-18`.
* Default/fallback advertised version bumped to `2025-11-25`.
## 0.1.0.19 - ???
* Improve handler code generated by TemplateHaskell functions in `MCP.Server.Derive`:
* Don't repeat `Map.fromList` for each argument in map lookup
* Properly handle argument parse errors (Return `InvalidParams` error instead of crashing mcp server with `error`)
## 0.1.0.18 - 2026-02-09
* Switch default-language to GHC2021 to support broader range of GHC versions (9.6 - 9.12)
## 0.1.0.17 -- 2026-01-28
* Implement protocol version negotiation according to spec
* Remove unused dependencies, fix GHC warnings
* Add tested-with and haskell-ci generated GitHub Actions config
## 0.1.0.16 -- 2026-01-19
* Bump template-haskell dependency upper bound
## 0.1.0.15 -- 2025-08-13
* Update to MCP spec 2025-06-18
## 0.1.0.14 -- 2025-06-26
* Bump version bounds before adding to Stackage
* Remove support for JSON-RPC batching
## 0.1.0.13 -- 2025-06-17
* Better handling of UTF-8 in logs
## 0.1.0.12 -- 2025-06-17
* Fix unicode handling
* Refactor transports to remove unneeded functions
* Add unicode handling tests
## 0.1.0.11 -- 2025-06-17
* Refactor transports and add HTTP streaming support
* Add `MCP.Server.Handlers` module
* Add `MCP.Server.Transport.Http` and `MCP.Server.Transport.Stdio` modules
## 0.1.0.10 -- 2025-06-13
* Fix resources handling
## 0.1.0.9 -- 2025-06-13
* Bump versions of dependencies
* Port tests to hspec
## 0.1.0.8 -- 2025-06-12
* Support for nestable data types
## 0.1.0.7 -- 2025-06-09
* Documentation updates
## 0.1.0.6 -- 2025-06-09
* Remove pagination support
## 0.1.0.5 -- 2025-06-09
* Add descriptions to constructors and fields
## 0.1.0.4 -- 2025-06-09
* Clean up build configuration
## 0.1.0.3 -- 2025-06-09
* Refactor example modules
* Fix JSON to Haskell type conversion
## 0.1.0.0 -- 2025-06-05
* First version. Released on an unsuspecting world.