MCP smoke test
Use this recipe after creating a disposable tenant API key.
Run the smoke
Code
The smoke validates:
- protected-resource metadata at the standards-shaped
.well-knownURL; - unauthenticated
WWW-Authenticatediscovery; - authenticated
GET /api/mcpreturning405 Method Not Allowed; - MCP SDK initialization;
tools/list;whoamireturning structured content;prepare_api_writefailing safely or returning a frozen preparation payload.
OAuth activation check
When a tenant should advertise OAuth, assert the configured authorization server:
Code
If authorization_servers is empty, the tenant is still in API-key preview mode.
That is acceptable for developer preview, but not for connector-directory
submission.
When HOLLYHR_MCP_EXPECT_OAUTH=1, the smoke also fetches:
Code
and verifies the issuer, JWKS URI, authorization endpoint, and token endpoint metadata expected by OAuth-capable MCP hosts.
For WorkOS/AuthKit-backed tenants, also verify DCR and resource routing:
Code
This smoke does not complete an interactive user login. It proves the WorkOS
authorization-server metadata, public-client DCR, PKCE S256 support, that the
default identity scopes are accepted, and that the configured MCP resource does
not return invalid_target. HollyHR data authorization is enforced after token
verification by loading the selected backing API-key actor profile and filtering
it to MCP-safe scopes.
For provider diagnostics if WorkOS later supports custom data scopes, operators
may set HOLLYHR_WORKOS_CONNECT_ALLOW_CUSTOM_SCOPES=1 and override
HOLLYHR_WORKOS_CONNECT_SCOPES. Do not use custom-scope mode as the normal
WorkOS setup path unless the authorization server advertises those scopes.
First prompts
After connecting a real MCP host, use read-only prompts first:
Code
Code
Do not test writes in a customer tenant. MCP write commit requires host form
elicitation, mcp:write, the underlying data write scope, and the tenant
write-mode gate.