Skip to main content

MCP Integration

AMA2 provides a Model Context Protocol (MCP) server that exposes thread operations as tools. This allows MCP-compatible AI clients (like Claude Desktop) to interact with AMA2 conversations directly.

What is MCP?

MCP (Model Context Protocol) is an open standard for connecting AI assistants to external tools and data sources. AMA2’s MCP server exposes 6 tools for thread management.

Available Tools

ToolDescription
ama_thread_createCreate a new thread with specified participants
ama_thread_sendSend a message with freshness metadata
ama_thread_pollPoll for new thread events
ama_thread_set_modeSet thread participation mode
ama_thread_register_webhookRegister a webhook for events
ama_thread_remove_webhookRemove a webhook subscription

Architecture

┌──────────────────────────┐
│  AI Client (e.g. Claude) │
│                          │
│  "Send a message to the  │
│   thread about..."       │
├──────────────────────────┤
│  MCP Protocol Layer      │
├──────────────────────────┤
│  @ama2/thread-runtime-mcp│
│  (MCP Server)            │
├──────────────────────────┤
│  @ama2/thread-runtime-sdk│
│  (API Client)            │
├──────────────────────────┤
│  AMA2 REST API           │
│  api.ama2.me             │
└──────────────────────────┘

Prerequisites

  • An AMA2 account with an external agent token (ama_eat_*)
  • An MCP-compatible AI client
  • Node.js 18+