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.24.1
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.25.0
Choose a head ref
  • 9 commits
  • 12 files changed
  • 9 contributors

Commits on Apr 30, 2025

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

Commits on May 1, 2025

  1. Add Accept header (#230)

    set Accept header to application/json, text/event-stream
    hhxiao authored May 1, 2025
    Configuration menu
    Copy the full SHA
    ffc63d9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f0a648b View commit details
    Browse the repository at this point in the history
  3. fix: handle nil rawMessage in response parsing functions (#218)

    Added checks for nil rawMessage in ParseGetPromptResult, ParseCallToolResult, and ParseReadResourceResult to prevent panics when the tool call response contains an empty result.
    cocovs authored May 1, 2025
    Configuration menu
    Copy the full SHA
    ddb59dd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    df5f67e View commit details
    Browse the repository at this point in the history
  5. feat(SSEServer): add WithAppendQueryToMessageEndpoint() (#136)

    configures the SSE server to append the original request's RawQuery to message endpoint
    liut authored May 1, 2025
    Configuration menu
    Copy the full SHA
    d352118 View commit details
    Browse the repository at this point in the history
  6. feat: quick return tool-call request, send response via SSE in gorout…

    …ine (#163)
    
    * feat: quick return tool-call request, send response via SSE in goroutine
    
    * update: comment
    
    * feat: handle JSON marshal errors and add logging when queue is full
    
    * feat: send a generic error response if marshal response has error
    CeerDecy authored May 1, 2025
    Configuration menu
    Copy the full SHA
    cfeb0ee View commit details
    Browse the repository at this point in the history
  7. feat(server/sse): Add support for dynamic base paths (#214)

    * feat!(server/sse): Add support for dynamic base paths
    
    This change introduces the ability to mount SSE endpoints at dynamic
    paths with variable segments (e.g., `/api/{tenant}/sse`) by adding a new
    `WithDynamicBasePath` option and related functionality. This enables
    advanced use cases such as multi-tenant architectures or integration
    with routers that support path parameters.
    
    Key Features:
    
    * DynamicBasePathFunc: New function type and option
      (WithDynamicBasePath) to generate the SSE server's base path
      dynamically per request/session.
    * Flexible Routing: New SSEHandler() and MessageHandler() methods allow
      mounting handlers at arbitrary or dynamic paths using any router
      (e.g., net/http, chi, gorilla/mux).
    * Endpoint Generation: GetMessageEndpointForClient now supports both
      static and dynamic path modes, and correctly generates full URLs when
      configured.
    * Example: Added examples/dynamic_path/main.go demonstrating dynamic
      path mounting and usage.
    
    ```go
    mcpServer := mcp.NewMCPServer("dynamic-path-example", "1.0.0")
    sseServer := mcp.NewSSEServer(
      mcpServer,
      mcp.WithDynamicBasePath(func(r *http.Request, sessionID string) string {
        tenant := r.PathValue("tenant")
        return "/api/" + tenant
      }),
      mcp.WithBaseURL("http://localhost:8080"),
    )
    
    mux := http.NewServeMux()
    mux.Handle("/api/{tenant}/sse", sseServer.SSEHandler())
    mux.Handle("/api/{tenant}/message", sseServer.MessageHandler())
    ```
    
    * refactor(server): standardize URL path handling with normalizeURLPath
    
    Replace manual path manipulation with a dedicated normalizeURLPath function
    that properly handles path joining while ensuring consistent formatting.
    The function:
    
    - Always starts paths with a leading slash
    - Never ends paths with a trailing slash (except for root path "/")
    - Uses path.Join internally for proper path normalization
    - Handles edge cases like empty segments, double slashes, and parent references
    
    This eliminates duplicated code and creates a more consistent approach to
    URL path handling throughout the SSE server implementation. Comprehensive
    tests were added to validate the function's behavior.
    rwjblue-glean authored May 1, 2025
    Configuration menu
    Copy the full SHA
    4a1010e View commit details
    Browse the repository at this point in the history
  8. Format

    ezynda3 committed May 1, 2025
    Configuration menu
    Copy the full SHA
    eadd702 View commit details
    Browse the repository at this point in the history
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy