Skip to content

refactor: switch mcp http to framework-agnostic McpHttpError #144

Merged
hashemix merged 3 commits into
mainfrom
refactor/switch-mcp-http-to-mcp-http-error
May 24, 2026
Merged

refactor: switch mcp http to framework-agnostic McpHttpError #144
hashemix merged 3 commits into
mainfrom
refactor/switch-mcp-http-to-mcp-http-error

Conversation

@hashemix
Copy link
Copy Markdown
Member

📌 Summary

Switches the entire mcp_http/ layer (handler, middleware, utilities, types) from TransportServerError/TransportServerResult to the framework-agnostic McpHttpError/McpHttpResult types introduced in the prior PR.
This cuts all imports from hyper_servers/ and mcp_server::error out of the HTTP handler layer.

✨ Changes Made

  • mcp_http/types.rs: GenericBody error type changed to McpHttpError; BoxFutureResponse and RequestHandler type aliases switched to McpHttpResult
  • mcp_http/http_utils.rs: All TransportServerError/TransportServerResult → McpHttpError/McpHttpResult; dropped hyper_servers::error import
  • mcp_http/mcp_http_handler.rs: All method return types and internal error construction switched to McpHttpError/McpHttpResult
  • mcp_http/middleware.rs + 4 sub-modules: Middleware trait + all implementations switched
  • auth/auth_provider.rs: AuthProvider trait return type switched to McpHttpError (cascaded from GenericBody change)
  • auth/auth_provider/remote_auth_provider.rs: Internal methods and body construction switched
  • rust-mcp-extra/src/auth_provider/{keycloak,scalekit,work_os}.rs: All three AuthProvider implementors updated to use McpHttpError/McpHttpResult

🛠️ Testing Steps

cargo make check

@hashemix hashemix changed the title Refactor/switch mcp http to mcp http error refactor: switch mcp http to mcp http error May 23, 2026
@hashemix hashemix changed the title refactor: switch mcp http to mcp http error refactor: switch mcp http to framework-agnostic McpHttpError May 23, 2026
@hashemix hashemix merged commit e0c44c0 into main May 24, 2026
3 checks passed
@hashemix hashemix mentioned this pull request May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant