About FlowCastle
FlowCastle provides a visual workflow platform, Telegram bot templates, and an MCP server for developers building bots with AI coding agents. Agents can inspect workspaces, validate flow actions, and apply changes that remain visually editable.
Key features
- 01Visual Telegram bot workflow builder
- 0223 JSON bot templates
- 0316 MCP tools for flow editing
- 04Validate and apply flow actions
- 05REST API for contacts and broadcasts
Use cases
- 01Draft a Telegram bot flow with an AI coding agent
- 02Start from and customize a bot template
- 03Inspect and edit flows visually after agent changes
MCP support
FlowCastle exposes a remote MCP server over Streamable HTTP. Its tools let MCP clients inspect workspaces, retrieve templates, validate proposed actions, and apply flow changes.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://api.flowcastle.ai/api/mcpclaude mcp add --transport http ai-flowcastle-flowcastle https://api.flowcastle.ai/api/mcp{"mcpServers":{"ai-flowcastle-flowcastle":{"type":"http","url":"https://api.flowcastle.ai/api/mcp"}}}Open in Cursor{"servers":{"ai-flowcastle-flowcastle":{"type":"http","url":"https://api.flowcastle.ai/api/mcp"}}}Open in VS Code{"mcpServers":{"ai-flowcastle-flowcastle":{"type":"http","url":"https://api.flowcastle.ai/api/mcp"}}}{"mcpServers":{"ai-flowcastle-flowcastle":{"serverUrl":"https://api.flowcastle.ai/api/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
https://api.flowcastle.ai/api/mcpAuth requiredTools
58This tool takes no parameters.
Details
From the project READMETelegram bot templates + MCP server for AI bot development
Ready-to-use Telegram bot templates and an MCP server — build, edit, and deploy Telegram bots from Claude Code, Codex, Cursor, or any MCP-capable AI agent. No SDK boilerplate: describe the bot, and your agent assembles the flow.

FlowCastle is a visual workflow builder for Telegram bots and web chat: flows, triggers, conditions, AI steps, payments (Stripe / YooKassa / Telegram Stars), broadcasts, drip sequences, and integrations (Gmail, Google Sheets, Notion, OpenAI, …) — with a REST API and an MCP server, so bot development works straight from your AI coding agent. Every block an agent creates through MCP is the same block you can drag, wire, and edit visually.
This repo is for developers. It contains:
| Path | What it is |
|---|---|
templates/ | 23 production bot templates as JSON — the same source that powers the template gallery and the MCP get_flow_example tool |
mcp/ | MCP server reference: endpoint, auth, all 16 tools, and a snapshot of the flow-action schema used by apply_actions |
Build a bot from your AI agent (MCP)
FlowCastle exposes an MCP server over Streamable HTTP:
POST https://api.flowcastle.ai/api/mcp
Authorization: Bearer <your-application-api-key> # starts with app_
Get a key: sign up → create an application → API page → MCP tab.
Claude Code
export FLOWCASTLE_MCP_TOKEN='<your-application-api-key>'
claude mcp add --transport http flowcastle https://api.flowcastle.ai/api/mcp \
--header "Authorization: Bearer $FLOWCASTLE_MCP_TOKEN"
Codex
codex mcp add flowcastle \
--url https://api.flowcastle.ai/api/mcp \
--bearer-token-env-var FLOWCASTLE_MCP_TOKEN
Cursor / any MCP client (JSON config)
{
"mcpServers": {
"flowcastle": {
"type": "http",
"url": "https://api.flowcastle.ai/api/mcp",
"headers": {
"Authorization": "Bearer <your-application-api-key>"
}
}
}
}
Then just ask your agent things like:
"Look at my FlowCastle workspace and add a lead-qualification flow: greet on /start, ask three button questions, save answers to contact variables, and notify me."
The agent reads your workspace with get_workspace_summary / get_flow_context, drafts a batch of flow-builder actions, checks it with validate_actions, and applies it with apply_actions. See mcp/README.md for the full tool reference.
Templates
Each JSON file in templates/ is a complete bot: metadata (title, summary, use-cases, suggested variables, required modules) plus a schemaExample.actions array — an ordered batch of create_flow / create_block / create_link / create_variable operations in the exact format apply_actions accepts.
Three ways to use them:
- One-click install from the gallery: flowcastle.ai/templates
- Via MCP — ask your agent to
search_flow_examples/get_flow_exampleand apply one (optionally customized) to your workspace - As reference — study how real flows wire triggers, conditions, wait-for-reply steps, payments, and AI blocks
Full index and format description: templates/README.md.
REST Public API
Application-scoped REST API for contacts, contact variables, goal events, flow sends, and broadcasts:
- Base URL:
https://api.flowcastle.ai/api/public/v1 - Interactive docs (Swagger): https://api.flowcastle.ai/api/public/docs
- OpenAPI spec: https://api.flowcastle.ai/api/public/openapi.json
Auth uses the same app_… application key (Authorization: Bearer or X-API-Key).
Guides
Step-by-step builds on the FlowCastle blog:
- Build a Lead Bot in Telegram in 10 Minutes
- Build an AI Support Bot for Telegram
- I Replaced My Morning Apps With One Telegram Bot
Links
- Product: https://flowcastle.ai
- Dashboard: https://dashboard.flowcastle.ai
- Template gallery: https://flowcastle.ai/templates
- API docs: https://api.flowcastle.ai/api/public/docs
Contributing
Found a bug in a template, or built a flow worth sharing? Open an issue or PR — templates are plain JSON, and validate_actions (via MCP) will tell you if a batch is well-formed.
License
The contents of this repository are licensed under the MIT License.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.