Skip to main content
Glama
lollix91

dali2-logic-reasoner

by lollix91

DALI2-Agent-Brain-MCP

MCP server that exposes the DALI2-Agent-Brain logic reasoner as a set of tools for any MCP-compatible client (Unsloth Studio, Claude Desktop, Cursor, etc.).

What it does

The DALI2-Agent-Brain is a symbolic verification system: an LLM proposes an answer, then a Prolog meta-interpreter formally verifies it. This MCP server lets external chat clients call that verification pipeline as a tool.

Unsloth Studio chat  ──MCP──►  dali2-mcp-server  ──REST──►  DALI2-Agent-Brain
 (LLM generates                  (this repo)                 (Prolog verifier)
  a response)                                                  │
                                                               ▼
                                                    verified / unverified
                                                    + derivation trace

Tools exposed

Tool

Description

solve_and_verify

Submit a reasoning problem; get a formally verified answer + trace

verify_reasoning

Submit a claim + evidence for standalone logical verification

check_status

Check if the DALI2 brain is reachable and AI is configured

Prerequisites

  1. DALI2-Agent-Brain running — start it from the main repo:

    cd DALI2-Agent-Brain
    start.bat sk-or-YOUR_OPENROUTER_KEY

    This brings up Redis + DALI2 + the GUI on http://localhost:8090.

  2. Python 3.10+ with the MCP dependencies:

    pip install -r requirements.txt

    Or with uv:

    uv sync
  3. Copy .env.example to .env and adjust if needed:

    cp .env.example .env

Configuration for Unsloth Studio

Use mcp_config.json (or mcp_config_uv.json if using uv):

{
  "mcpServers": {
    "dali2-logic-reasoner": {
      "command": "python",
      "args": ["-m", "dali2_mcp.server"],
      "env": {
        "DALI2_URL": "http://localhost:8090"
      }
    }
  }
}

Paste this into the Unsloth Studio MCP tools configuration panel. Adjust DALI2_URL if the DALI2-Agent-Brain runs on a different host/port.

If you use uv as your Python package manager, use mcp_config_uv.json instead:

{
  "mcpServers": {
    "dali2-logic-reasoner": {
      "command": "uv",
      "args": ["run", "dali2-mcp"],
      "env": {
        "DALI2_URL": "http://localhost:8090"
      }
    }
  }
}

Running the server manually (for testing)

python -m dali2_mcp.server

The server communicates over stdio (standard MCP transport). It will wait for JSON-RPC messages on stdin and respond on stdout.

How it works

  1. The MCP client (e.g. Unsloth Studio chat) calls a tool like solve_and_verify with a reasoning question.

  2. This server forwards it as POST /api/ask to the DALI2-Agent-Brain GUI.

  3. The DALI2 brain:

    • Classifies the task (syllogism, propositional, argument, math)

    • Asks the LLM to propose a structured answer

    • Runs the symbolic verifier (finite model checker / truth-table checker / arithmetic verifier)

    • Returns: answer, verified (true/false), and a derivation trace

  4. This server formats the result and returns it to the chat client.

The key property: a wrong-but-confident LLM answer is never accepted, because acceptance is gated by symbolic verification.

Project structure

DALI2-Agent-Brain-MCP/
├── src/dali2_mcp/
│   ├── __init__.py
│   └── server.py          MCP server (stdio transport)
├── mcp_config.json        Config for Unsloth Studio (pip install)
├── mcp_config_uv.json     Config for Unsloth Studio (uv)
├── requirements.txt       Python dependencies
├── pyproject.toml         Package metadata + entry point
├── .env.example           Environment variable template
└── README.md

Environment variables

Variable

Default

Description

DALI2_URL

http://localhost:8090

URL of the DALI2-Agent-Brain GUI

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lollix91/DALI2-Agent-Brain-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server