user-info
Purpose
Get authenticated user information
Description
The user-info tool returns information about the currently authenticated user from the JWT token. It shows your user ID, email address, display name, and group memberships.
This tool is useful for:
- Verifying your authentication is working correctly
- Checking which user account you're authenticated as
- Viewing your group memberships and permissions
- Debugging authentication issues
The information comes directly from the JWT token claims, showing exactly what the server knows about your authenticated session.
Parameters
None - this tool requires no input parameters.
Example Usage
Ask Claude:
"What user am I authenticated as?"
"Show me my user information"
"What are my group memberships?"
"Am I logged in? Check my user info"2
3
4
Response
**Authenticated User Information**
User ID: user-123
Email: developer@example.com
Name: Jane Developer
Groups: admin, developers, users2
3
4
5
The response includes:
User ID (sub)
Your unique user identifier from the identity provider. This is the primary key used to identify your account.
Email
Your email address from the JWT token. May show "(not provided)" if the token doesn't include email claims.
Name
Your display name from the JWT token. May show "(not provided)" if the token doesn't include name claims.
Groups
List of groups or roles you belong to. This determines your permissions and access levels. Shows "(none)" if no groups are assigned.
Authentication
Required: Yes
This tool requires a valid JWT token. If you're not authenticated or if AUTH_REQUIRED=false in the server configuration, you'll receive an error message:
Error: User context not available. Authentication may be disabled or user data not present.JWT Token Claims
The user-info tool extracts the following standard claims from your JWT token:
| Claim | Description | Required |
|---|---|---|
sub | Subject (user ID) | Yes |
email | Email address | No |
name | Display name | No |
groups | Group memberships | No |
Additional custom claims in your JWT token are not displayed by this tool.
Common Use Cases
Authentication Verification
"Am I authenticated? Show my user info"
"Verify I'm logged in as the correct account"2
Permission Checking
"What groups am I in?"
"Do I have admin access? Check my groups"2
Debugging Auth Issues
"Why can't I access this? Show me my user information"
"Is my JWT token being read correctly?"2
Multi-user Environments
"Which account am I currently using?"
"Switch accounts and verify with user-info"2
Troubleshooting
"User context not available" Error
This error occurs when:
- No JWT token provided: You haven't authenticated yet
- Invalid token: Your JWT token is malformed or expired
- AUTH_REQUIRED=false: Authentication is disabled in server configuration
Solution: Ensure you've completed the OAuth flow and have a valid JWT token.
Missing Fields
If some fields show "(not provided)":
- Your identity provider may not include those claims
- The JWT token may have custom claim names
- Claims may not be mapped correctly in the OIDC configuration
Related Tools
- echo - Test authentication with a simpler tool
- healthcheck - Verify server is running
- system-status - Check overall system health
Related Prompts
- user-context prompt - Generate personalized messages based on your user data
Related Resources
- user://profile resource - Access your user profile data programmatically
Next Steps
- All Tools - Return to tools overview
- Authentication Flow - Learn how authentication works
- Getting Started - Set up authentication