Ragex.MCP.Server (Ragex v0.20.0)

View Source

MCP Server implementation that communicates via stdio.

Reads JSON-RPC messages from stdin, processes them, and writes responses to stdout.

Summary

Functions

Returns a specification to start this module under a supervisor.

Send a notification to the client.

Stream a partial content chunk to the client during a long-running tool call.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

send_notification(method, params \\ nil)

Send a notification to the client.

Notifications are one-way messages with no response expected.

send_progress(request_id, partial, done \\ false)

@spec send_progress(term(), String.t(), boolean()) :: :ok

Stream a partial content chunk to the client during a long-running tool call.

Emits a notifications/progress message carrying the partial text so clients can display incremental output before the final tools/call response arrives.

  • request_id — the JSON-RPC id of the originating tools/call request
  • partial — the new chunk of text to append to any previous output
  • done — set to true on the final chunk (default false)

start_link(opts \\ [])