Skip to main content

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​

  1. Open your application's Setup tab in the dashboard.
  2. Under Wire the AuthSec SDK, pick your language and click Coding agent - fastest.
  3. Copy the prompt.
  4. 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​

  1. Installs the SDK — pip install authsec-sdk / go get / npm install @authsec/sdk
  2. Wraps your MCP handler — mount_mcp / MountMCP / mountMCP. No hand-rolled metadata endpoints or challenge logic.
  3. Reads config from env vars — the AUTHSEC_* names from Environment setup
  4. Keeps upstream credentials separate — your GitHub PAT / API key stays server-side; AuthSec tokens are never forwarded upstream
  5. Verifies the integration — unauthenticated requests get a Bearer challenge, tools/list hides unauthorized tools, tools/call returns insufficient_scope for 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​

Next step​

Environment setup -->