lu-mcp-server
The lu-mcp-server provides tools for working with Lingua Universale (LU), a formal protocol verification language for AI agent communication.
Parse Protocol Definitions (
lu_load_protocol): Load and parse.luprotocol text to extract structure including name, roles, steps, choices, and declared properties.Verify Session Messages (
lu_verify_message): Validate whether a message is correct at a given point in an ongoing session by replaying message history and checking the next intended message — catching violations like wrong sender, wrong turn, or incorrect message order.Check Formal Properties (
lu_check_properties): Statically verify declared safety properties such asalways_terminates,no_deadlock,no_deletion, andall_roles_participate, with optional Lean 4 formal proof.List Standard Library Templates (
lu_list_templates): Browse 20 built-in verified protocol templates across 5 categories (communication, data, business, ai_ml, security), with optional category filtering.
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 nextThe protocol says reviewer goes next. The runtime blocks it. Not because you trust the code -- because the session type makes it impossible.
Related MCP server: agent-passport-system-mcp
Install
pip install cervellaswarm-lingua-universaleOr 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 participateThen 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 |
|
20 stdlib protocols | AI/ML, Business, Communication, Data, Security -- ready to use |
Linter + Formatter |
|
LSP server | Diagnostics, hover, completion, go-to-definition, formatting |
VS Code extension | |
Interactive chat |
|
Browser playground | Try it now -- Check, Lint, Run, Chat |
Lean 4 bridge | Generate and verify mathematical proofs |
REPL |
|
Project scaffolding |
|
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 serverCI 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 VIOLATEDLU 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:
Agent Orchestration -- 3 AI agents with nested choice, 8/8 properties proved
Live Runner -- Real Claude API agents on a verified protocol
Standard Library -- 20 verified protocols across 5 categories
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 |
AST-powered code understanding (tree-sitter, PageRank) | |
Lifecycle hooks for Claude Code agents | |
Agent definition templates & team configuration | |
Deterministic task routing & validation | |
Multi-agent process management | |
Persistent session context across conversations | |
Immutable event logging & audit trail | |
Automated quality checks & scoring |
All Apache 2.0, Python 3.10+, tested, documented.
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Bug reports: GitHub Issues
Security: See SECURITY.md for responsible disclosure
License
Apache License 2.0 -- see LICENSE.
Copyright 2025-2026 CervellaSwarm Contributors.
Lingua Universale -- Verified protocols for AI agents.
Playground | LU Debugger | PyPI | VS Code | Blog | Colab Demo
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceSecurity co-pilot for AI agents. Scans for vulnerabilities like prompt injection, infinite loops, and token bombing in AI Agents, audits MCP servers, verifies AGENTS.md governance, and generates EU AI Act compliance reports.Last updated10433Apache 2.0
- AlicenseCqualityAmaintenanceCryptographic identity and trust protocol for AI agents. 38 MCP tools across 8 protocol layers: Ed25519 identity, delegation chains, values compliance, signed communication, policy engine, task coordination, cross-layer integration, and agentic commerce. 264 tests passing.Last updated1004111Apache 2.0
- FlicenseAqualityDmaintenanceIntegrates the Quint formal specification language into LLM workflows for accessible formal verification. It provides tools for type-checking, random simulation, exhaustive model checking, and syntax documentation.Last updated62
- AlicenseCqualityBmaintenanceAgent-first programming language: agents produce JSON AST, the compiler validates, type-checks, effect-checks, verifies contracts via Z3/SMT, and compiles to WASM. 19 MCP tools for the full compile-and-execute loop.Last updated224858MIT
Related MCP Connectors
The team layer for AI coding agents: shared contracts, collision alerts, E2EE sessions.
The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/rafapra3008/cervellaswarm'
If you have feedback or need assistance with the MCP directory API, please join our Discord server