Exposes a Modex MCP server that adds model context tools to Claude Desktop via standard MCP transport.
Configuration
View docs{
"mcpServers": {
"theronic-modex": {
"command": "java",
"args": [
"-jar",
"/Users/your-username/code/modex/target/modex-mcp-0.2.2.jar"
]
}
}
}Modex provides a Model Context Protocol (MCP) server and client library written in Clojure. It lets you expose tools, resources, and prompts to AI models through the MCP workflow, letting you connect with MCP clients like Claude Desktop to augment models with database queries, prompts, and workflows in a streamlined, native Clojure implementation.
You use Modex by building an MCP server as a standalone Java process and connecting an MCP client to it. The server exposes tools you define, which the AI model can invoke to obtain data, perform calculations, or run workflows. Start the server, then configure your client to load the server so the model can call the exposed tools and receive results.
Prerequisites you need installed on your machine before building and running Modex:
Step-by-step install and setup you can follow:
git clone https://github.com/theronic/modex.git
cd modex
# Build the uberjar (Java executable) for the MCP server
./build.sh
# The build outputs an executable JAR, e.g. target/modex-mcp-0.2.2.jar
# Take note of the actual jar name from the build output.Configure your MCP client (Claude Desktop) to connect to the Modex MCP server. You will add an MCP server entry that runs the uberjar with Java. The following configuration snippet shows how Claude Desktop should start the Modex MCP server.
{
"mcpServers": {
"modex": {
"command": "java",
"args": ["-jar", "/Users/your-username/code/modex/target/modex-mcp-0.2.2.jar"]
}
},
"globalShortcut": ""
}The Modex MCP server uses a stdio transport, so Claude Desktop communicates with the server process via stdin/stdout pipes. You can restart Claude Desktop to pick up changes to the server configuration. If you need to modify tools or repackage, rebuild the uberjar and restart the client.
Tools are defined using a macro-based approach to describe their arguments, documentation, and behavior. Examples below describe concrete tools and how they are invoked.
Create a Modex MCP server instance by specifying the server name, version, an initialization function, and the set of tools you want to expose. Then start the server to listen for MCP client requests.
Greets a person by name using a simple template. The tool exposes a string input for the name and returns a friendly greeting.
Adds two numbers. The tool takes two numeric inputs, x and y, and returns their sum. It demonstrates parameter typing and required vs optional parameters.
Subtracts the second number from the first. The tool takes two numeric inputs a and b and returns a minus b.
Demonstrates a tool that throws an exception to show how errors are handled by the Modex server and client.