Skip to content

Chapter 0: Clone the workshop

This chapter gets the Support Escalation MCP server running, connects your coding agent to it, and walks you through using it the way a support engineer would. Your agent will file a real Linear issue, and you’ll see the security gaps you’ll close with Keycard in this workshop.

Command line
git clone https://github.com/keycardai/keycard-workshop-code
cd keycard-workshop-code

Inside, you’ll find the starter MCP server (support-escalation/), completed MCP server (mcp-server/), agent skills, and configuration files.

  1. Install dependencies:

    Command line
    cd support-escalation
    npm install
  2. Copy the example environment file and open it:

    Command line
    cp .env.example .env

    You’ll see an empty LINEAR_API_KEY variable. The instructor will provide the API key. Read the comment above the key to learn about the problems with shipping access this way. You’ll feel each of them firsthand in a few minutes (and you may have already felt them yourself in the wild).

  3. Start the server:

    Command line
    npm run dev

    It serves on http://localhost:8000/mcp. There is no web interface, it’s just an API. Leave it running.

The MCP server uses HTTP. Connect your agent.

In your terminal, enter the following command:

Command line
claude mcp add --transport http support-escalation http://localhost:8000/mcp

Ask your agent what tools are available from the MCP server:

Prompt your coding agent

List the tools the support-escalation server exposes.

Three tools are listed: get_support_tickets, escalate_ticket, and delete_issue. This is MCP tool discovery: your agent sees the surface the server exposes, and nothing else. Those three calls are the entire attack surface you’ll secure over the course of the workshop.

Now test drive the MCP server. Ask your agent to look at the support queue and escalate the most critical ticket.

Prompt your coding agent

Using the support-escalation tools, list the open support tickets. Then escalate the critical payment ticket (the one about double charges) to engineering with escalate_ticket.

Your agent calls get_support_tickets, reads the tickets, picks the critical double-charge one, and calls escalate_ticket. It creates a new issue in the shared Linear workspace. Open the link it gives you.

Three things just went wrong.

1. The MCP server is completely unsecured.

Section titled “1. The MCP server is completely unsecured.”

Anyone who can reach localhost:8000 can call every tool. There’s no bearer token, no authentication, no concept of identity (user, agent, or otherwise). In production, this is an MCP server on the internet that anyone can drive.

2. One shared Linear API key does everything under the same account every time.

Section titled “2. One shared Linear API key does everything under the same account every time.”

Every escalation in the room is created by the same Linear key. The key belongs to one Linear account: “Learn Keycard (learn@keycard.ai).” Linear creates every issue while acting as “Learn Keycard” (never as you). This happens no matter who actually escalated it.

The creator field isn’t blank; it’s filled in confidently and uselessly, with the same name for everyone. You can’t tell who filed which issue, can’t audit a single attendee, and couldn’t revoke one person without cutting off everyone. The key is also a kitchen sink: escalate_ticket only needs to create one issue, but it holds the power to read, edit, and delete anything at the agent’s discretion.

Look at the issue content. The ticket was copied in verbatim, so a customer’s social security number and credit card are now exposed in engineering’s issue tracker. Nothing masked Personally Identifiable Information (PII), because nothing in the MCP server knows it should.

Ask your agent to delete the issue you just filed:

Prompt your coding agent

Use the delete_issue tool to delete the support escalation issue you just filed.

That trashes the issue in the shared workspace, and demonstrates the danger of API keys again: the same credential that created the issue can also delete it at will.

During the workshop, you’ll close all of these security gaps, addressing one thing at a time so you always know which fix did what. You’ll put real authentication in front of /mcp, give every tool call a verifiable identity, move secrets into a vault, swap the shared Linear API key for per-user delegated access, mask the PII with an LLM, and finally write a policy that refuses to let the agent overreach.