ExMcp.Test.Support.Transports.Stdio (ex_mcp v0.10.0)

View Source

Stdio transport test helper with SecurityGuard integration.

Provides test stdio processes that integrate with SecurityGuard middleware for testing security policies across stdio transport.

Summary

Functions

Returns a specification to start this module under a supervisor.

Sends a request through the stdio test process with security validation.

Starts a test stdio process with SecurityGuard middleware.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

request(pid, command)

Sends a request through the stdio test process with security validation.

Parameters

Returns

  • {:ok, response, received_command} - Success with response and command after security processing
  • {:error, reason} - Security violation or other error

start_test_process(opts \\ [])

Starts a test stdio process with SecurityGuard middleware.

Options

  • :security_guard - SecurityGuard module to use for validation

Returns

{:ok, pid} where pid can be used with request/2