datomic
🚀 Datomic MCP Server
claude mcp add --transport stdio xlisp-datomic-mcp-server npx -y xlisp-datomic-mcp-server \ --env JAVA_HOME="path/to/java/home (optional: required if running Datomic client locally)" \ --env DATOMIC_URL="datomic:core:dev-local://localhost:4334/datomic-demo (adjust to your Datomic URL)"
How to use
This MCP server is built to connect to Datomic databases and expose AI-friendly tooling through JSON-RPC. It enables querying entity relationships, performing aggregate analyses, and exploring entity history with as-of, since, and transaction-time navigation. You can launch the server from a Clojure CLI environment or integrate it into an AI workflow by piping JSON-RPC payloads to STDIO. Once running, you can use the provided tools to query Datomic data, fetch attributes, and reason about relationships in familiar AI pipelines.
How to install
Prerequisites:
- Java (JDK 8+ recommended for certain Datomic components, or as required by your Datomic setup)
- Clojure CLI installed (clj, clojure) if you plan to run the MCP server directly from source
- Datomic database accessible (SQL, Dev-local, or Cloud) with appropriate credentials
Installation steps:
- Ensure Java is installed and JAVA_HOME is set if required by your environment.
- Install Clojure CLI: follow https://clojure.org/guides/install_clojure
- Install/prepare the MCP server package (if using an npm-based wrapper in this workflow, or ensure the repository is available locally):
- If using npm: npm install -g xlisp-datomic-mcp-server (depends on packaging)
- Start the MCP server using the recommended command from the README (example shown):
- clojure -X:mcp
- or (mcp-server) from an Emacs REPL as shown in the README
- Verify health by sending a JSON-RPC initialize message to STDIO or the configured transport, as described in the README.
Additional notes
Tips and common issues:
- Ensure your Datomic URL is reachable from the MCP server host. Network/VPN restrictions can block connections to Datomic Cloud or SQL endpoints.
- For Datomic transactor setups, ensure the correct Java version is used to avoid ActiveMQ-related errors.
- When using STDIO transport, make sure your tooling can consume and emit JSON-RPC 2.0 messages as shown in the health check example.
- If running via npx or npm wrappers, verify the package name and registry availability; local development may require adjusting the package reference to point to your local build.
- Environment variables like JAVA_HOME and DATOMIC_URL may need to be customized per environment. Use placeholders in the mcp_config and replace at deployment time.
- Monitor server logs for capabilities and tools list changes as you extend the MCP server with additional Datomic queries or transformations.
Related MCP Servers
modex
Modex is a Clojure MCP Library to augment your AI models with Tools, Resources & Prompts using Clojure (Model Context Protocol). Implements MCP Server & Client.
repl
Model Context Protocol Clojure support including REPL integration with development tools.
datascript
🚀 Datascript MCP Server
mcp-toolkit
a lib to build MCP clients and MCP servers in Clojure(script)
mcp
MCP Server library
clj -starter
Starter template to build MCP tools in Clojure (using Modex) (Model Context Protocol)