inspector icon indicating copy to clipboard operation
inspector copied to clipboard

docs: add a config reference for the composable test server

Open cliffhall opened this issue 3 weeks ago • 2 comments

Problem

docs/test-servers.md explains how to build and run a composable test server and lists every showcase config, but it has no reference for the config file format itself. The schema exists only in source:

  • test-servers/src/load-config.ts: ConfigFileOAuth, PresetRef and the other JSON file types, plus validation
  • test-servers/src/composable-test-server.ts: ServerConfig, where the oauth options are documented in JSDoc
  • test-servers/src/preset-registry.ts: the preset names you can use

People outside the Inspector team are starting to ask whether they can use these servers to test their own SDKs (for example, a Swift SDK maintainer testing OAuth 2.1 and enterprise-managed auth). Right now they would have to read TypeScript to write a config of their own.

Proposal

Add a Config reference section to docs/test-servers.md covering:

  • The top-level keys (serverInfo, tools / resources / prompts, transport including modern, and so on)
  • The oauth block field by field: mode (combined vs protected-resource), discovery overrides (resourceMetadataPath, asMetadataPath, issuerUrl), token validation (authorizationServers, accessTokenIssuers, jwksUri, resourceAudience), client registration (supportDCR, supportCIMD, staticClients, clientMetadata), supportRefreshTokens, revocation, stallEndpoints / stallMs, and per-preset requiredScopes
  • The available presets and their params
  • A minimal annotated example for each OAuth mode

Link to the source types as the authoritative definitions, so that the doc can't silently replace them as the source of truth.

cliffhall avatar Nov 12 '26 19:11 cliffhall

Could the config reference link test-servers/configs/demo.json as a minimal stdio example? The setup table explains that the default stdio fixture uses a fixed configuration. One extra sentence could show that server-composable.js --config test-servers/configs/demo.json also works over stdio, and lets the reader choose the tools.

Codex tested this locally with the 2.15.0 fixture. The shipped file offered echo and get_temp. Removing the get_temp preset from a copy left only echo. Both returned Echo: invoice 42 for the same input. Listing the tools before and after gives the reader a quick way to verify that their config loaded.

KilianTheMagnificent avatar Nov 18 '26 14:11 KilianTheMagnificent

Shipped in #3016 (merged to v2/main).

cliffhall avatar Nov 18 '26 19:11 cliffhall