Schedule Mastodon posts with OpenAI API
The OpenAI API is for developers who build their own agent, so a Mastodon post here is a feature in your product rather than a chat you have by hand. You pass Tesselith's MCP server to the Responses API as a hosted tool, and your code decides when the model drafts or queues a post. Because the model calls tools without you in the loop, keep allowed_tools tight and never let a publish run unconfirmed.
1. Connect OpenAI API
Then connect Mastodon in Tesselith under Channels. How Mastodon scheduling works.
2. Ask for a Mastodon post
What people use OpenAI API for on Mastodon
Drafting a post for each newsletter issue
A developer runs a small newsletter service. When an issue is published, a webhook calls their code, which sends the issue text and its link to the Responses API with Tesselith's MCP server attached. The model creates a draft, and the writer approves it in Tesselith before anything is queued. The code never calls a publish tool.
A press release to three posts for a university
A marketing team at a university builds an internal form where staff paste a press release. The app asks the model for three Mastodon posts aimed at three audiences, and the model uses list_channels to pick the right account for each. Each post comes back as a draft in Tesselith, and the communications lead chooses which ones to schedule.
Turning a new-arrivals spreadsheet into drafts
An online shop keeps a spreadsheet of new arrivals. A nightly job reads the rows added that day and asks the model for a Mastodon post for each product, under 500 characters, with the product link at the end. The job creates drafts only, so a person reviews the batch each morning before any of it is scheduled.
Prompts to try in OpenAI API for Mastodon
Mastodon limits to keep in mind
Mastodon posts are limited to 500 characters on most servers, though some servers allow more. Every link counts as 23 characters. Tesselith checks drafts against these before they can be scheduled, so OpenAI API gets a clear error instead of a failed post.
Tips for Mastodon posts written with OpenAI API
- Restrict allowed_tools to what the job needs. A drafting job needs create_draft and list_channels, not publish_now. An open tool list lets the model reach actions your code never meant to expose.
- Keep the confirmation step for publish and delete in your own flow too. Tesselith asks for confirmation on both, so pass that step through to a person instead of auto-confirming it in code.
- Put the platform's limit in the prompt. Mastodon allows 500 characters on most servers, and every link counts as 23. Without that number, a model tends to write long drafts you then have to trim.
- Keep the Tesselith key on your server, not in client code. The key gives the model access to your workspace, so load it from an environment variable such as TESSELITH_API_KEY.