Coding-agent prompt
The fastest integration path: paste a prompt into Claude Code or Cursor and the agent installs the SDK, adds the wrapper, and wires the env vars.
How to use it
- Open your application's Setup tab in the dashboard.
- Under Wire the AuthSec SDK, pick your language and click Coding agent - fastest.
- Copy the prompt.
- Paste it into Claude Code or Cursor with your MCP server repo open.
The dashboard prompt has every value pre-filled — resource server ID, issuer, JWKS URL, scopes, introspection credentials. The agent uses these to generate production-grade integration code, not pseudocode.
What the agent does
- Installs the SDK —
pip install authsec-sdk/go get/npm install @authsec/sdk - Wraps your MCP handler —
mount_mcp/MountMCP/mountMCP. No hand-rolled metadata endpoints or challenge logic. - Reads config from env vars — the
AUTHSEC_*names from Environment setup - Keeps upstream credentials separate — your GitHub PAT / API key stays server-side; AuthSec tokens are never forwarded upstream
- Verifies the integration — unauthenticated requests get a Bearer
challenge,
tools/listhides unauthorized tools,tools/callreturnsinsufficient_scopefor blocked tools
After the agent finishes
Run the two terminal checks from Set up the environment and SDK:
curl https://your-server/.well-known/oauth-protected-resource/mcp
curl -i -X POST https://your-server/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
Then run the dashboard's Run protection check — see Run the protection test.
See also
- Environment setup — the
AUTHSEC_*env vars the wrapper reads - Python SDK · Go SDK · TypeScript SDK — full per-language reference