Expand description
HTTP backend primitives for config-driven OpenAPI MCP servers (Phase 90).
Gated behind the opt-in http feature so the curated / no-http toolkit
build stays light (RESEARCH Pitfall 4).
HTTP backend primitives for config-driven OpenAPI MCP servers.
This module is the backend seam the single-call synthesizer (Plan 03), the
code-mode executor (Plan 04), and the binary dispatch (Plan 06) build on. It
mirrors crate::sql in shape:
HttpConnector— the#[async_trait] Send + Sync + 'statictrait that executes a RESTOperationand returns JSON (analog ofSqlConnector).HttpConnectorError— the#[non_exhaustive]error enum whoseDisplayreaches MCP clients and therefore MUST NOT echo credentials or URLs (analog ofConnectorError, mirrors its Connection Security doc-comment).Operation/ [Parameter] / [ParameterLocation] — the request model the trait signature needs. AUTHORITATIVE in [schema] (theopenapiv3parser is their producer) and re-exported here so the trait signature and every later plan reference one stable type path (Plan 03 / OAPI-02).- [
join_url] — the ONE sharedbase_url+pathconcatenation helper. Both [client::HttpClient] (this plan) and Plan 04’sHttpCodeExecutorcall it instead of re-inlining the trim logic — it preserves an API-Gateway stage prefix (/v1) whereUrl::joinwould silently drop it (Pitfall 2).
The whole module is gated behind the opt-in http feature so the curated /
no-http toolkit build stays light (RESEARCH Pitfall 4).
Modules§
- auth
- Authentication providers for OUTGOING HTTP requests (OAPI-03 / D-05). Authentication providers for OUTGOING HTTP requests (OAPI-03 / D-05 / H1).
- client
- reqwest-backed
HttpConnectorimplementation (OAPI-01). reqwest-backedHttpConnectorimplementation (OAPI-01). - schema
- OpenAPI schema parsing seam — forward stub filled by Plan 03 (OAPI-02).
OpenAPI schema parser — the AUTHORITATIVE home of
Operation(OAPI-04).
Structs§
- Http
Client - reqwest-backed
HttpConnector. - Http
Config - HTTP client configuration (OWNED here in
http, mirroringsuper::AuthConfigownership so Plan 02 re-exports it rather than redefining). - Open
ApiSchema - A parsed OpenAPI document with its
Operationvalues indexed by(path, METHOD)(OAPI-04 / D-03). - Operation
- An extracted REST operation backed by an OpenAPI definition.
- Parameter
- A single OpenAPI operation parameter.
Enums§
- Auth
Config - Outgoing-HTTP authentication configuration (OAPI-03 / D-05).
- Http
Connector Error - Errors an
HttpConnectorimplementation may surface. - Parameter
Location - Where an
Operationparameter is carried in the outgoing request.
Traits§
- Http
Auth Provider - Outbound HTTP authentication provider (OAPI-03).
- Http
Connector - Backend-agnostic HTTP connector trait (OAPI-01).
Functions§
- create_
auth_ provider - create_
passthrough_ auth_ provider - Build an auth provider, capturing an
incoming_tokenfor theAuthConfig::OAuthPassthroughper-request path (H1).