MCP server
Send notes from an AI agent through the Model Context Protocol.
The Stylograph MCP server lets an AI agent look up recipients, preview a note, send it and follow it, with the same checks and charges as the REST API.
| Setting | Value |
|---|---|
| Server URL | https://composer.stylograph.ai/api/mcp |
| Transport | Streamable HTTP, not SSE. The server keeps no session and answers each POST with JSON. |
| Sign-in | An API key in the request header Authorization: Bearer sg_live_... |
| OAuth | Not yet. Choose "no sign-in" or header auth in your client. |
Opening the URL in a browser shows "Method not allowed". That's expected, because the server only answers POST.
1. Make a key for the agent
- Sign in to the Note Composer, open Settings and scroll to API keys. Making a key needs a sign-in from the last 30 minutes, so sign out and back in if it asks.
- Name the key after the agent.
- Give it
account:read,notes:readandnotes:send: Read account, Read notes and Send notes. Leave Add and edit recipients (recipients:write) off, so the agent can mail only people already in your address book and can't change it. - Set a low number of notes the key may send a day, such as 5. It can't be changed later. To raise it, revoke the key and make a new one.
- Make the key and copy it right away. It's shown once.
Give the key to the agent through a secret store or an environment variable. Keep it out of chat, source control, tickets and shared docs. If it leaks, revoke it in Settings and it stops working at once.
An agent that should also add people to the address book needs a separate key with recipients:write, made by a member whose role can change recipients. See Recipients.
2. Connect your client
claude.ai
- Open Customize, then Connectors, then Add custom connector.
- URL:
https://composer.stylograph.ai/api/mcp. - Authentication: No sign-in. Ignore a "Detected: OAuth sign-in" label.
- Request headers: name
authorization, valueBearerfollowed by the key, with the space.
A header can't be edited after it is saved. To fix one, remove the connector and add it again. The Request headers setting is in beta in claude.ai, and not every organization has it yet.
Claude Code
export STYLOGRAPH_API_KEY="sg_live_..."
claude mcp add --transport http stylograph https://composer.stylograph.ai/api/mcp \
--header "Authorization: Bearer $STYLOGRAPH_API_KEY"Any other MCP client
Point it at the server URL, set the transport to Streamable HTTP, and add the Authorization header with Bearer in front of the key. A client that tries SSE when no transport is set fails to connect, so set it.
Without a key, the server still lists its tools, but every tool call is refused with a message that says to send the key. Every request counts toward the organization's 60 requests a minute.
Tools
| Tool | What it does | Scope |
|---|---|---|
get_account | Credits, whether the handwriting and return address are ready, notes left today, each format with its price and limit, the key's own cap | account:read |
search_recipients | Finds people in the address book by name or company | notes:send |
list_covers | The cover art a note can carry, and your own uploaded covers | any key |
list_card_backs | The card backs and which is the default | notes:send |
list_writers | The writers on the key's team whose handwriting is ready | notes:send |
list_letter_designs | The stationery a letter can be written on. Empty unless letters are on for the account | notes:send |
list_templates | The team's saved message templates | notes:send |
preview_note | Runs every check a send runs and answers what the note would be and cost, without sending or charging | notes:send |
send_note | Mails the note and charges its credits | notes:send |
list_notes | Recent notes, newest first, with their status | notes:read |
get_note | One note with its history and delivery estimate | notes:read |
cancel_note | Cancels a queued note until the printer starts on it, and gives the credits back | notes:send |
delete_note_content | Deletes a mailed note's message, names and address for good | notes:send |
add_recipient | Adds one person to the address book without mailing them | recipients:write |
update_recipient | Changes the fields given on one person | recipients:write |
import_recipients | Adds up to 500 people in one step, with a dry run first | recipients:write |
Each tool calls the same code as its REST route, so a note sent through MCP is the same as one sent with POST /api/v1/notes. The recipient tools also need a role that can change recipients.
How an agent should send
- Call
get_accountfirst. It tells the agent why a send would be refused before it tries. - Find the person with
search_recipients. When more than one person matches, ask which one. - Run
preview_note. Show the person the recipient, the message, any QR code and the cost, and send only once they approve it. - Call
send_notewith the same arguments. When the person came from a CRM, passcrm_contact, so the team mails them at most one note a day. - Follow the note with
get_noteorlist_notes.
send_notemakes its own idempotency key from the note when the agent sends none, so a retry the same day returns the first note and charges nothing.- A second copy of the same message to the same recipient within 24 hours is refused unless the agent sends
allow_duplicate: true. Only do that when the person asks for it. - Before adding, changing or importing recipients, show the person what will change. Run
import_recipientswithdry_runfirst. - Use
delete_note_contentonly when the person asks. Nothing brings the content back.
When it doesn't work
| What you see | What to do |
|---|---|
Every call fails with INVALID_API_KEY | The header is missing Bearer or the key was cut off. Enter it again. |
Tool calls answer UNAUTHENTICATED | No Authorization header reached the server. Check the client saved it. |
INSUFFICIENT_SCOPE | The key lacks a scope. details.required_scope names it. Make a new key with it. |
TEAM_ROLE_REQUIRED | The key's member doesn't have a role that allows the call. Ask an Org Admin. |
| The agent can't find a person | They aren't in the team's address book. Add them in the Note Composer, or with a key that can add recipients. |
| The connection fails at once | The client is using SSE. Switch it to Streamable HTTP. |
| A new tool or option doesn't show | The client cached an old tool list. Reconnect, or start a new session. |
Reading the docs
Give an agent /llms.txt or /llms-full.txt to read these docs, and the OpenAPI document for every route.