~/.openclaw/openclaw.json under mcp.servers. The server is https://api.social-api.ai/mcp.
Prerequisites
- OpenClaw installed (
npm i -g openclaw). - A SocialAPI account with at least one connected account.
- For a gateway with no browser: an API key.
Set up with OAuth
1
Add the server
~/.openclaw/openclaw.json:transport to streamable-http. When you omit it, OpenClaw uses SSE.2
Sign in
127.0.0.1:8989. Open the URL, log in to SocialAPI, and click Authorize. The terminal prints MCP OAuth credentials saved for "socialapi".If the gateway runs on another machine and the callback cannot reach it, authorize in your browser, copy the code from the redirect URL, and finish with:3
Check the server
openclaw mcp reload picks up the new server without a restart.Choose shared or per-sender accounts
By default, the credentials fromopenclaw mcp login are shared: every channel acts on the one SocialAPI account you authorized. Use this for a personal assistant or a team bot.
To let each person who messages the agent connect their own SocialAPI account, set oauth.identity to per-requester and give the gateway a public HTTPS origin for the callback:
Set up a headless gateway with an API key
OpenClaw ignores a staticAuthorization header while auth is oauth, so save the server without auth:
1
Set the variable
2
Save the server
${SOCAPI_KEY} from the environment the gateway runs in, so the key never sits in openclaw.json. To limit what the agent can do, create a scoped API key.Limit the tools
Hide the tools that a channel agent must never call:--include to keep only a subset instead, and --clear to remove the filter. See MCP tools reference for every tool name.
Try it
Send the agent a message on any routed channel:social_api_list_accounts and answers with your connected accounts and their platforms.
Troubleshooting
listen EADDRINUSE: address already in use 127.0.0.1:8989
listen EADDRINUSE: address already in use 127.0.0.1:8989
Another
openclaw mcp login is still waiting. Stop it, or finish with --code <code> as shown above.Streamable HTTP error with an API key
Streamable HTTP error with an API key
The key is wrong or revoked, or the variable is not set where the gateway runs. Check the key in the dashboard.
Related
- SocialAPI MCP server: the server URL and the other supported clients.
- MCP tools reference: every tool the agent can call.
- Custom MCP clients: API key setup in detail.
- OAuth for MCP clients: how the sign-in works.