Claude MCP integration

What is Model Context Protocol (MCP)?

MCP is a standardized protocol that allows AI assistants like Claude to securely access structured data from other applications. When you integrate Alloy with Claude Desktop via MCP, Claude can use Alloy session links to retrieve the context behind a prototype or dev session.

With the Alloy MCP integration, Claude can:

  1. Resolve Alloy session links: Paste an Alloy session URL and Claude can identify the matching session in your workspace.
  2. Read chat history: Claude can retrieve the messages from an Alloy session so it understands the decisions and prompts that led to the current result.
  3. Inspect code context: Claude can list session files and retrieve file content, including before-and-after diffs for dev sessions.

Setting up Claude Desktop integration

Setting up the Claude Desktop integration with Alloy requires an Alloy MCP API key and a Claude Desktop MCP server entry.

1. Generate an MCP API key in Alloy

  1. Navigate to your workspace settings in Alloy.
  2. Select MCP from the sidebar.
  3. Click Create key.
  4. Copy the generated API key.

MCP API keys are workspace-scoped. Claude can only access sessions that belong to the workspace associated with the key.

2. Configure Claude Desktop

  1. Open Claude Desktop on your computer.
  2. Click Claude in your top menu bar, then click Settings.
  3. Select Developers from the sidebar.
  4. Click Edit config.
  5. Paste the following config:
{
  "mcpServers": {
    "alloy": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.alloy.app/mcp",
        "--header",
        "X-MCP-API-Key: <YOUR API KEY HERE>"
      ]
    }
  }
}
  1. Replace <YOUR API KEY HERE> with the API key you generated in Alloy.
  2. Save the config and restart Claude Desktop.

Once connected, Claude will have secure access to Alloy session context for your workspace.

Using Claude Desktop with Alloy

With the integration set up, you can paste Alloy links into Claude and ask questions about the session. Alloy session URLs can be provided as full URLs, such as https://alloy.app/.../p/.../edit or https://alloy.app/.../p/dev/....

You can ask Claude questions like:

  • "Summarize the chat history for this Alloy session: https://alloy.app/.../p/.../edit"
  • "What files changed in this dev session, and what are the important diffs? https://alloy.app/.../p/dev/..."
  • "Use the code context from this Alloy session to explain how the prototype works."
  • "Pull the chat messages from this Alloy session and turn the decisions into implementation notes."

Available Alloy MCP context

The Alloy MCP server is centered around Alloy sessions. Depending on the session type, Claude can access:

  • Session metadata, including the session title, type, timestamps, status, and related workspace context.
  • Chat messages from a specific session, ordered from oldest to newest.
  • File lists for prototype and dev sessions.
  • Prototype session file content.
  • Dev session before-and-after file diffs for files changed during the session.

This lets Claude answer questions using the same context your team sees in Alloy without requiring you to manually copy messages, files, or diffs into the conversation.

Troubleshooting

If Claude cannot access Alloy session context, check the following:

  • Confirm the API key is copied correctly and has not been deleted from Alloy.
  • Confirm the session belongs to the same workspace where the API key was created.
  • Restart Claude Desktop after changing the MCP config.
  • Make sure the MCP server URL is https://mcp.alloy.app/mcp.