mcp server
staqly
π¨ Local-first social media scheduler for AI agents π€ Claude Code, Codex and n8n write posts over MCP or REST; schedule them per collection, publish to your channels with retries. SQLite, one Docker
Set up
Runs on your computer. Pick your agent and operating system.
This project does not publish an install method we can turn into a config. Follow the README instead.
README
synced Oct 21, 2026Why staqly
Most schedulers expect a person to type every post. Staqly expects your agents to do the writing.
- Agents write. Claude Code, Codex or OpenCode draft posts over MCP. n8n and scripts use REST.
- Collections plan. A collection schedule picks the next waiting post every weekday at 9, or every six hours.
- Staqly publishes. Every channel goes out from a durable job queue, with retries, a link back and an alert.
- Agents refill. When a collection runs dry, the schedule asks your agent or your endpoint for more.
You stay in charge from one calendar on your desktop or phone. Nothing leaves your machine unless you publish it.
Features
| π Calendar | Day, week, month and list views. One card per channel. Drag a post to another hour, or press + on a free slot. |
| βοΈ Composer | Write once, pick channels, give a channel its own text, with a character counter per platform. Bold, italic, lists and links become plain text every platform takes. |
| πΌοΈ Media | A media library for pictures and videos, with a built-in image editor to crop, resize and add text before you post. |
| π¬ Comments | Add comments under a post: on X they go out as a thread, each after its own delay. |
| π Repeat | Publish a post again every day, week or month: the next copy is scheduled as soon as one goes out. |
| π Collection schedules | Weekdays at 09:00, every six hours or once. The next waiting post, chosen posts or all of them, in your time zone. |
| π€ Agents that refill | An empty schedule asks your agent (list_requested_work) or calls your endpoint, which returns new posts. |
| π Your own automation | A channel that hands the post to n8n or a script and waits for the link. Any platform works today. |
| π§Ύ Visible queue | Publishing and schedule runs are jobs with leases and retries (1, 5, then 15 minutes). Settings shows what is queued, running or failed. |
| π Alerts | Telegram, Slack, Discord, ntfy or email when a post goes out or fails, a channel needs reconnecting or a schedule asks for posts. |
| π Integrations | MCP with 100 tools, REST with OpenAPI, signed webhooks, n8n, a CLI, and TypeScript and Python SDKs. |
| π Local-first | One SQLite file on your machine. Channel credentials are sealed with a key that stays there. Local agents use one access token that never leaves your machine. |
| βοΈ Hosted mode | Optional: workspaces, scoped API keys, sessions and plans on PostgreSQL, from the same binary. |
Quick start
Install Staqly Community Edition, the free self-hosted version, on macOS or Linux, then start it:
curl -fsSL https://raw.githubusercontent.com/staqly/staqly/main/scripts/install.sh | sh
staqly serve
One binary runs the API, MCP, the job queue and the dashboard. You need no Docker and no account. At every start it prints the access token and a link that opens the dashboard signed in; agents send the same token (staqly serve token prints it again).
| Dashboard | http://localhost:8080 |
| API and MCP | http://localhost:3333 and http://localhost:3333/mcp |
Next steps:
- Open Channels, press Add channel and pick Your own automation to try the whole loop today.
- Write your first post under Posts, or ask your agent to.
- Keep staqly running in the background with
staqly service install. - On your phone: start with
staqly serve --expose, open Connect a device and scan the QR code.
Prefer Docker? The Community Edition also runs as one prebuilt image, with no checkout:
docker run -d --name staqly --restart unless-stopped \
-p 127.0.0.1:3333:3333 -p 8080:8080 \
-v staqly-data:/data \
--read-only --tmpfs /tmp:size=64m,mode=1777 \
--cap-drop ALL --security-opt no-new-privileges:true \
--memory 640m --pids-limit 256 \
ghcr.io/staqly/staqly:latest
docker exec staqly server token # the access token, and a link that signs the dashboard in
Upgrades, backups and every setting: Run with Docker.
Connect your agent
export STAQLY_API_KEY=$(staqly serve token) # Docker: $(docker exec staqly server token)
# Claude Code
claude mcp add --transport http staqly http://localhost:3333/mcp --header "Authorization: Bearer $STAQLY_API_KEY"
# Codex
codex mcp add staqly --url http://localhost:3333/mcp --bearer-token-env-var STAQLY_API_KEY
For OpenCode, add this to opencode.json in your project:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"staqly": {
"type": "remote",
"url": "http://localhost:3333/mcp",
"headers": { "Authorization": "Bearer {env:STAQLY_API_KEY}" },
"enabled": true
}
}
}
Cursor and other MCP clients: see MCP setup. Then ask:
"Draft five posts about the new release into Product updates, one per weekday morning."
"What is scheduled this week, and did anything fail?"
"Make the Bluesky version shorter and publish it now."
How it works
flowchart LR
A[Claude Code Β· Codex Β· OpenCode] -- MCP --> S((staqly))
N[n8n Β· scripts Β· CLI Β· SDKs] -- REST --> S
P[You: dashboard and phone] --> S
S -- schedules and job queue --> C[X today, more platforms rolling out]
S -- post.publish_requested --> O[Your own automation]
O -- result and link --> S
S -- webhooks and alerts --> T[Your tools and your phone]
Example. Claude Code drafts a week of tips into Daily tips. The collection schedule publishes one each weekday at 9. When Daily tips runs dry, the schedule asks Claude for more. Walkthrough: Let an agent fill a collection.
Documentation
| Start | docs.staqly.ai Β· Quick start Β· Concepts |
| Agents and code | MCP Β· n8n Β· CLI Β· TypeScript SDK Β· Python SDK Β· OpenAPI |
| Running it | Local and cloud Β· Alerts Β· Backup Β· Monitoring Β· Data and privacy Β· Troubleshooting |
| Internals | Security model Β· OpenAPI Β· Agent guide |
Tech stack
- Go: REST, MCP over stdio and Streamable HTTP, the job queue and webhook workers
- SQLite in the Community Edition, PostgreSQL in hosted mode, with goose migrations and sqlc queries
- Next.js and shadcn/ui for the dashboard, exported statically and embedded in the binary
- Tiptap through editorcn for the post editor
- Turborepo and pnpm workspaces, Fumadocs for the docs
Contributing
Bug reports, ideas and pull requests are welcome. Start with CONTRIBUTING.md. Please report security issues privately, as described in SECURITY.md.
License
Staqly is licensed under the GNU AGPL-3.0: use it, run it, change it. If you offer a modified staqly to others over a network, share your changes under the same license. The TypeScript SDK, the Python SDK and the integrations are Apache-2.0, so they fit into code under any license. Versions up to v0.1.0 were released under Apache-2.0. See NOTICE.
Contributions are welcome under the Contributor License Agreement.