[codex] Add transport-neutral tool upstreams#1027
Merged
Merged
Conversation
Address OpenAPI review findings, complete the Observatory fixture and configuration docs, and update stale transport-neutral tool call examples. Validated with mcp_server format/compile/test checks, root format/test checks, and real-LLM MCP benchmark runs.
Document how to configure a coding agent to use PtcRunner MCP with an HTTPS OpenAPI upstream, including upstream config, credential binding, agent MCP wiring, and smoke-test forms. Validated with root and mcp_server format checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason
The MCP server had outgrown MCP-specific public naming: we now support multiple upstream transports, and the user-facing Lisp surface should describe the action being taken rather than the protocol underneath it. This PR makes the upstream call surface transport-neutral and adds a narrow OpenAPI v1 upstream adapter so HTTP API tools can be exposed through the same catalog/call path as MCP tools.
What Changed
mcp/serversandtool/mcp-callwith transport-neutraltool/serversandtool/callacross evaluator support, prompts, docs, tests, benches, and generated docs.transport: "openapi", including schema loading from file or URL, operation filters, operation overrides, auth bindings, timeouts, and response caps._ptc.inputSchemain catalog rendering.String.to_atom/1usage.?and reject array query values explicitly for v1.mcp_server/test/fixtures/openapi/.docs/examples/.transport: "openapi",schema_file,schema_url, filters, overrides, and auth.Impact
Users should now author upstream tool calls as
tool/callregardless of whether the backing upstream is MCP or OpenAPI. MCP upstream behavior remains available through the same internal adapter path, while OpenAPI tools can participate in the same catalog, prompt, and execution flows.This is intentionally a 0.x breaking rename: old public Lisp names were removed rather than shimmed.
Validation
Local checks on this branch:
mix format --check-formattedfrom repo root: passed.mix testfrom repo root:369 doctests, 3 properties, 5130 tests, 0 failures.mix format --check-formattedfrommcp_server/: passed.mix compile --warnings-as-errorsfrommcp_server/: passed.mix testfrommcp_server/:10 doctests, 1207 tests, 0 failures, 1 skipped.mcp_serverformat, compile, credo, scoped tests passed.mcp_serverfull tests + dialyzer passed;ptc_viewertests passed.Real-LLM benchmark runs were also executed with
.envcredentials. They do not appear related to this implementation, but are recorded here for review context:bench/lisp_eval_real_client_eval.exs:12/14passed. Failures were bothcontext_reducemodel/harness behavior.bench/lisp_session_real_client_eval.exs:3/4passed. Failure returned the expected final value but the harness marked the recovery case failed.bench/agentic_real_eval.exs:8/9passed. Failure was lazy catalog discovery choosing/, outside the test filesystem allowlist.bench/mcp_bench.exs --real-llm: passed after rerunning withPTC_RUNNER_MCP_RESPONSE_PROFILE=debug; the first run exposed an older benchmark assumption that MCP responses includestructuredContent.Benchmark reports are in local ignored
tmp/files and are not part of this PR.