Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

rafapra3008/cervellaswarm MCP server](https://glama.ai/mcp/servers/rafapra3008/cervellaswarm/badges/score.svg)](https://glama.ai/mcp/servers/rafapra3008/cervellaswarm) 🐍 🏠 🍎 πŸͺŸ 🐧 - Verify AI agent communication protocols using session types.

README.md

<div align="center">

Lingua Universale

A language for verified AI agent protocols.

![PyPI](https://pypi.org/project/cervellaswarm-lingua-universale/) ![Tests](packages/lingua-universale/) ![License: Apache 2.0](LICENSE) ![Zero Dependencies](packages/lingua-universale/) ![VS Code](https://marketplace.visualstudio.com/items?itemName=cervellaswarm.lingua-universale) ![Discord](https://discord.gg/bvUBuejXxV)

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

</div>

---

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 |

37 modules. 3979 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 visualize file.lu      # Generate Mermaid sequence diagram
lu mcp-audit --manifest t.json  # Audit MCP server protocols
lu repl                   # Interactive REPL
lu lsp                    # Start LSP server

---

CI Integration

Add protocol verification to your GitHub Actions workflow:

# .github/workflows/lu-check.yml
on:
  push:
    paths: ["**/*.lu"]

jobs:
  lu-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - run: pip install cervellaswarm-lingua-universale
      - run: lu lint protocols/
      - run: lu verify protocols/

Exit code is non-zero on violations -- works with any CI system.

---

How It Works

LU is built on multiparty session types (Honda, Yoshida, Carbone -- POPL 2008). Session types describe communication protocols as types: if two processes follow the same session type, they cannot deadlock, messages cannot arrive in the wrong order, and the conversation always terminates.

The pipeline:

.lu source β†’ Tokenizer β†’ Parser β†’ AST β†’ Spec Checker β†’ Lean 4 Proofs β†’ Python Codegen
                                           ↓
                                    PROVED or VIOLATED

LU doesn't replace your AI agent framework. It makes it safe. Like TypeScript for JavaScript -- you keep your tools, you add guarantees.

---

Examples

LU Debugger -- Live web app: 3 AI agents (Customer, Warehouse, Payment) communicate on a verified OrderProcessing protocol. Click "Break" to see a protocol violation blocked in real time. Source code.

See the examples/ directory:

Or try the interactive Colab notebook -- 2 minutes, zero setup.

---

More from CervellaSwarm

Lingua Universale is the core project by CervellaSwarm. We also publish these Python packages:

| Package | What it does | |---------|-------------| | code-intelligence | AST-powered code understanding (tree-sitter, PageRank) | | agent-hooks | Lifecycle hooks for Claude Code agents | | agent-templates | Agent definition templates & team configuration | | task-orchestration | Deterministic task routing & validation | | spawn-workers | Multi-agent process management | | session-memory | Persistent session context across conversations | | event-store | Immutable event logging & audit trail | | quality-gates | Automated quality checks & scoring |

All Apache 2.0, Python 3.10+, tested, documented.

---

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

---

License

Apache License 2.0 -- see LICENSE.

Copyright 2025-2026 CervellaSwarm Contributors.

---

<div align="center">

Lingua Universale -- Verified protocols for AI agents.

Playground | LU Debugger | PyPI | VS Code | Blog | Colab Demo

</div>

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Cloud & DevOps servers.