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.
Hosted server
Add https://publishq.com/mcp as a remote MCP server. On first use your client opens PublishQ in your browser: sign in, choose what it may do, and click Approve. Nothing to install and no key to copy.
On claude.ai, Claude Desktop or Claude mobile, open Settings > Connectors, choose Add custom connector and paste https://publishq.com/mcp. The connector is available in Cowork too.
Turn on developer mode in Settings, then create an app with the URL https://publishq.com/mcp and OAuth as its authentication.
claude mcp add --transport http publishq https://publishq.com/mcpThen open /mcp in a session and choose Authenticate.
Add this to ~/.cursor/mcp.json:
{
"mcpServers": {
"publishq": { "url": "https://publishq.com/mcp" }
}
}Local server
The local server runs on your machine over stdio, with npx. Sign in once with the CLI and it uses that login:
npx @publishq/cli@latest loginThen register it with your client. None of these needs a key or an env block.
Add this to claude_desktop_config.json, then restart the app:
{
"mcpServers": {
"publishq": {
"command": "npx",
"args": ["-y", "@publishq/mcp@latest"]
}
}
}claude mcp add publishq -- npx -y @publishq/mcp@latestAdd --scope project to write it into a .mcp.json the rest of the team shares. It holds no secret, so each person uses their own login.
codex mcp add publishq -- npx -y @publishq/mcp@latestCodex 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@latest"]
}
}
}openclaw mcp add publishq \
--command npx \
--arg -y \
--arg @publishq/mcp@latest
openclaw mcp doctor publishq --probeAny other MCP client works the same way: run npx -y @publishq/mcp@latest after signing in.
In CI, use an API key
A job has no browser to approve a login, so set PUBLISHQ_API_KEY to a key from API Keys in its environment instead.
Configuration
| Variable | Required | Description |
|---|---|---|
PUBLISHQ_API_KEY | No | An API key (pq_live_...), for CI. Not needed after pq login. |
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 of up to 4 GB |
publishq_create_media_upload | Get a signed URL to upload a file from your own disk, up to 4 GB, and the media ID it becomes. |
publishq_delete_media | Delete a media file that no draft or scheduled post uses |
publishq_list_media_folders | List media folders with their file counts |
publishq_move_media | Move media files to a folder or to the top level |
publishq_rename_media_folder | Rename a media folder |
publishq_preview_media_folder_deletion | Count what deleting a folder would remove |
publishq_delete_media_folder | Delete a folder and its files, after the preview |
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
Media folders
Organize your media library into folders through the API, SDK, CLI or MCP server. List folders, upload into one, move files, rename and delete folders.
CLI
Install the PublishQ CLI to schedule posts, upload media, and read your connected accounts from a shell, a CI job, or an AI agent with terminal access.