ExMcp.Test.Support.Transports.Http (ex_mcp v0.10.0)
View SourceHTTP transport test helper with SecurityGuard integration.
Provides test HTTP endpoints that integrate with SecurityGuard middleware for testing security policies across HTTP transport.
Summary
Functions
Returns a specification to start this module under a supervisor.
Sends a request through the HTTP test endpoint with security validation.
Starts a test HTTP endpoint with SecurityGuard middleware.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Sends a request through the HTTP test endpoint with security validation.
Parameters
endpoint- Endpoint returned fromstart_test_endpoint/1command- JSON-RPC command to sendheaders- HTTP headers including authorization
Returns
{:ok, response, received_command}- Success with response and command after security processing{:error, reason}- Security violation or other error
Starts a test HTTP endpoint with SecurityGuard middleware.
Options
:security_guard- SecurityGuard module to use for validation:port- Port to bind to (defaults to random available port)
Returns
{:ok, endpoint} where endpoint can be used with request/3