> ## 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.

# Connect Claude to Marky

> Connect the Claude Code CLI or the Claude Desktop app to Marky to generate and schedule social posts

<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>

There are two ways to connect Claude to Marky. The **MCP server** is the
easiest: Claude gets all of Marky's tools natively, with no cheat sheet to
maintain. If you'd rather not use MCP, you can drop a few REST instructions into
your `CLAUDE.md` instead.

The MCP setup works for both the **Claude Code CLI** and the **Claude Desktop
app** (this is the same app used for Cowork). Pick your tool in the tabs below.

## Get your API key

Open **[app.mymarky.ai/connect-claude](https://app.mymarky.ai/connect-claude)** — sign up
or log in and your `mk_live_...` key is created in one click (copy it right away; you
only see it once). No workspace setup needed first.

Prefer the manual route? **[Settings → API Keys](https://app.mymarky.ai/org/settings#api-keys)
→ Create API Key** while signed in — that's also where you revoke keys.

## Option A: MCP server (recommended)

Marky's MCP server lives at one URL, and you sign in with your API key:

```
URL:  https://api.mymarky.ai/api/mcp
Auth: Authorization: Bearer mk_live_YOUR_KEY
```

Set it up once, using the tab for your tool.

<Tabs>
  <Tab title="Claude Code CLI">
    Add Marky as an MCP server in one command. Replace `mk_live_YOUR_KEY` with
    the key you just created:

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

    That's it. Claude Code now has Marky's tools.
  </Tab>

  <Tab title="Claude Desktop app">
    The Claude Desktop app (the same app used for Cowork) reads its servers from
    a file called `claude_desktop_config.json`. You add Marky there.

    **1. Open the config file.** In the Claude Desktop app, go to
    **Settings → Developer → Edit Config**. That opens (or creates)
    `claude_desktop_config.json`. You can also open it by hand:

    * **Mac:** `~/Library/Application Support/Claude/claude_desktop_config.json`
    * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

    **2. Add Marky to the file.** Paste the block below. If the file already has
    an `mcpServers` section, just add the `marky` part inside it. Replace
    `mk_live_YOUR_KEY` with your key:

    ```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 is kept in the `env` block on purpose: that way
      the space in `Bearer mk_live_...` is passed as one piece, not split apart.
    </Note>

    **3. Save the file and fully quit Claude Desktop, then open it again.** New
    servers only load on a fresh start. Marky's tools will then show up in the
    tools menu (the icon near the message box).
  </Tab>
</Tabs>

Either way, Claude now has Marky's tools (`list_businesses`, `generate_posts`,
`create_post`, `schedule_post`, `get_post`, and more). Try:

> "List my Marky businesses."

Claude will call `list_businesses` and show your workspaces. Each one has an
`id` you'll use as the `business_id` for everything else.

## Option B: REST in your CLAUDE.md

If you'd rather not use MCP, add these instructions to your project's
`CLAUDE.md` and let Claude call the REST API with `curl`:

```markdown theme={null}
## Marky API: Social Media Posting

Base URL: https://api.mymarky.ai/api
Auth header: Authorization: Bearer mk_live_YOUR_KEY

### Start here (read-only)
- GET /businesses to list workspaces. Copy the `id` you want; that's your business_id.

### Generate a batch of on-brand posts (the easy path)
1. POST /posts/generate with {"business_id": "BIZ_ID", "content": "what to post about", "count": 5}
   Returns {"job_id": "..."}. Brand voice, colors, and logo come from the business automatically.
2. GET /jobs/{job_id} every few seconds until status is "completed". The result lists the new draft posts.
3. GET /posts?business_id=BIZ_ID&status=NEW to review the drafts.
4. POST /posts/{id}/schedule with {"publish_at": "2026-12-01T14:00:00Z"} for each post.

### Create one post yourself
- POST /posts with {"business_id": "BIZ_ID", "caption": "text", "restrict_publish_to": ["instagram", "facebook"]}
- POST /posts/{id}/schedule with {"publish_at": "2026-12-01T14:00:00Z"}

### Check status
- GET /posts/{id} and read `publish_results`. Poll until every entry is "success" or "failed".

### Error format
All errors return: {"error": {"type": "...", "code": "...", "message": "...", "doc_url": "..."}}
```

## Example: a week of posts

Ask Claude Code:

> "Generate 5 posts about our spring coffee blend, then schedule one each
> weekday at 9am."

Claude will:

1. Call `list_businesses` to find your `business_id`.
2. Call `generate_posts` with your topic and `count: 5`, then poll `get_job_status` until it finishes.
3. Review the drafts with `list_posts` (status `NEW`).
4. Call `schedule_post` on each one with the time you asked for.

## Claude Cowork: install Marky skills

Marky also ships agent skills as plugins for Claude Cowork. Install them from
the `Marky-Team/marky-skills` marketplace:

1. Open the Claude Desktop App and navigate to the Cowork tab.
2. Click on the Customize menu in the left sidebar to pull up your unified workspace hub.
3. Open the Plugins tab and look down for the Personal plugins section.
4. Click the "+" button and select "Add marketplace".
5. Select "Add from a repository" and paste the GitHub repository handle (Marky-Team/marky-skills) or git URL.
6. Once synced, browse the newly populated catalog and click "Install" on the specific plugin you want to activate.

## Before you start

* **Connect your social accounts first.** Connecting an Instagram, Facebook,
  LinkedIn, etc. account is a one-time step in the Marky web app. The API can
  see your connected accounts but cannot add new ones.
* Keep your API key in `.env`, not in `CLAUDE.md`.
* Full reference: [docs.mymarky.ai](https://docs.mymarky.ai)
* Send API feedback with `POST /api/feedback`, or [open a request](https://docs.mymarky.ai).
