Guide

MCP server for support tickets: Claude Code and Cursor

The LastWorker MCP server gives an AI agent twelve tools to read support tickets and phone calls, post replies on email, web chat and SMS, and follow up a call by email or text. Creating a key is free.

JH
Jerry Holt
November 4, 2026 · 12 min read

The short version

  • →The LastWorker MCP server runs at https://lastworker.com/api/mcp and works with Claude Code, Claude Desktop, Cursor or your own agent.
  • →Twelve tools read email, web chat and SMS threads, phone calls and attachments, post replies, and follow up a finished call by email or text.
  • →New channels start on manual, so post_reply saves a draft until you turn on Always send or set the channel to auto.
  • →Reading threads, saving drafts and sending on email and web chat are free. An SMS send is $0.03 per segment.

Connect Claude Code, Claude Desktop, Cursor or your own agent to the LastWorker Model Context Protocol (MCP) server, and it can read and answer your support tickets. You create a key in the dashboard, add the server to your tool, and the agent can work your email, web chat and SMS threads and your phone calls through twelve tools.

What is the LastWorker MCP server?

Model Context Protocol is an open standard that lets an AI client call tools on another server. The LastWorker server runs at https://lastworker.com/api/mcp over streamable HTTP. Every tool call carries a bearer key as a header:

Authorization: Bearer lw_live_...

You create keys at /dashboard/mcp. A key is shown once, and the server stores only its SHA-256 hash. Each key can make 60 requests a minute. One key per tool or machine makes each one easy to revoke later.

The agent runs in your tool on your own model account. LastWorker holds the threads, contacts and tickets, and the MCP server is how the agent reads and answers them. The tools call the same code as the REST routes under /api/v1, and the same key works on both. The agent API reference covers the routes, response shapes and error codes.

What tools does the MCP server expose?

The server exposes twelve tools. Six work the inbox.

  • get_account returns your agents, each channel's AI mode (auto, review or manual) and the account's reply setting.
  • list_conversations returns every email, web chat and SMS thread, newest first, including threads the built-in AI already answered.
  • list_conversations_needing_reply returns the threads waiting on a person: the newest message is from the customer, no draft is pending and the ticket is still open.
  • get_conversation returns one thread with every message in time order, plus the contact and the ticket. Each message lists its attachments with a filename, content type, size and download URL.
  • get_attachment reads one attachment by its URL. Text files up to 256 KB come back as text and images up to 5 MB come back as images. Larger or other files come back as the download URL.
  • post_reply posts a plain text reply of up to 20,000 characters to a thread. The result says sent or drafted.

Both list tools accept an agent id, an inbox tab and a limit of up to 100 per call. They return a next_before cursor for the next page, and they leave out spam and notification mail unless you ask for those tabs by name. A since time keeps the threads whose newest message is at or after it. Each item carries the ticket status, the contact, the last customer message, and the needs_reply and has_pending_draft flags.

Six more cover phone calls, new messages, ticket status and opt-outs.

  • list_calls returns phone calls, newest first, with the caller's number, start and end time, length, summary, ticket status, transfer result and whether a voicemail was left. It filters by ticket status, by finished or still going, and by calls that ended since a time.
  • get_call returns one call with its transcript, whether an email or a text can reach the caller, and the caller's other threads.
  • send_call_follow_up emails or texts the caller from a finished call. It opens a new thread linked to the call and resolves the call's ticket.
  • send_message starts a new email or SMS thread with any address or number.
  • set_ticket_status sets a thread or a call to resolved, in_progress or escalated.
  • opt_out_contact records that a contact asked not to be texted or not to be emailed.

How do I connect the MCP server?

Create a free account, make a key at /dashboard/mcp, then add the server to your client. The dashboard page fills your new key into its setup snippets.

In Claude Code, run this once in a terminal:

claude mcp add --transport http lastworker https://lastworker.com/api/mcp \
  --header "Authorization: Bearer lw_live_..."

In Cursor, add this to .cursor/mcp.json:

{
  "mcpServers": {
    "lastworker": {
      "url": "https://lastworker.com/api/mcp",
      "headers": {
        "Authorization": "Bearer lw_live_..."
      }
    }
  }
}

In Claude Desktop, add a custom connector under Customize > Connectors. Enter the URL, choose No sign-in, and add the key under Request headers:

URL:           https://lastworker.com/api/mcp
Header name:   authorization
Header value:  Bearer lw_live_...

On Team and Enterprise plans an Owner adds the connector. Free Claude accounts are limited to one custom connector.

Your own agent can connect with any MCP client library that supports streamable HTTP and a custom header, using the same URL and header.

The server answers initialize and tools/list without a key, so a client can show the tools before the header is right. Tool calls need a valid key. They return a message asking for one when the key is missing or wrong, or when it is over the rate limit.

How does an agent solve a ticket?

A run has five steps.

  1. Read the queue. list_conversations_needing_reply returns the threads waiting on a person. Pass the tab attention to narrow it to the inbox's Needs Attention list. Call get_account as well if the agent needs to know whether a reply will send or draft.
  2. Read the whole thread. get_conversation returns every message in order, including system notes, tool calls and any pending draft. Earlier messages often hold the order number or the amount that explains the latest one. If a message has attachments, read them with get_attachment, so a spreadsheet or a screenshot the customer sent is part of what the agent works from.
  3. Look the customer up in your own systems. The thread gives the agent the contact's name, email and phone. Your billing provider, database and logs are reached through the agent's other tools, such as another MCP server, a command line tool or a SQL client. LastWorker does not need access to those systems.
  4. Write the reply. State what was checked, what was found and what the customer can do next. Replies are plain text.
  5. Post it. Call post_reply with the thread id, the text and, if you want a person to review it, mode: "draft".

Posting changes the ticket status. A draft moves the ticket to awaiting_review, and an escalated ticket stays escalated. A send moves the ticket to awaiting_customer, including one that was escalated or resolved. A new draft on a thread replaces the earlier pending one, so an agent can run again without stacking drafts.

set_ticket_status closes a ticket. A person can also resolve it in the inbox, or auto-resolve does: a ticket in awaiting_customer whose last message is yours is resolved once that message is older than the account's window, 48 hours by default. Auto-resolve is on by default and set per account.

How does an agent follow up a phone call?

A finished call has no line left to reply on, so a follow-up goes out by email or text and opens a new thread. This is the same action as Send a follow-up on an ended call in the inbox.

  1. Find the calls. list_calls with ended: true returns finished calls. Pass status to keep one ticket status, such as missed or escalated, and since to get only the calls that ended after your last run.
  2. Read the call. get_call returns the transcript and follow_up_options, which says whether an email or a text can be sent and to which address or number. follow_ups lists the threads already opened from the call.
  3. Send it. send_call_follow_up takes the call id, via set to email or sms, and the text. A text goes to the caller's number. An email goes to the address on the contact unless you pass another one. The result has the new conversation id, the message id and the provider's message id.

After a send, the call carries a note that points to the new thread and the call's ticket is resolved. The customer's answer arrives in the new thread like any other email or text, and post_reply works there.

send_call_follow_up and send_message send at once and have no draft form. They send where post_reply would send: the account is on Always send, or the email or SMS channel is on auto. In every other case nothing is sent and the error says which setting stopped it.

Both tools take an idempotency_key. A retry with the same key returns the first result with replayed: true and sends nothing again. The same key with a different message is refused. A call that needs no follow-up is closed with set_ticket_status.

Each sent message carries a delivery status. The send result says the provider accepted the message. For a text, delivery then moves to sent and ends as delivered, failed or unconfirmed once the carrier reports back, with the carrier's error on a failure. Read it with get_conversation on the new thread.

Each contact carries opted_out for texts and for email. A contact who texts STOP is opted out of texts at once, a person can set Do not text or Do not email on the contact in the dashboard, and an agent can record an opt-out with opt_out_contact. A follow-up or a new message to a contact who opted out of that channel is refused. A reply on a thread the contact wrote on still goes out.

What decides whether a reply sends or waits as a draft?

post_reply checks these rules in order, and the first match wins.

OrderConditionResult
1The call sets mode: "draft"Saved as a draft
2The account setting is Always save as draftSaved as a draft
3The account setting is Always sendSent to the customer
4The thread's channel is on autoSent to the customer
4The thread's channel is on review or manualSaved as a draft

A call with mode: "send" still drafts under rule 2 and on review or manual under rule 4. Leaving mode out behaves the same as mode: "send". The account setting is at /dashboard/mcp and applies to every key on the account. The default is to follow each channel's AI mode, which is rule 4.

Always send does not change any channel's AI mode. A channel on manual keeps the built-in AI off while your agent sends on it.

New channels start on manual, so replies draft until you turn on Always send or set the channel to auto. Channels created before AI modes existed have no saved mode and count as auto, or as review if they required approval. A thread with no active channel of its type also counts as auto. get_account shows the mode for each active channel.

A send goes out on the thread's own channel. An email thread gets an email. A web chat reply goes to the open widget, then to email if the visitor is offline and has an address, and otherwise waits in the thread until they return. An SMS thread gets a text from the agent's SMS number. The result's method field says which path it took: relay, email, stored or sms.

A person sends drafts from the inbox on email, web chat and SMS threads. A send that fails returns an error with the reason, and the reference lists the error codes.

What does the MCP server cost?

ActionCost
Create a key and connectFree
Read threads, calls, contacts and ticketsFree
Save a draftFree
Send on email or web chat, through post_reply or from the inboxFree
Send an email through send_call_follow_up or send_messageFree
Send a text through post_reply, send_call_follow_up or send_message$0.03 per segment

A new account with a $0 balance can do everything in this table except send SMS. Replies posted through post_reply do not carry the $0.04 AI reply charge, since your agent wrote the text and LastWorker's AI did not run. Your agent's model usage is billed by whoever provides the model.

An SMS send draws on your prepaid balance. An ASCII message of up to 160 characters is one segment. A longer one is split at 153 characters per segment. Any non-ASCII character changes those numbers to 70 and 67. The charge is taken after the carrier accepts the message. If the balance is short, the call returns an error with the amount (402 on REST). That check reads the current balance and does not trigger auto-reload. SMS also needs an active SMS registration, which is a separate $20 a month, and the call returns an error until it is active (409 on REST).

The channel's AI mode has its own cost. A channel on auto or review also runs LastWorker's built-in AI on inbound messages, at $0.04 per generated reply. An AI reply sent by SMS also costs $0.03 per segment. A channel on manual runs no AI on inbound messages. To have your agent answer on its own with no AI charges from inbound messages, leave the channel on manual and turn on Always send.

What is the support inbox skill?

The support inbox skill is a Claude Code skill that runs the steps on this page as one command. It pulls the queue and a seven day sweep of every thread, reads each thread, looks the customer up in your own systems, writes a reply and posts a draft. It finishes with a report table, one row per thread.

Sections 2 and 3 of the file are fill-in blocks for your own lookups and the checks for each kind of issue. The rest works as is.

To install it, add the MCP server to Claude Code, then save the file in the repo you run Claude Code from:

mkdir -p .claude/skills/support-inbox
curl -o .claude/skills/support-inbox/SKILL.md https://lastworker.com/skills/support-inbox/SKILL.md

To have it in every repo, save it at ~/.claude/skills/support-inbox/SKILL.md instead. Run it with /support-inbox.

The skill posts with mode: "draft", and a person reads each draft and sends it from the inbox.

What does the MCP server cover?

The MCP server covers email, web chat and SMS threads and phone calls. A call is read with list_calls and get_call and followed up in a new email or SMS thread. post_reply returns an error on a phone thread, since a call has no text reply to post.

Replies, follow-ups and new messages are plain text, and none of them takes attachments. get_conversation lists the attachments on each message, and get_attachment reads them. An agent cannot set Cc, and email replies copy whoever the customer copied on their last message.

Frequently asked questions

Can an agent send a reply without a person reviewing it?

Yes. Turn on the Always send setting at /dashboard/mcp and post_reply sends on every channel, including one set to manual. With the default setting, it sends only on a channel set to auto and saves a draft on review or manual. A call with mode draft always saves a draft.

Does the MCP server work on the free plan?

Yes. Any account with a confirmed email can create a key, with no plan check and no minimum balance. A $0 balance covers everything except SMS. An SMS send costs $0.03 per segment from your prepaid balance and needs an active SMS registration at $20 a month.

Do replies posted over MCP cost $0.04?

No. The $0.04 charge applies when LastWorker's built-in AI generates a reply, and post_reply posts text your agent wrote. A channel on auto or review runs the built-in AI on inbound messages, and those replies are billed at $0.04 each, plus $0.03 per segment when sent by SMS. A channel on manual runs no built-in AI.

Is there a REST API?

Yes. The same key works on the REST routes under /api/v1, and the MCP tools call the same code. The routes and response shapes are documented at lastworker.com/docs/agents.

Does the MCP server handle phone calls?

Yes. list_calls and get_call return phone calls with the transcript, length, ticket status and transfer result. send_call_follow_up emails or texts the caller from a finished call, in a new thread linked to that call. post_reply returns an error on a phone thread, since a call has no text reply to post.

JH
Jerry Holt
Customer Operations Lead, LastWorker

Jerry Holt has spent eighteen years running customer operations for service businesses, from a two-location restaurant group to a regional dental practice with eleven front desks. He has hired receptionists, written phone scripts at 2 a.m., and watched good leads die in a voicemail box. These days he writes about what actually moves the needle on the phones, in the inbox, and over chat, and where AI earns its place versus where it gets in the way.

Keep reading

Stop letting customers go to voicemail.

Set up in about fifteen minutes. Live chat and email are free forever, so there is no bill to weigh up before you try it.