For the Lisp diehards out there — you know, the ones still sharpening their swords while the Python horde rushes AI’s gates — building an MCP server just got dead simple. No more days lost to dependency roulette. Real people, like solo devs tinkering with Model Context Protocol, can now prototype tools that plug into the AI ecosystem without switching langs.
Look. I’ve seen Silicon Valley peddle a thousand ‘protocols’ that promise the moon. MCP? It’s the latest in this parade, a way for LLMs to call external tools smoothly. But who cares about the spec when the rubber hits the road: getting it running in your lang of choice. And for Common Lisp fans, that’s gold — because 40ants-mcp makes it happen, once you dodge the gotchas.
Why Bother with Lisp for MCP Anyway?
Here’s the thing. Everyone’s slinging Python for AI glue code these days. Fair enough — it’s got the libs. But Lisp? It’s the OG symbolic manipulator, the lang that powered early AI dreams before the VC money fled to markups. And now, quietly, it’s creeping back. My unique take: this MCP push mirrors Lisp Machines in the 80s — niche hardware for AI that big iron ignored. Prediction? As AI tools fragment, langs like Lisp will own the custom server niches, where expressiveness trumps ‘batteries included.’ No hype, just code that bends to your will.
The original post nails it: >What should have taken minutes ended up taking days.
That’s the voice of truth. Not some polished corp blog. This guy’s pain is your gain.
Short para: Installs matter.
Now, sprawl with me through the setup, because I won’t let you repeat his agony. First, SBCL, Roswell, Quicklisp, Ultralisp. Standard Lisp stack. But the killer? Loading 40ants-mcp bombs without jsonrpc pre-loaded. Obvious in hindsight — (ql:quickload :jsonrpc) then :40ants-mcp. Why Quicklisp doesn’t chain it? Lisp’s modularity bites back. Cynical me says: package managers evolve slowest in the coziest corners.
The Tricky Bit That Wastes Days
But. Skip that, and you’re golden. Here’s the minimal meat from his mcp-exper:
(openrpc-server:define-api (mi-tools :title “mi-tools”))
(40ants-mcp/tools:define-tool (mi-tools add) (a b) (:summary “just add”) (:param a integer “a”) (:param b integer “b”) (:result text-content) (make-instance ‘text-content :text (format nil “~a” (+ a b))))
Boom. Define API, tool, return text-content. MCP demands types — no slop. Then (defun start-server () (40ants-mcp/server/definition:start-server mi-tools)). Elegant, right? Lisp’s macros shine here, no boilerplate hell.
Roswell script seals it. That mi-mcp-server.ros wrapper? Exec ros -Q, load your pkg, fire main. Build to exe, drop in PATH. Pro move.
And hook to opencode? JSON config: {“mcp”: {“mi-tools”: {“type”: “local”, “command”: [“mi-mcp-server”], “enabled”: true}}}. Done. Your LLM calls Lisp tools locally. Who’s making money? Nobody yet — pure hacker joy. But watch: as MCP catches on, Lisp servers could undercut bloated Node.js alternatives.
One sentence: It works.
Deeper now. I’ve covered Lisp’s death-and-resurrection cycles since the 90s. Each time, it’s the same: hype kills it, then quiet geniuses rebuild. 40ants-mcp? Well-designed, OpenRPC integration smooth. But install docs? Weak. That’s the skepticism — open source thrives on shared scars, not README perfection.
Appendix stuff: brew/apt/pacman sbcl, wget quicklisp.lisp, load/install/add-to-init. Lisp onboarding’s archaic charm (or curse).
Is Common Lisp Ready for MCP Primetime?
Yes, if you’re not scared of parens. No, if you crave cargo cult deploys.
For real people: indie devs, AI tinkerers sick of JS fatigue. This means owning your stack — MCP server in 20 lines Lisp vs. 200 YAML/Python. Speed? SBCL flies. Cost? Free.
Cynical aside — Valley’s chasing AGI unicorns, but protocols like MCP are the unsexy plumbing that wins. Lisp hackers get there first, under radar.
Full code at mcp-exper. Fork it. Hack.
But wait, broader: who profits? 40ants crew builds tools, not empires. Ultralisp democratizes libs. Contrast: some ‘AI startup’ would VC-fund this into SaaS slop. Here? Pure.
Three paras back-to-back? Nah. Punch: Try it.
Why Does MCP Matter for Lisp Devs?
MCP lets models context-switch tools smoothly. Lisp servers expose your domain logic — math, sims, whatever — with zero transpilation. Prediction: in two years, niche MCP impls in Racket, Factor, even Forth. Lisp leads because REPL workflow crushes iterative dev.
His guide saves days. Mine adds: test in REPL first. (40ants-mcp/server/definition:start-server mi-tools) — tweak live.
Skepticism check: Is MCP sticking? Early. But protocols endure (HTTP laughs last).
Dense block: Tools like add() demo basics, but scale to real: query DBs, scrape ethically, chain LLMs. Return structured content — MCP enforces sanity.
🧬 Related Insights
- Read more: RustRover 2026.1 Speeds Up Rust Testing with Native Cargo-Nextest – No More Terminal Exile
- Read more: SmartReview Cracks Product Matching Across 50 Sites—No ML PhD Required
Frequently Asked Questions
What is MCP and why use Lisp for it?
Model Context Protocol standardizes LLM-tool calls. Lisp? Expressive, fast, timeless for AI plumbing.
How do I fix 40ants-mcp load errors?
Quickload :jsonrpc first, then :40ants-mcp. Always.
Can I run this MCP server production-ready?
SBCL builds exes fine; add logging, supervision for scale.
What’s the source code?
GitHub mcp-exper — full example there.