# Datomic Mcp Server

> 🚀 Datomic MCP Server

- **Type:** MCP server
- **Install:** `agentstack add mcp-xlisp-datomic-mcp-server`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [xlisp](https://agentstack.voostack.com/s/xlisp)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [xlisp](https://github.com/xlisp)
- **Source:** https://github.com/xlisp/datomic-mcp-server

## Install

```sh
agentstack add mcp-xlisp-datomic-mcp-server
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# ⚡ Datomic MCP Server

**AI. Query. Persist. Extend.**  
A robust Clojure-based MCP server designed for querying **Datomic** databases and integrating with AI-powered workflows.

---

## 🔍 Key Features

### 🗄️ Connect to Datomic (SQL / Dev / Cloud)

* Seamlessly connect to your Datomic database and run queries directly from AI workflows.  
* Works with **Datomic Pro** (SQL, Dev-local) and **Datomic Cloud** setups.

### 📂 Query entity relationships

### 📊 Aggregate queries & computations

### 🧾 Entity properties and history

* Explore entity attributes  
* Query temporal history (as-of, since)  
* Transaction-time navigation

---

## ⚙️ Getting Started

### ▶️ Run the MCP Server

Run with Clojure CLI:

```bash
clojure -X:mcp
````

Or from Emacs REPL:

```clojure
(mcp-server)
```

---

### ✅ Check Server Health

Use the following command to verify the MCP server is up and responding to JSON-RPC:

```bash
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0"}}}' \
| /usr/local/bin/clojure -M -m datomic-mcp.core
```

Expected response:

```
Datomic MCP Server running on STDIO transport.
{"jsonrpc":"2.0","method":"notifications/tools/list_changed"}
...
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"logging":{},"tools":{"listChanged":true}},"serverInfo":{"name":"datomic-server","version":"0.1.0"}}}
```

---

## 🖥️ MCP Client Configuration (Claude Desktop)

Example client setup for launching the server from Claude Desktop:

```json
{
    "datomic-mcp": {
      "command": "/bin/bash",
        "args": [
          "-c",
          "cd /Users/xlisp/CljPro/datomic-mcp-server && /usr/local/bin/clojure -M -m datomic-mcp.core"
        ]
    }

...

}
```

* Tools
  

---

## 🔮 Roadmap

inspired by https://github.com/xlisp/datascript-mcp-server

1. **Query live Datomic databases** 👉 connect to SQL / Dev-local / Cloud
2. **Hybrid queries across Datomic + DataScript** 👉 offline + persistent data https://github.com/xlisp/datascript-mcp-server
3. **Visualize Datomic relationships** 👉 [Visualization MCP Server](https://github.com/xlisp/visualization-mcp-server)
4. **Import/export datasets** 👉 transit, edn, or AI-generated inserts
5. **Filesystem MCP integration** 👉 browse schema & migrations https://github.com/xlisp/filesystem-mcp-server
6. **Support Datomic history queries** 👉 temporal navigation (as-of, since, history)

---

## Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

---

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

## FQA

### change list

- [x] Datomic in-memory database already supports
- [x] Connect any Datomic database url

### Run in JDK 17 (datomic client)

```
export JAVA_HOME="/Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home" #'/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home'
export PATH=$JAVA_HOME/bin:$PATH
export CPPFLAGS="-I/Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home/include"

```

### Run datomic transactor

* datomic-pro-1.0.6165 transactor must run on java 1.8 ( brew install openjdk@8 ), other jdk will errors `Execution error (ActiveMQInternalErrorException) at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl/sendBlocking (ChannelImpl.java:404).`
```
➜  datomic-pro-1.0.6165 ./rundatomic.sh
Launching with Java options -server -Xms4g -Xmx4g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
Starting datomic:sql://?jdbc:postgresql://localhost:5432/db123123?user=postgres&password=123456, you may need to change the user and password parameters to work with your jdbc driver ...

```

---

**Built with Clojure. Powered by Datomic. Inspired by the future of persistent querying.**
*In the Source we trust.*

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [xlisp](https://github.com/xlisp)
- **Source:** [xlisp/datomic-mcp-server](https://github.com/xlisp/datomic-mcp-server)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-xlisp-datomic-mcp-server
- Seller: https://agentstack.voostack.com/s/xlisp
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
