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

# MCP Server

> Connect any MCP client (Claude Code, Cursor, custom agents) to Marky

<Info>
  **Free beta.** The Marky API is free to use while it's in beta. Paid plans are
  coming later, and we'll give you plenty of notice before any charges begin.
</Info>

Marky runs a **Model Context Protocol (MCP) server**, so an AI agent can use
Marky's tools natively. Instead of pasting REST instructions into your agent,
point it at one URL and it gets `list_businesses`, `get_business`, `create_post`,
`schedule_post`, and the rest as real tools.

The MCP server exposes the **same operations as the [REST API](/api-reference/create-post)** —
same auth, same data. Pick whichever fits your stack: MCP for agents, REST for
scripts and automation tools.

## Endpoint

```
https://api.mymarky.ai/api/mcp
```

* **Transport:** streamable HTTP
* **Auth:** `Authorization: Bearer mk_live_...` (your API key — see [Authentication](/authentication))

## Connect with Claude Code

One command. Replace `mk_live_YOUR_KEY` with your key:

```bash theme={null}
claude mcp add --transport http marky https://api.mymarky.ai/api/mcp \
  --header "Authorization: Bearer mk_live_YOUR_KEY"
```

Then just ask:

> "List my Marky businesses, then generate 5 posts about our spring blend and
> schedule one each weekday at 9am."

## Connect with the Claude Desktop app

Using the Claude Desktop app (the same app used for Cowork) instead of the
command line? You add Marky to its config file.

1. In the app, open **Settings → Developer → Edit Config**. That opens
   `claude_desktop_config.json`. (On a Mac it lives at
   `~/Library/Application Support/Claude/claude_desktop_config.json`; on Windows
   at `%APPDATA%\Claude\claude_desktop_config.json`.)
2. Paste the block below. If the file already has an `mcpServers` section, add
   the `marky` part inside it. Replace `mk_live_YOUR_KEY` with your key.
3. Save, fully quit the app, and open it again so the new server loads.

```json theme={null}
{
  "mcpServers": {
    "marky": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.mymarky.ai/api/mcp",
        "--header",
        "Authorization:${MARKY_AUTH}"
      ],
      "env": {
        "MARKY_AUTH": "Bearer mk_live_YOUR_KEY"
      }
    }
  }
}
```

<Note>
  The Claude Desktop app connects to MCP servers that run on your computer.
  Marky's server lives on the web, so the small `mcp-remote` helper (run by
  `npx`) bridges the two. You need [Node.js](https://nodejs.org) installed for
  `npx` to work. The key sits in the `env` block on purpose, so the space in
  `Bearer mk_live_...` is passed as one piece and not split apart.
</Note>

## Connect with another MCP client

Most MCP clients (Cursor, custom agents, the MCP SDKs) take a config like this:

```json theme={null}
{
  "mcpServers": {
    "marky": {
      "transport": "http",
      "url": "https://api.mymarky.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer mk_live_YOUR_KEY"
      }
    }
  }
}
```

## What the tools do

The tools mirror the REST API one-to-one. A few you'll reach for first:

| Tool                   | What it does                                                                                                    |
| :--------------------- | :-------------------------------------------------------------------------------------------------------------- |
| `list_businesses`      | List your workspaces. Grab the `id` you want as `business_id`.                                                  |
| `generate_draft_posts` | Generate on-brand draft posts from a topic. Brand voice, colors, and logo come from the business automatically. |
| `create_post`          | Create one post yourself (caption + platforms).                                                                 |
| `schedule_post`        | Schedule a post for a future time.                                                                              |
| `get_post`             | Check a post's status and per-platform publish results.                                                         |

The full list and every parameter is in the [API Reference](/api-reference/create-post)
— each REST operation is the same MCP tool.

## Before you start

* **Connect your social accounts first.** Connecting an Instagram, Facebook,
  LinkedIn, etc. account is a one-time step in the [dashboard](https://app.mymarky.ai).
  The tools can see your connected accounts but cannot add new ones.
* Keep your API key in an environment variable, not in source control.
