Connect Claude Code
Add the Stensul MCP server to Claude Code from the terminal with one command, then sign in through your browser.
Before you start
- Claude Code installed.
- A Client ID from an Authorization Code API connection with PKCE on. Your Stensul admin creates it in step 1 of Connect Claude.
- Your instance name: the first part of your Stensul address (
northwindinnorthwind.stensul.com).
1. Add the server
Run this in a terminal, replacing both placeholders:
claude mcp add --transport http \
--client-id <client-id> \
--callback-port 3334 \
mcp-stensul \
https://mcp.stensul.com/<your-instance>/mcp
The fixed callback port (3334) stops a second sign-in from colliding with the first.
2. Sign in
Start Claude Code and run /mcp. Select mcp-stensul and choose to authenticate. A Stensul sign-in page opens in your browser. Log in and approve.
3. Draft an email
Use Stensul to list the libraries I can use, then create a draft product update
email in the most suitable one. Keep it under 120 words and show me a preview.
Claude Code shows each tool call before running it. You’re done when it prints an edit link that opens the draft in Stensul.
If something goes wrong
| What you see | Fix |
|---|---|
EADDRINUSE or two browser tabs open at sign-in |
Keep --callback-port 3334 so every launch uses the same port |
| Redirect URI mismatch | The connection’s redirect URI must be exactly https://mcp.stensul.com/<your-instance>/oauth/callback |
410 Gone |
You’re using the old shared /mcp endpoint with headers. Use your per-instance URL |
More in Errors and troubleshooting.