A Model Context Protocol server gives an AI assistant a short list of tools it can call, and nothing else. I am an AI automation engineer in the Philippines, and I run my daily work through servers I wrote myself. Here they are.
The servers I wrote
| Server | What it gives the AI | Built in | Tools | Writes guarded by |
|---|---|---|---|---|
| GHL workflow kit | Read, build and publish HighLevel workflows | Node.js, stdio | 13 | Allowlist, confirm phrase, backup, read-back |
| HighLevel API access | Any official API call with the right account token | Python, stdio | 12 | A confirm flag on every write, backup, draft, validate |
| Make.com | Scenarios and their modules | Node.js, stdio | 8 | Backup, an expected-value check, re-read |
| Sales dashboard | A rep’s own projects and commissions | TypeScript, HTTP with OAuth | 4 | Read-only, under the user’s own access rules |
| Music | A local music player | Python, stdio | 13 | None needed |
The first is public: highlevel-workflow-kit on GitHub. Its case study is the GHL workflow kit, and the dashboard server sits inside the sales and commission dashboard.
The sixth is not mine from scratch. My chat agents use an open-source WhatsApp server. I added the sending rules in Go and Python: single-use drafts, a bridge that listens only on the local machine, and a hook that checks for a human go. That design is in my guide to approval-gated agents.
The patterns that repeat
After the second server I stopped inventing safeguards and started reusing them.
- An allowlist per tenant. Each agency has its own config, and the server refuses any account that is not in it.
- A confirm phrase the plan step returns. The AI has to plan first to learn the phrase, so it cannot skip to the write.
- A backup before every write. Saved to disk first.
- A read-back after every write. The server does not trust its own request. It reads the record again.
- An expected-value check. The Make.com server will only change a field if its current value is what the AI said it expected. If someone edited it in between, the write stops.
- Secrets kept out of config. In my own servers, tokens sit in an encrypted file or in memory.
- Honest tool labels. Each tool is marked read-only or destructive, so the client can warn before it runs.
What broke, and what I changed
- One stray print broke the whole server. On the stdio transport, anything written to standard output is read as protocol. My Python server now sends every log line to standard error.
- A token refresh that never cleared. A refresh request that timed out was never cleared, so the browser extension kept opening tabs. The request is now cleared on timeout.
- Two agencies on one port. A shared local port mixed their sessions. Each agency now has its own.
- Requests the extension could not see. A browser extension needs permission for the page as well as the backend it calls, or the calls are invisible to it.
- A tool that returned too much. A full Make.com blueprint fills the AI’s context and pushes out the task. So the server does not hand back whole blueprints.
- Rotating refresh tokens. A refresh token changes each time it is used. With several processes running, I keep a single token store with a lock across them.
- An OAuth issuer that almost matched. On the HTTP server, the issuer has to match the discovery document exactly.
- A send that timed out. A failed or timed-out send uses up the draft. The agent checks the chat instead of trying again.
Stdio or HTTP
Four of my servers use stdio. They run on my own machine, next to the files and sessions they need, and no port is open to the network. I use HTTP with OAuth for one case: the dashboard server, where each sales rep connects their own AI assistant and must see only their own numbers. There the server runs every query under that user’s access rules, and it has no write tools at all.
When to write your own
Use an official server when it covers what you need. I use plenty of them. Write your own when the official one stops short, when the product has no public API for the job, or when the write needs rules that only you know, such as which accounts are safe to touch.
A good first server has three read tools and no write tools. Add the first write only after you have a backup and a read-back for it.
Getting started
If you want Claude or another assistant to work inside your own systems, send the project brief with the tools it should reach. I reply with a written plan, then we continue on WhatsApp. The service page is AI agents and custom MCP servers. For workflow engines, see how I run n8n, and for the CRM side, GoHighLevel engineering.