MCP Server
Run the PublishQ MCP server so any MCP client can list your connected accounts, upload media, and schedule posts across your social platforms.
Add PublishQ to your MCP client, and the assistant you already talk to can draft, schedule and publish to the accounts you have connected, and tell you what is queued. Any Model Context Protocol client works; the only thing that changes between them is which file the configuration goes in.
Install
There is nothing to install ahead of time. Every client below launches it with npx, which fetches the package on first run.
You need an API key. Create one under Settings → API Keys; it starts with pq_live_. The key's scopes decide what the agent can do, so a key that may write posts does not have to be a key that may create workspaces.
Configure your client
Add this to claude_desktop_config.json, then restart the app:
{
"mcpServers": {
"publishq": {
"command": "npx",
"args": ["-y", "@publishq/mcp"],
"env": { "PUBLISHQ_API_KEY": "pq_live_your_key_here" }
}
}
}claude mcp add publishq \
--env PUBLISHQ_API_KEY=pq_live_your_key_here \
-- npx -y @publishq/mcpAdd --scope project to write it into a .mcp.json the rest of the team shares.
codex mcp add publishq \
--env PUBLISHQ_API_KEY=pq_live_your_key_here \
-- npx -y @publishq/mcpCodex stores it as TOML in ~/.codex/config.toml, under [mcp_servers.publishq].
Add this to ~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
{
"mcpServers": {
"publishq": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@publishq/mcp"],
"env": { "PUBLISHQ_API_KEY": "pq_live_your_key_here" }
}
}
}openclaw mcp add publishq \
--command npx \
--arg -y \
--arg @publishq/mcp \
--env PUBLISHQ_API_KEY=pq_live_your_key_here
openclaw mcp doctor publishq --probeAny other MCP client works the same way: run npx -y @publishq/mcp with PUBLISHQ_API_KEY in its environment.
Configuration
| Variable | Required | Description |
|---|---|---|
PUBLISHQ_API_KEY | Yes | Your API key (pq_live_...). |
PUBLISHQ_API_URL | No | Override the API base URL. Defaults to https://publishq.com/api/v1. |
Tools
| Tool | What it does |
|---|---|
publishq_list_posts | List posts, paginated |
publishq_get_post | Get one post by ID |
publishq_create_post | Create a draft, scheduled, or immediate post |
publishq_update_post | Change content, media, or schedule |
publishq_delete_post | Delete a post |
publishq_remove_post_account | Remove one account's delivery from a post |
publishq_list_accounts | List connected social accounts |
publishq_get_tiktok_creator_info | Read TikTok privacy options before posting |
publishq_list_media | List media in the library |
publishq_get_media | Get one media item |
publishq_upload_media | Upload a local file |
publishq_list_workspaces | List workspaces |
publishq_get_workspace | Get one workspace |
publishq_create_workspace | Create a workspace |
Send what you want
The server forwards the agent's arguments as they are, including fields it does not recognise, so any error you see is the API's own.
Keeping an agent inside bounds
- Filter the tools. Most clients can hide individual tools. Exposing
publishq_list_accountsandpublishq_create_postand nothing else gives you an agent that can write posts and cannot delete them. - Ask for drafts and schedules. Publishing is a field on the create call, not a separate tool: a post with no
scheduledAtand nopublishNowis a draft that waits for you, and a scheduled post can be edited or cancelled until it fires. That, plus your client's approval prompt, is what keeps an unattended run off your accounts. - Scope the key. Scopes turn a whole resource on or off.
posts:writecovers creating, updating, deleting and publishing, so a key without it cannot draft either — useful for an agent that only needs to read.
Related
- Post to social media from any MCP client
- CLI for agents that would rather run a command
- SDK for building your own