Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: mark3labs/mcp-go

Tags

v0.44.0-beta.2

Toggle v0.44.0-beta.2's commit message
fmt

v0.44.0-beta.1

Toggle v0.44.0-beta.1's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
fix: Add missing session cleanup to the StreamableHTTPServer DELETE h…

…andler (#667)

* fix: Add missing session cleanup to the StreamableHTTPServer DELETE handler

* Fix merge typo

---------

Co-authored-by: Connor Zanin <[email protected]>

v0.43.2

Toggle v0.43.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: handle either $defs or definitions field when unmarshaling ToolA…

…rgumentsSchema (#645)

Older versions of the JSON Schema spec use the "definitions" field,
while newer versions use "$defs". This can be seen in the Honeycomb
MCP, which uses "definitions".

This commit adds support for both fields, and prefers "$defs" over
"definitions" if both are present.

v0.43.1

Toggle v0.43.1's commit message
fmt + fix linting errors

v0.43.0

Toggle v0.43.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: custom header (#632)

v0.43.0-beta.3

Toggle v0.43.0-beta.3's commit message
update CI/CD

v0.43.0-beta.2

Toggle v0.43.0-beta.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: add SessionWithResourceTemplates for session-specific resource …

…templates (#624)

* feat: add SessionWithResourceTemplates for session-specific resource templates

Implements session-specific resource templates to achieve parity with
SessionWithTools and SessionWithResources. This allows sessions to have
their own resource templates that override global templates with the
same URI pattern.

Key changes:
- Add SessionWithResourceTemplates interface to ClientSession hierarchy
- Implement interface in both SSE and StreamableHTTP transports
- Add AddSessionResourceTemplate(s) and DeleteSessionResourceTemplates methods
- Update handleListResourceTemplates to merge session and global templates
- Update handleReadResource to check session templates before global ones
- Session templates trigger notifications/resources/list_changed when modified

Closes #622

* test: add comprehensive tests for session resource templates

- Add sessionTestClientWithResourceTemplates mock
- Test AddSessionResourceTemplate and AddSessionResourceTemplates
- Test DeleteSessionResourceTemplates
- Test session template override behavior
- Test notification behavior (enabled/disabled)
- Test uninitialized session handling
- Test error cases for unsupported sessions
- Verify thread-safety through existing patterns

Coverage increased from 70.17% to 72.8% (+2.63%)

* refactor: address CodeRabbit review comments

- Use atomic.Bool for initialized field in test mock to prevent data races
- Add nil checks for URITemplate in handleReadResource for both session and global templates
- Add validation in AddSessionResourceTemplates to prevent nil URITemplate, empty URI, or empty Name
- Simplify Get/SetSessionResourceTemplates using maps.Clone
- Fix test initialization states to match expected behavior

All tests pass with race detector.

v0.43.0-beta.1

Toggle v0.43.0-beta.1's commit message
fmt

v0.42.0

Toggle v0.42.0's commit message
go fmt

v0.42.0-beta.3

Toggle v0.42.0-beta.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[disable-stream] Add WithDisableStreaming option to StreamableHTTP se…

…rver to allow disabling streaming (#613)

* [disable-stream] Add `WithDisableStreaming` option to StreamableHTTP server to allow disabling streaming

[Per the spec](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#listening-for-messages-from-the-server), a server is allowed to respond with 405 in response to a request for streaming. In our use case, we do not need streaming, and do not want to support it at a network layer.

* [disable-stream] bounce

* [disable-stream] tests

* [disable-stream] fix docstring

* [disable-stream] logging

* [disable-stream] bounce