mcp-review-gate-example
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., "@mcp-review-gate-example draft a follow-up email to Sarah about the launch delay"
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.
mcp-review-gate-example
A small Model Context Protocol server in TypeScript that shows one pattern I use in production: the model can propose an outgoing email, SMS or post, but it can't send or approve anything. Drafts wait in a queue until a person reviews them.

Why
When an agent can send messages on someone's behalf, one bad tool call goes straight to a customer. Keeping the approve step out of the model's tool list is a simple fix. The model gets a tool that writes a draft, and the approval lives somewhere only a person can reach (here, a CLI; in a real app, an admin screen or a chat approval card).
flowchart LR
A[AI client<br/>Claude, Cursor, etc.] -- propose_message --> S[MCP server]
S -- saves draft<br/>status: pending_review --> Q[(drafts.json)]
R[Person running<br/>npm run review] -- approve / reject --> Q
Q -- approved drafts only --> X[Your sender<br/>not included]Related MCP server: douyin-lead-workbench MCP Server
Tools
Tool | What it does | Side effects |
| Counts characters, words and sentences and estimates reading time | None |
| Saves an email, SMS or post as a draft with status | Writes one draft. Sends nothing. |
| Lists drafts, optionally filtered by status | None |
There is no approve or send tool on purpose. Approval is in src/review-cli.ts, which the model can't call.
Run it
Requires Node 20 or later.
npm install
npm run build
npm test # 4 tests, using the SDK's in-memory transport
node examples/client.mjs # starts the server over stdio and proposes a draft
npm run review # list drafts waiting for review
npm run review -- approve <id> "optional note"
npm run review -- reject <id> "optional note"Drafts are stored in drafts.json in the current folder. Set DRAFTS_FILE to use another path.
Use it from an MCP client
Add it to your client's MCP config (Claude Desktop, Cursor and others use this shape):
{
"mcpServers": {
"review-gate": {
"command": "node",
"args": ["/absolute/path/to/mcp-review-gate-example/dist/src/index.js"],
"env": { "DRAFTS_FILE": "/absolute/path/to/drafts.json" }
}
}
}Then ask the assistant to draft a follow-up email. It will call propose_message, tell you the draft id, and stop there.
Files
src/drafts.ts JSON-file draft store (swap for a database table in real use)
src/server.ts MCP server and its three tools
src/index.ts stdio entry point
src/review-cli.ts the human side: list, approve, reject
test/ node:test tests against the server through an in-memory client
examples/client.mjs a minimal stdio clientTaking it further
Store drafts in a database with row-level security so only reviewers can change status.
Send approved drafts from a separate worker that checks the status again right before sending.
Record who approved what and when (the store already keeps
reviewerandreviewedAt).
License
MIT
Available Tools
3 toolslist_draftsList draftsBRead-only
List saved drafts and their review status.
Inputs: status.
propose_messagePropose a message for human reviewA
Save an outgoing email, SMS or post as a draft for a person to review. Nothing is sent. The draft stays pending until someone approves it with the review CLI.
Inputs: to (required), body (required), channel (required), subject.
text_statsText statsARead-only
Count characters, words and sentences in a piece of text and estimate reading time.
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a clearly different operation: text analysis, draft creation, and draft listing. The only mild wrinkle is text_stats, which is a generic utility that sits oddly beside the review-gate workflow, but it is not confusable with the other two.
All names use consistent snake_case, which is good. However, propose_message and list_drafts follow a verb_noun pattern while text_stats is noun-first, a minor deviation from the otherwise predictable convention.
Three tools is on the thin side for a review-gate server, and one of them (text_stats) is a peripheral utility rather than core functionality. The set is small enough to be scoped but borders on under-specified.
The draft lifecycle is incomplete: agents can create and list drafts but cannot approve, reject, retrieve a single draft, or delete/withdraw one—approval is only possible via an external CLI. This is a significant gap for the stated review-gate purpose and will cause dead ends for an agent trying to complete the workflow.
Maintenance
Related MCP Connectors
Approval-first social & video publishing for creators and AI agents. Drafts require human approval.
Email and SMS marketing from your AI assistant: contacts, campaigns, stats, sends with approval.
Approval layer for AI agent email: check drafts and send through a gate that holds risky mail.
Draft, schedule and publish social media posts from AI agents, under workspace approval rules.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents to create, list, update, and delete Microsoft 365 email drafts, with a hard guarantee that no message can be sent automatically, ensuring human review before any email goes out.1236 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to read status and records, control collection tasks, prepare drafts, and execute approved queues, with manual approval required before sending.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to write, preview, publish, schedule, and track posts across X, LinkedIn, Bluesky, Mastodon, Pinterest, TikTok, and YouTube with per-network cost receipts and an explicit user approval step. Also supports voice writing, media uploads, trend finding, and queue management through natural language.MIT
- AlicenseNot gradedqualityCmaintenanceEnables an AI agent to request human approval before sending anything, check approval status, and claim approved text exactly once. Human reviewers can approve, edit, or reject drafts, with no tool available for the agent to approve itself.MIT