> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Let AI agents drive the Ayrshare API through the Model Context Protocol (MCP) Server.

<Info>
  Looking for the read-only docs-search MCP? See [Documentation MCP](/additional/mcp-server). **This page documents the Action MCP** that lets an AI agent drive the Ayrshare API.
</Info>

The Ayrshare **MCP Server** lets AI agents drive the Ayrshare API through [Model Context Protocol (MCP)](https://modelcontextprotocol.io) tools. Instead of writing REST calls by hand, an agent connects to the MCP Server and calls Ayrshare tools to publish posts, fetch history and analytics, manage comments and direct messages, create profiles, and more.

## How it works

Each MCP tool call is dispatched in-process through the same Ayrshare API chain that powers the REST API:

<ul class="custom-bullets">
  <li>Authentication of your API key.</li>
  <li>Rate limiting for your plan tier.</li>
  <li>Quota and usage enforcement.</li>
  <li>OpenAPI request validation.</li>
  <li>The same controllers that serve the REST endpoints.</li>
</ul>

Because tools run through the real API chain, the MCP Server returns the same data and enforces the same rules as the REST API. There is no separate behavior to learn or maintain.

## Who it's for

<ul class="custom-bullets">
  <li>**Agent builders** connecting an LLM agent to the Ayrshare API to publish and analyze content.</li>
  <li>**Claude Code users** who want to post, fetch history, and manage profiles from their editor (see the [Claude Code Plugin](/additional/mcp-claude-code-plugin)).</li>
  <li>**Integrators** onboarding clients' social accounts under sub-profiles (see [Client Onboarding](/additional/mcp-client-onboarding)).</li>
</ul>

<Note>
  Working with profiles and sub-profiles requires a **Business plan** (or Enterprise). See the [Business Plan Overview](/multiple-users/business-plan-overview).
</Note>

## Endpoint and transport

The production MCP Server is available at:

`https://api.ayrshare.com/mcp`

It uses **Streamable HTTP** transport and is **stateless** — there is no session to maintain between calls. See [Connect & Setup](/additional/mcp-action-connect) for the full connection and authentication details.

## Relationship to the REST API and Documentation MCP

<ul class="custom-bullets">
  <li>**REST API** — the [Ayrshare API](/apis/overview) is the underlying interface. The MCP Server dispatches each tool call through that same API chain, so behavior, rules, and data match.</li>
  <li>**Documentation MCP** — the separate [Documentation MCP](/additional/mcp-server) is a read-only server that searches Ayrshare's API documentation. It does not perform actions. Use the MCP Server (this page) to actually drive the API.</li>
</ul>

## Next steps

<CardGroup cols={2}>
  <Card title="Connect & Setup" icon="plug" href="/additional/mcp-action-connect" horizontal>
    Transport, endpoint, and authentication for any MCP client.
  </Card>

  <Card title="Tool Catalog" icon="list" href="/additional/mcp-action-tools" horizontal>
    The 27 tools grouped by domain, with scope and purpose.
  </Card>

  <Card title="Claude Code Plugin" icon="terminal" href="/additional/mcp-claude-code-plugin" horizontal>
    Install the Ayrshare plugin for Claude Code.
  </Card>

  <Card title="Client Onboarding" icon="user-plus" href="/additional/mcp-client-onboarding" horizontal>
    Mint social-linking URLs for client sub-profiles.
  </Card>
</CardGroup>
