Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mark3labs/mcp-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.34.0
Choose a base ref
...
head repository: mark3labs/mcp-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.35.0
Choose a head ref
  • 10 commits
  • 34 files changed
  • 7 contributors

Commits on Jul 15, 2025

  1. Http headers (#480)

    * Add HTTP headers to Request
    
    - Pass headers from request via ctx
    - Add headers from ctx to CallToolRequest to further pass it to handlers.
    
    * Add http-headers field to all Request Structs
    
    * Use request_handler.tmpl to add http headers
    
    * Add tests and documentation for Header passthrough
    
    * Chore: fix comment in CallToolRequest struct
    
    * Fix Race condition while setting context
    adityamj authored Jul 15, 2025
    Configuration menu
    Copy the full SHA
    baa7153 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2025

  1. Configuration menu
    Copy the full SHA
    95201f2 View commit details
    Browse the repository at this point in the history
  2. fix: proper handling

    pottekkat committed Jul 16, 2025
    Configuration menu
    Copy the full SHA
    ef2e795 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2025

  1. fix: fix race condition

    pottekkat committed Jul 17, 2025
    Configuration menu
    Copy the full SHA
    800e529 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2025

  1. Configuration menu
    Copy the full SHA
    7c38b56 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2025

  1. Fix race condition in stdio.SendRequest with canceled context (#503)

    Add early context cancellation check to prevent race condition where
    SendRequest could return nil instead of context.Canceled when called
    with an already-canceled context. This issue only manifested in certain
    environments like GitHub Actions due to timing differences.
    
    The fix ensures consistent behavior by checking context cancellation
    before any I/O operations.
    
    🤖 Generated with [opencode](https://opencode.ai)
    
    Co-authored-by: opencode <noreply@opencode.ai>
    ezynda3 and opencode authored Jul 22, 2025
    Configuration menu
    Copy the full SHA
    5800c20 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2025

  1. Embed client capabilities into the Session (#491)

    * Embed client capabilities into the Session
    
    Client sends its capabilities during the initialization step.
    
    This commit embeds the client capabilities into the client session  in this step to enable
    subsequent executions are able to check the client capabilities to determine
    what actions they can perform. For instance, MCP Server checks the support of elicitation.
    If elicititation is supported by the client MCP Server can send elicitation request.
    
    * fix
    
    * Add document for client capability based filtering
    
    * Add return statement into the new example
    ardaguclu authored Jul 23, 2025
    Configuration menu
    Copy the full SHA
    cc3f765 View commit details
    Browse the repository at this point in the history
  2. enhc(server): allow adding multiple resource templates at once (#483)

    * enhc(server): allow adding multiple resource templates at once
    
    Following the same pattern from tools, prompts and resources, this patch allows
    adding multiple resource templates at once.
    
    * Apply coderabbitai suggestion
    
    #483 (comment)
    
    * Increase test coverage
    
    Add a test case to cover the new function.
    
    #483 (comment)
    rafaeljusto authored Jul 23, 2025
    Configuration menu
    Copy the full SHA
    722d954 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2025

  1. Configuration menu
    Copy the full SHA
    38ac77c View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2025

  1. feat: implement protocol version negotiation (#502)

    * feat: implement protocol version negotiation
    
    Implement protocol version negotiation following the TypeScript SDK approach:
    - Update LATEST_PROTOCOL_VERSION to 2025-06-18
    - Add client-side validation of server protocol version
    - Return UnsupportedProtocolVersionError for incompatible versions
    - Add Mcp-Protocol-Version header support for HTTP transports
    - Implement SetProtocolVersion method on HTTP connections
    - Add comprehensive tests for protocol negotiation
    
    This ensures both client and server agree on a mutually supported protocol
    version, preventing compatibility issues.
    
    🤖 Generated with [opencode](https://opencode.ai)
    
    Co-Authored-By: opencode <noreply@opencode.ai>
    
    * fmt
    
    * refactor: improve protocol negotiation implementation
    
    - Move HTTP header constants to common location to avoid duplication
    - Add errors.Is interface to UnsupportedProtocolVersionError for better Go error handling
    - Add comprehensive edge case tests for empty and malformed protocol versions
    - Ensure consistent header constant usage across client and server packages
    
    🤖 Generated with [opencode](https://opencode.ai)
    
    Co-Authored-By: opencode <noreply@opencode.ai>
    
    * fmt
    
    * fix: include protocol version header in DELETE request for session termination
    
    As per MCP specification, the MCP-Protocol-Version header must be included
    on all subsequent requests to the MCP server, including DELETE requests
    for terminating sessions.
    
    🤖 Generated with [opencode](https://opencode.ai)
    
    Co-Authored-By: opencode <noreply@opencode.ai>
    
    * fix: maintain backward compatibility for protocol version negotiation
    
    When the server does not receive an MCP-Protocol-Version header,
    it should assume protocol version 2025-03-26 for backward compatibility
    as per the MCP specification.
    
    🤖 Generated with [opencode](https://opencode.ai)
    
    Co-Authored-By: opencode <noreply@opencode.ai>
    
    * test: update tests to reflect backward compatibility behavior
    
    Tests now expect protocol version 2025-03-26 when no protocol version
    is provided during initialization, as per MCP specification for
    backward compatibility.
    
    🤖 Generated with [opencode](https://opencode.ai)
    
    Co-Authored-By: opencode <noreply@opencode.ai>
    
    ---------
    
    Co-authored-by: opencode <noreply@opencode.ai>
    ezynda3 and opencode authored Jul 25, 2025
    Configuration menu
    Copy the full SHA
    3964d51 View commit details
    Browse the repository at this point in the history
Loading