Create New MCP Server
Define your custom Model Context Protocol server for Commands.com
1
 
 2
 
 3
 
 4
 
 5
 
 6
 JWT Verification Guide
When using OAuth 2.0, your server will receive JWT tokens containing user identity information. Here's how to verify them:
JWKS Endpoint
https://commands.com/.well-known/jwks.json
 
 Token Verification (Node.js Example)
const jwt = require('jsonwebtoken');
const jwksClient = require('jwks-rsa');
const client = jwksClient({
 jwksUri: 'https://commands.com/.well-known/jwks.json'
});
function getKey(header, callback) {
 client.getSigningKey(header.kid, (err, key) => {
 const signingKey = key.publicKey || key.rsaPublicKey;
 callback(null, signingKey);
 });
}
// Verify token
jwt.verify(token, getKey, {
 audience: 'commands.com',
 issuer: 'https://commands.com',
 algorithms: ['RS256']
}, (err, decoded) => {
 if (err) {
 // Invalid token
 return res.status(401).json({ error: 'Invalid token' });
 }
 
 // Token is valid, use decoded.sub for user ID
 const userId = decoded.sub;
 // ... your server logic
});
 
 Token Payload
The JWT will contain:
sub: User IDemail: User emailaud: commands.comiss: https://commands.comexp: Expiration timestamp