Make your AI a shadcn expert

whoami

Self-inspection for the authenticated caller — email, Pro status, rate-limit remaining, and server time. Useful for debugging and quota checks.

whoami is the agent's self-awareness tool. It doesn't touch the registry — it just reflects the request context back to the caller. Zero DB reads, zero registry reads, single Redis roundtrip for the rate-limit snapshot.

When to use it

  • The user asks "am I logged in?" / "am I on Pro?"
  • Debugging a failed shadcn add — confirm the token actually resolves to a Pro account.
  • Before a burst of tool calls, check rateLimit.remaining and pace accordingly.
  • Support flows — match the caller's email against a ticket.

Arguments

None.

Example prompts

use shadcnio whoami to confirm I'm on Pro
use shadcnio whoami and tell me how many MCP calls I have left this minute
use shadcnio whoami — I'm debugging a failed install

Response shape

{
"email": "[email protected]",
"userId": "bIBcojrECyUGeDHHo5akXnzlBwTgFOyG",
"isPro": true,
"rateLimit": {
  "remaining": 587,
  "resetAt": "2026-04-16T14:32:18.412Z"
},
"serverTime": "2026-04-16T14:31:18.412Z"
}

If the rate limiter is unavailable (Redis outage), rateLimit comes back as null — the tool still succeeds.

Manual invocation

curl -s -X POST "https://www.shadcn.io/api/mcp?token=YOUR_TOKEN" \
-H "content-type: application/json" \
-H "accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"whoami","arguments":{}}}' \
| sed -n 's/^data: //p' | jq '.result.content[0].text | fromjson'

FAQ

Was this page helpful?

Sign in to leave feedback.