Lingua Universale MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install cervellaswarm-lingua-universale
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add cervellaswarm -- node "<FULL_PATH_TO_CERVELLASWARM>/dist/index.js"

Replace <FULL_PATH_TO_CERVELLASWARM>/dist/index.js with the actual folder you prepared in step 1.

README.md

A language for verified AI agent protocols.

Lingua Universale

A language for verified AI agent protocols.

**Try it in your browser** -- no install needed. **Watch AI agents live** -- 3 agents on a verified protocol.


The Problem

Your AI agents talk to each other, but nothing guarantees they follow the rules. Wrong sender, wrong message order, missing steps -- and you only find out in production.

Lingua Universale (LU) is a type checker for AI agent conversations. You define the protocol, LU proves it's correct, and the runtime enforces it.

from cervellaswarm_lingua_universale import Protocol, ProtocolStep, MessageKind, SessionChecker, TaskRequest

# Define: who sends what, to whom, in what order
review = Protocol(name="Review", roles=("dev", "reviewer"), elements=(
    ProtocolStep(sender="dev", receiver="reviewer", message_kind=MessageKind.TASK_REQUEST),
    ProtocolStep(sender="reviewer", receiver="dev", message_kind=MessageKind.TASK_RESULT),
))

checker = SessionChecker(review)
checker.send("dev", "reviewer", TaskRequest(task_id="1", description="Review auth"))  # OK
checker.send("dev", "reviewer", TaskRequest(task_id="2", description="Oops"))         # ProtocolViolation!
#                                                                                      ^^^ wrong turn: reviewer must send next

The protocol says reviewer goes next. The runtime blocks it. Not because you trust the code -- because the session type makes it impossible.


Install

pip install cervellaswarm-lingua-universale

Or try it first: **Playground** (runs in your browser via Pyodide).


Write a Protocol

protocol DelegateTask:
    roles: supervisor, worker, validator

    supervisor asks worker to execute analysis
    worker returns result to supervisor
    supervisor asks validator to verify result

    when validator decides:
        pass:
            validator returns approval to supervisor
        fail:
            validator sends feedback to supervisor

    properties:
        always terminates
        no deadlock
        no deletion
        all roles participate

Then verify it:

lu verify delegate_task.lu
  [1/4] always_terminates  ... PROVED
  [2/4] no_deadlock        ... PROVED
  [3/4] no_deletion        ... PROVED
  [4/4] all_roles_participate ... PROVED

  All 4 properties PASSED.

Mathematical proof. Not a test that passes today and fails tomorrow.


What You Get

Feature Description
Full compiler Tokenizer, parser (64 rules), AST, contract checker, Python codegen
9 verified properties always_terminates, no_deadlock, no_deletion, role_exclusive, and more
20 stdlib protocols AI/ML, Business, Communication, Data, Security -- ready to use
Linter + Formatter lu lint (10 rules) + lu fmt (zero-config, like gofmt)
LSP server Diagnostics, hover, completion, go-to-definition, formatting
VS Code extension Install from Marketplace
Interactive chat lu chat -- build protocols conversationally (English, Italian, Portuguese)
Browser playground Try it now -- Check, Lint, Run, Chat
Lean 4 bridge Generate and verify mathematical proofs
REPL lu repl for interactive exploration
Project scaffolding lu init --template rag_pipeline from 20 verified templates

36 modules. 3920 tests. Zero external dependencies. Pure Python stdlib.


CLI

lu check file.lu          # Parse and compile
lu verify file.lu         # Formal property verification
lu run file.lu            # Execute
lu lint file.lu           # 10 style and correctness rules
lu fmt file.lu            # Zero-config auto-formatter
lu chat --lang en         # Build a protocol conversationally
lu demo --lang it         # See the La Nonna demo
lu init --template NAME   # Scaffold from stdlib templates
lu mcp-audit --manifest t.json  # Audit MCP server protocols
lu repl                   # Inte

Tools (4)

parse_protocolsParses and compiles protocol definitions into an AST.
verify_messagesValidates message sequences against defined session types.
check_safety_propertiesPerforms formal verification of safety properties like deadlock freedom.
browse_stdlib_templatesLists and retrieves available standard library protocol templates.

Configuration

claude_desktop_config.json
{"mcpServers": {"cervellaswarm": {"command": "lu", "args": ["mcp-server"]}}}

Try it

Verify the safety properties of my current protocol file to ensure no deadlocks exist.
List all available standard library templates for RAG pipelines.
Parse my protocol definition and check if it satisfies the 'always terminates' property.
Audit my current MCP server manifest for protocol compliance.

Frequently Asked Questions

What are the key features of Lingua Universale?

Formal verification of AI agent protocols for safety and correctness. Enforces runtime rules for message order and role participation. Includes 20 verified standard library templates for common agent patterns. Supports mathematical proof generation via Lean 4 bridge. Provides LSP server for diagnostics, hover, and completion.

What can I use Lingua Universale for?

Ensuring multi-agent systems follow strict communication protocols without runtime errors. Formally proving that agent workflows will always terminate and never deadlock. Scaffolding new agent projects using verified standard library templates. Auditing existing MCP server manifests for protocol consistency.

How do I install Lingua Universale?

Install Lingua Universale by running: pip install cervellaswarm-lingua-universale

What MCP clients work with Lingua Universale?

Lingua Universale works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Lingua Universale docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare