# Post to Social Media from OpenClaw

OpenClaw is a personal AI assistant with native MCP support. You can connect OmniSocials via the remote MCP URL (no local install) or the npm package (runs locally).

## Option 1: Remote MCP URL

Easiest setup. No dependencies, no local processes.

1. Create an API key in OmniSocials (**Settings → API**)
2. Copy the MCP URL shown next to the key
3. Open your OpenClaw config at `~/.openclaw/openclaw.json`
4. Add OmniSocials under `mcpServers`:

```json
{
  "mcpServers": {
    "omnisocials": {
      "type": "url",
      "url": "https://mcp.omnisocials.com?API_KEY=omsk_live_<YOUR_KEY>"
    }
  }
}
```

5. Restart the OpenClaw gateway to load the new config

Alternatively, use the CLI wizard:

```bash
openclaw config wizard
```

## Option 2: npm package (local)

Runs the MCP server as a subprocess. Use this if you prefer keeping your API key off the network and out of the config URL.

Add this to `~/.openclaw/openclaw.json`:

```json
{
  "mcpServers": {
    "omnisocials": {
      "command": "npx",
      "args": ["-y", "@omnisocials/mcp-server"],
      "env": {
        "OMNISOCIALS_API_KEY": "omsk_live_<YOUR_KEY>"
      }
    }
  }
}
```

Restart the gateway. OpenClaw will launch the MCP server on demand and pipe it through stdio.

## Verifying

Ask OpenClaw:

> List my connected social accounts on OmniSocials

If OpenClaw responds with your accounts, the integration is working. If it errors, check the OpenClaw gateway logs. The error usually points at a missing config field or an invalid API key.

## Which option should I use?

| | Remote URL | npm package |
|---|---|---|
| Install step | None | Requires Node.js 18+ |
| API key location | Embedded in config URL | Environment variable |
| Network requirement | Every call hits OmniSocials remotely | Local subprocess, calls OmniSocials from the subprocess |
| Best for | Shared / portable configs | Security-conscious single-user setups |
