Documentation
¶
Overview ¶
Command apiadapter is ap-api-adapter: a declarative HTTP→MCP adapter. It reads an API config from AP_SIDECAR_CONFIG, serves one MCP tool per configured operation over Streamable-HTTP, and executes each call against the upstream API with one injected credential.
It runs no user code: the config is data, never a script. See pkg/tools/apiadapter for the engine (config parsing, param binding, SSRF-guarded HTTP client) this binary wraps.
server.go turns one apiadapter.Config into an MCP tool surface: one tool per configured operation, its schema derived from the operation's own params, and a call routed straight through the engine (Task 1, pkg/tools/apiadapter) to the upstream API. This file never reads an environment variable — main.go owns the env contract and hands this Server an already-parsed Config and an already-resolved credential.