Postsmith
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Postsmith
Ask your AI assistant for a social media post. Get a finished, on-brand post back, right in the chat.
Postsmith is an app for ChatGPT and Claude, built on the open MCP Apps standard. You link your account once with OAuth. After that, the assistant writes the copy, Postsmith renders the image as a background job, and an interactive card in the conversation shows live progress. You can then preview the post, copy the caption, download the PNG or schedule it. Each post costs one credit, and you buy credits with Stripe.
You: Make a LinkedIn post — we launched same-day delivery in Lahore.
Assistant: [calls create_post] → card appears: "Designing the visual… ▓▓▓▓░░"
→ preview image + caption · [Download PNG] [Schedule]What it shows
Area | Implementation |
In-chat app | MCP server with an MCP Apps UI resource ( |
Long-running jobs |
|
Account linking | A small OAuth 2.1 authorization server written from scratch. It supports Dynamic Client Registration (RFC 7591), the Authorization Code flow with PKCE (S256 only), Resource Indicators (RFC 8707), |
Secure data handling | Tokens, codes and sessions are stored only as SHA-256 hashes. Passwords use scrypt. The consent form has a CSRF token bound to the request. Post-login redirects are checked to block open redirects. Download links are HMAC-signed and expire. Tools only ever see the signed-in user's data. |
Paid credits | Stripe Checkout in test mode. Credits are granted from the |
Helpful errors in chat | Running out of credits returns a message with a top-up link, and the widget shows a Top up button. A caption that's too long for the platform (for example, X's 280 characters) is rejected before any credit is charged, with the exact number of characters to cut. |
Works without UI too | Every tool result includes a text version written for the model. Clients that don't render widgets, or that use the API (Grok), still get the full flow. |
Related MCP server: posthive
Tools
Tool | Who can call it | Purpose |
| model | Starts generation from a brief, headline, caption, hashtags, platform and theme. Costs 1 credit. |
| model + widget | Returns status, progress, preview, caption and a signed download link. |
| model + widget | Schedules a finished post. |
| model | Lists recent posts. |
| model | Returns the credit balance and the top-up link. |
The assistant writes the copy itself, so no API key for a language model is needed. In a real product, src/posts.ts is where the existing content backend would plug in: image generation, brand checks and publishing APIs. Here those steps are simulated with delays, and the image is rendered locally from SVG with sharp.
Run it locally
npm install
cp .env.example .env
npm run dev # http://localhost:3000, MCP endpoint at /mcp
npm test # end-to-end: sign-up → OAuth/PKCE → tools → download → billing → token rotationTo see the widget without ChatGPT or Claude, run the local host harness. It plays the role of the chat client: a sandboxed iframe connected through the MCP Apps bridge.
npm run token # runs the OAuth flow and prints an access token
npm run harness # open http://localhost:5174/?token=<token> (&theme=dark &platform=x …)Connect it to ChatGPT or Claude
Both need a public HTTPS URL. Set BASE_URL to it, because it becomes the OAuth issuer and the token audience.
ngrok http 3000 # then set BASE_URL=https://<id>.ngrok.app in .env and restartChatGPT: Settings → Apps → Advanced settings → turn on Developer mode → Create app. Enter
https://<host>/mcpand choose OAuth as the authentication method.Claude: Settings → Connectors → Add custom connector → enter
https://<host>/mcp.Grok: use xAI's API with a remote MCP tool pointed at
https://<host>/mcp, and pass a bearer token fromnpm run token.
All three go through the same OAuth flow: register the client, sign up or log in, approve on the consent screen, receive tokens.
Stripe (test mode)
Without Stripe keys, the account page offers free "dev mode" top-ups so the demo runs offline. To use Stripe:
STRIPE_SECRET_KEY=sk_test_... # in .env
stripe listen --forward-to localhost:3000/billing/webhook # prints STRIPE_WEBHOOK_SECRET=whsec_...Pay with the test card 4242 4242 4242 4242. The success page also checks the payment with Stripe directly, so credits arrive even if the webhook isn't set up yet.
Deploy
docker build -t postsmith .
docker run -p 3000:3000 -v postsmith-data:/data -e BASE_URL=https://your.domain -e APP_SECRET=$(openssl rand -hex 32) postsmithSQLite is stored on the /data volume.
Layout
src/
app.ts Express app: OAuth metadata, auth server, web pages, billing, /mcp behind bearer auth
auth/oauth.ts OAuth 2.1 authorization server (DCR, PKCE, rotation, revocation) + token verifier
mcp.ts MCP server: tools + the UI resource
posts.ts Background generation jobs, refunds, signed downloads, scheduling
render.ts SVG/PNG post renderer per platform
billing.ts Stripe Checkout + webhook, dev top-up fallback
users.ts Accounts and the credit ledger
web/ Sign-up, login, consent and account pages
widget/main.tsx The in-chat card (React, MCP Apps SDK)
harness/ Local stand-in for a chat client, used to test the widget
test/e2e.test.ts End-to-end test of the whole flowStack
TypeScript · Node.js · Express · MCP TypeScript SDK v2 · MCP Apps (@modelcontextprotocol/ext-apps) · React · Vite · SQLite · Stripe · Docker
Built by Muhammad Ghilman Randhawa with Claude Code as a coding agent. I designed it and reviewed every line.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Schedule posts to X, TikTok, YouTube and Instagram from AI assistants via OAuth 2.1.
Write social posts with AI and save them as hand-off cards; OAuth, free credits
Draft, schedule and publish on-brand social posts and images for a small business from any AI agent.
Draft, schedule, and publish social posts for your workspace straight from your AI.
Related MCP Servers
- AlicenseAqualityBmaintenanceOne prompt, a native post per network, published or scheduled by your agent: TikTok, Instagram, Facebook, YouTube, LinkedIn, Bluesky, Mastodon, Telegram, Discord, Slack, Nostr, X, WordPress, Dev.to, Hashnode. 22 tools incl. plan_week, bulk_schedule, analytics and TikTok video quality check. Priced per brand, not per channel; API + MCP on the free plan. Hosted: postwire.io/api/mcp22104 npmMIT
- AlicenseAqualityBmaintenanceSchedule and manage social media posts across 13 platforms (Bluesky, Threads, Instagram, LinkedIn, Mastodon, YouTube, Facebook, Pinterest, Telegram, Nostr, X/Twitter, Discord, Tumblr and more). OAuth 2.0 + PKCE, 10 tools, draft-first workflow for AI agents.21028AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to write, schedule, publish, and measure social media posts across LinkedIn, Bluesky, Mastodon, and YouTube, plus manage media and queue slots, through one OAuth URL with no install or API key. It also covers retrying, cancelling, restoring posts and reading analytics, with reversibility safeguards around irreversible publishing.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to upload and schedule videos, images, carousels, and text posts across 17 social platforms, read analytics, and reply to comments through a hosted OAuth connection.MIT