markpost
Publishes Markdown content as threaded posts on Threads, automatically splitting long content into separate posts respecting platform character limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@markpost preview this markdown as a Twitter thread"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Markpost
An MCP server that takes Markdown content and syndicates it to Twitter/X, Threads, and a static blog on S3. Designed to be used by AI agents like Claude Code — write a post in Markdown, and Markpost handles the formatting and publishing for each platform.
What it does
Formats per platform — Strips Markdown to plain text for social media, renders full HTML for blog
Auto-splits into threads — Long content is split at
---separators or sentence boundaries, respecting each platform's character limit (280 for Twitter, 500 for Threads)Previews before publishing — Dry-run tool shows exactly how content will be formatted and split
Syndicates everywhere at once — Publish to all platforms with a single tool call, or pick specific ones
Related MCP server: Markdown-To-Notion
Tools
Tool | Description |
| Format and publish Markdown to one or more platforms |
| Preview formatting and thread splits without publishing |
| Health check |
Quick start
1. Install
git clone <this-repo> && cd markpost
uv venv && uv pip install -e ".[dev]"2. Configure API keys
Copy the example config and fill in your credentials:
mkdir -p ~/.markpost
cp config.example.toml ~/.markpost/config.tomlEdit ~/.markpost/config.toml:
[twitter]
consumer_key = "your-consumer-key"
consumer_secret = "your-consumer-secret"
access_token = "your-access-token"
access_token_secret = "your-access-token-secret"
[threads]
access_token = "your-long-lived-access-token"
user_id = "your-threads-user-id"
[blog]
s3_bucket = "my-blog-bucket"
s3_prefix = "posts/"
base_url = "https://blog.example.com"
[blog.aws]
region = "us-east-1"You can also set a custom config path via the MARKPOST_CONFIG environment variable.
3. Connect to an MCP client
See the sections below for your specific client.
Running the server
stdio mode (default)
stdio is the standard transport for local MCP clients. The server reads JSON-RPC messages from stdin and writes responses to stdout.
uv run python src/markpost/server.pyOr using the FastMCP CLI:
uv run fastmcp run src/markpost/server.pyHTTP mode (remote / SSE)
For remote access or web-based clients, run in HTTP mode:
uv run fastmcp run src/markpost/server.py --transport http --host 0.0.0.0 --port 9000The server will be available at http://localhost:9000. Clients connect via the Streamable HTTP transport.
Client setup
Claude Code
Register the server with the claude CLI:
claude mcp add markpost -- uv run --directory /path/to/markpost fastmcp run src/markpost/server.pyVerify it's registered:
claude mcp listThe publish_post and preview_post tools will now be available in Claude Code sessions.
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"markpost": {
"command": "uv",
"args": [
"run",
"--directory", "/path/to/markpost",
"fastmcp", "run", "src/markpost/server.py"
]
}
}
}Restart Claude Desktop after saving.
Other MCP clients (HTTP)
Start the server in HTTP mode (see above), then point your client at http://localhost:9000.
Getting API keys
Twitter/X
Go to the Twitter Developer Portal
Create a Project and App
Set app permissions to Read and Write
Generate your Consumer Key (API Key), Consumer Secret (API Secret), Access Token, and Access Token Secret
If you changed permissions after generating tokens, regenerate them
The free tier allows 1,500 tweets/month.
Threads
Go to the Meta Developer Dashboard
Create a new app and add the Threads API product
Your Threads account must be public
Complete the OAuth flow to get an access token:
Authorize at
https://threads.net/oauth/authorize?client_id={app_id}&redirect_uri={uri}&scope=threads_basic,threads_content_publish&response_type=codeExchange the code for a short-lived token at
https://graph.threads.net/oauth/access_tokenExchange for a long-lived token (60 days) at
https://graph.threads.net/access_token?grant_type=th_exchange_token&client_secret={secret}&access_token={short_token}
Get your user ID:
GET https://graph.threads.net/v1.0/me?access_token={token}
S3 Blog
Create an S3 bucket configured for static website hosting
Configure your AWS credentials via the standard methods (
~/.aws/credentials, environment variables, or IAM role)Set
s3_bucket,s3_prefix, andbase_urlin your config
The base_url should be the public URL where your blog is served (e.g., your CloudFront distribution or S3 website endpoint).
Thread splitting
Long content is automatically split into threads. You control splits two ways:
Explicit separators — Use --- in your Markdown to force a split:
Here is the first tweet in my thread.
---
And here is the second one.Auto-splitting — If any section exceeds the platform's character limit, it's split at sentence boundaries. If a single sentence is too long, it falls back to word boundaries.
The preview_post tool lets you see exactly how content will be split before publishing.
Development
# Install dev dependencies
uv pip install -e ".[dev]"
# Run tests
uv run pytest tests/ -v
# Run a specific test file
uv run pytest tests/test_formatter.py -vProject structure
src/markpost/
server.py # FastMCP server — ping, publish_post, preview_post
config.py # TOML config loading
formatter.py # markdown_to_plain, split_into_thread, markdown_to_html
publishers/
twitter.py # Twitter/X via tweepy
threads.py # Threads via httpx (async)
blog.py # S3 upload via boto3License
Apache 2.0
Available Tools
3 toolspingB
Health check tool.
Inputs: no named parameters. Returns: Generic wrapper for non-object return types.
preview_postA
Preview how content will be formatted for each platform.
Returns the formatted text and thread splits without actually publishing. Use this to verify formatting before calling publish_post.
Inputs: content (required), title, platforms. Returns: object
publish_postA
Publish Markdown content to social media and/or a static blog.
Formats content appropriately for each platform:
Twitter/X: Converts to plain text, auto-splits into threads at 280 chars
Threads: Converts to plain text, auto-splits into threads at 500 chars
Blog: Renders full HTML and uploads to S3
Inputs: content (required), slug, title, platforms. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
publish_post and preview_post are cleanly separated as actual publishing vs. dry-run preview, and ping is an obvious health check. No two tools overlap in purpose.
publish_post and preview_post follow a consistent verb_noun pattern, but ping breaks that pattern. The naming is still readable and predictable overall.
Three tools is a tight, well-scoped set: health check, preview, and publish. Each tool earns its place with no redundancy.
The preview-then-publish workflow covers the server's stated purpose well. Minor gaps like listing platforms or managing existing posts exist, but they fall outside the core publish/preview flow.
Maintenance
Related MCP Connectors
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted MCP server for AI agents to post to LinkedIn profiles and X and upload to YouTube.
FastMCP server for posting formatted content to X (Twitter) — Tollbooth-monetized, DPYC-native
PostHero MCP server — schedule and publish social media posts from any MCP-compatible AI tool
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that allows Claude to create, manage and publish X/Twitter posts directly through the chat interface.561MIT
- AlicenseCqualityDmaintenanceAn MCP server that converts Markdown content to Notion API-compatible formats, suitable for content management and development integration.11Apache 2.0
- FlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that repurposes text or URL content into platform-optimized posts for Twitter, LinkedIn, Instagram, and newsletters using AI. It enables users to automatically transform articles and blog posts into engagement-ready social media threads and professional captions.-
- AlicenseAqualityDmaintenanceMCP server for publishing threads to Threads and Twitter/X simultaneously from Claude Code. Journal your thoughts, convert them to viral threads, and post everywhere at once.13MIT