Connect to Litmus over MCP
How to let your users connect their Litmus account to your product, and call Litmus's tools on their behalf over the Model Context Protocol.
Consent and permissions
Each tool needs one permission. Identifying the connection is granted on connect. Every other permission is one question on the Litmus consent screen while connecting, which the user answers Allow or Don't allow.
Identifying the connection is implied by connecting, so whoami is never shown as a choice.
Shown on the consent screen with Allow and Don't allow. Needed by create_order_request, get_order_request, update_order_request, and submit_order_request.
A user who chooses Don't allow still connects, and whoami still works. tools/list lists every tool whether or not the user granted its permission. Calling one they didn't grant returns a tool error whose text is this JSON:
JSON — permission-denied errorShow codeHide code
{
"error": "permission_denied",
"missing_permission": "order_requests",
"message": "This Litmus connection has not been granted the 'order_requests' permission. The user must reconnect Litmus and choose Allow on the consent screen before this tool can be called.",
"authorization_url": null
}Match on error and missing_permission, not the message. To fix it, send the user back through the connect action (step A) and have them choose Allow on the consent screen. It is added to their existing connection the first time you call with the new access token. authorization_url is where to send the user to grant the missing permission. It is currently null; when it is present, send the user there instead.