Modex is a Clojure library implementing the Model Context Protocol, enabling developers to augment AI models with tools, resources, and prompts without relying on Java SDKs or proxies.
Modex is a Clojure library implementing the Model Context Protocol (MCP) for augmenting AI models with tools, resources, and prompts, eliminating the need for the Anthropic Java SDK or proxies like mcp-proxy. It supports the stdio
transport.
Modex allows you to define tools using the tool
and tools
macros, and invoke them with invoke-tool
. You can create an MCP server using the AServer
protocol, defining capabilities, tools, prompts, and resources. The library includes example tools like Datomic MCP for database querying.
The project provides a step-by-step guide to build an uberjar, configure Claude Desktop to use Modex as an MCP server, and interact with defined tools. Modex implements the JSON-RPC 2.0 wire format for communication.
The project is actively developed with passing tests, ergonomics, and tool support. Future plans include nREPL integration, resource and prompt support, and SSE implementation. It is licensed under GPLv3 for non-commercial use, with a commercial license available.
theronic/modex
March 5, 2025
March 28, 2025
Clojure