Modex: Model Context Protocol Server & Client Library in Clojure
@theronic
Modex is a Clojure MCP Library to augment your AI models with Tools, Resources & Prompts using Clojure (Model Context Protocol). Implements MCP Server & Client.
概要
What is Modex: Model Context Protocol Server & Client Library in Clojure?
Modex is a Clojure library that augments AI models with tools, resources, and prompts by implementing the Model Context Protocol (MCP). It allows building MCP servers and clients entirely in native Clojure, using the stdio transport and requiring no Java SDK or proxy.
How to use Modex: Model Context Protocol Server & Client Library in Clojure?
Clone the repository, run ./build.sh to create an uberjar, then configure your Claude Desktop config to execute java -jar /path/to/uber.jar. Define tools with the tool macro and start the server with (server/start-server! my-mcp-server).
Key features of Modex: Model Context Protocol Server & Client Library in Clojure
- Implements MCP stdio transport (2024-11-05 spec).
- Native Clojure – no Java SDK or proxy needed.
- AServer protocol with DSL for tools, resources, and prompts.
- JSON-RPC 2.0 wire format for messages.
- Planned nREPL support for live changes.
Use cases of Modex: Model Context Protocol Server & Client Library in Clojure
- Expose production databases (e.g., Datomic) to AI models via MCP clients.
- Automate support queries by letting models read schema and run queries.
- Build custom AI tools that interact with Clojure systems and data.
FAQ from Modex: Model Context Protocol Server & Client Library in Clojure
Can I modify the server while an MCP client is connected?
Not yet, but nREPL support is planned to enable live changes without rebuilding the uberjar.
What license does Modex use?
GPLv3 for non-commercial use; a $20 perpetual commercial license is available for proprietary projects.
What transport does Modex implement?
Stdio/stdout transport is supported; SSE and streaming HTTP are in progress.
Does Modex support resources and prompts?
Resources and prompts are work in progress; currently only tools are fully supported.
What are the runtime requirements?
Java and Clojure; no external proxies or SDKs needed.