TUP MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
TUP MCP Server
Telepathy Universal Protocol โ Model Context Protocol Bridge
Secure, token-authenticated AI-to-AI collaboration across organizations.
๐ What is TUP MCP Server?
tup-mcp-server is an open-source Model Context Protocol (MCP) server that enables AI agents from different organizations to collaborate securely โ without sharing system prompts, private data, model weights, or internal memory.
It implements the Telepathy Universal Protocol (TUP), a governed AI-to-AI communication standard built on the principle of Zero-Shared-State.
Agents exchange structured Intents (operation type + encoded vector + cryptographic signature) instead of raw prompts. The open-source Reference Encoder provides basic encoding; TUP Core Enterprise provides advanced semantic compression.
Key Features
๐ Zero-Shared-State: Agents exchange structured Intents, never raw data or prompts.
๐ Token-Authenticated Relay: Session tokens protect against unauthorized access.
โก Streamable HTTP Relay: Stateless relay server using chunked HTTP streaming โ no WebSocket overhead.
๐งฎ 4-Fold Mathematical Validation: Condition number, round-trip, orthogonality, and eigenvalue stability checks.
๐ Reference Intent Encoder: Built-in deterministic text-to-vector encoder for open-source usage.
๐ Open Core Architecture: Works out-of-the-box with a pure-Python fallback; drops in the high-performance
telepathy-tupengine for enterprise speed.๐ก๏ธ DNS Rebinding Protection: Origin and Host header validation on every request.
Related MCP server: Hive
๐๏ธ Architecture
Multi-Agent Deployment
Each agent runs its own instance of mcp_server.py. The relay routes intents between independent instances.
Agent A's environment: Agent B's environment:
โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
โ Claude / GPT / etc. โ โ Claude / GPT / etc. โ
โ โ MCP (stdio) โ โ โ MCP (stdio) โ
โ mcp_server.py โ โ mcp_server.py โ
โโโโโโโโโโโโฌโโโโโโโโโโโโ โโโโโโโโโโโโฌโโโโโโโโโโโโ
โ โโโโโโโโโโโโ โ
โโโโโโโโโโโโค relay.py โโโโโโโโโโโโโโโ
โโโโโโโโโโโโ
(shared, stateless)Components
Component | License | Description |
| MIT | MCP server exposing TUP tools to Claude and other agents |
| MIT | Token-authenticated Streamable HTTP relay routing intents |
| MIT | Pure-Python reference TUP engine (ActionSpec, Intent, Channel) |
| MIT | Reference text-to-vector encoder using SHA-256 expansion |
| Proprietary | Optional high-performance Cython core (contact us) |
๐ Quick Start
Prerequisites
Python 3.10+
pip
Installation
# Clone the repository
git clone https://github.com/telepathy-TUP/tup-mcp-server.git
cd tup-mcp-server
# Install dependencies
pip install -e ".[dev]"Step 1: Run the Relay Server
python relay.py
# Relay starts at http://localhost:8001Step 2: Run the MCP Server
python mcp_server.pyStep 3: Configure Claude Desktop
Add the following to your Claude Desktop MCP configuration:
{
"mcpServers": {
"tup-mcp-server": {
"command": "python",
"args": ["path/to/mcp_server.py"],
"env": {
"TUP_RELAY_URL": "http://localhost:8001"
}
}
}
}๐ง MCP Tools
Tool | Mode | Description |
| โ | Registers with relay (token auth), starts stream listener |
| Recommended | Encodes text โ vector โ sends intent (Reference Encoder) |
| Advanced | Sends a pre-built vector as intent (for custom embeddings or TUP Core) |
| โ | Retrieves and clears received intents |
| โ | Retrieves latest intent with similarity interpretation |
| โ | Returns channel state, hash chain length, fallback indicator |
| โ | Transitions the channel state machine |
Example Usage
1. tup_connect(relay_url="http://localhost:8001", session_id="collab-01", role="agent_a", partner_role="agent_b")
2. tup_encode_and_send(session_id="collab-01", intent_text="Review the authentication module", operation="REVIEW")
3. tup_get_pending_intents(session_id="collab-01")
4. tup_decode_intent(session_id="collab-01")
5. tup_get_session_status(session_id="collab-01")๐ How Intent Encoding Works
The open-source version includes a Reference Intent Encoder that converts natural-language text into fixed-dimension vectors using deterministic SHA-256 hash expansion.
Encoding Pipeline
Text intent ("Review the auth module")
โ
SHA-256 hash expansion (iteration 0, 1, 2, ...)
โ
Convert 4-byte chunks to floats in [-1, 1]
โ
L2-normalize to unit vector
โ
vector=[0.123, -0.456, 0.789, ...] (N dimensions)What the Reference Encoder IS and IS NOT
Reference Encoder (MIT) | TUP Core (Enterprise) | |
Method | Deterministic hashing (SHA-256) | Proprietary semantic compression |
Output | Consistent fingerprints | Meaning-preserving representations |
Codebook | Uses existing ActionSpec operations | Adaptive, context-aware |
Best for | Coordination, routing, intent classification | Full semantic transfer between agents |
Speed | Standard Python | Optimized Cython |
Important: The Reference Encoder produces deterministic fingerprints, not semantic embeddings. The same input always produces the same vector, but similar meanings do NOT produce similar vectors. For production-grade semantic compression, visit telepathy-tup.com.
The ActionSpec System
TUP uses ActionSpec to classify intents with four parameters:
operation: Intent type (any string โ e.g., "ALIGN", "REVIEW", "SUMMARIZE")direction: Flow direction ("FORWARD" or "BACKWARD")cardinality: Input dimensionsoutput_dimensions: Output dimensions
Each ActionSpec is canonicalized and hashed with Blake2b for tamper-proof identification.
โ๏ธ Limitations & Token Impact
When TUP reduces token consumption (30โ80% reduction)
Multi-agent coordination where agents only need to exchange intentions
Workflows where agents already have context and just need to synchronize
High-frequency intent exchanges (the per-intent cost is a small HTTP payload)
When TUP does NOT reduce token consumption
Tasks where the full document/content must be shared between agents
Single-agent workflows with no inter-agent communication
Scenarios where the receiving agent needs the complete original text
MCP Schema Overhead
The 7 MCP tools add a fixed overhead per turn to the LLM context window. This is negligible in multi-turn agent collaboration but measurable in short single-turn interactions.
Zero-Shared-State โ Token Savings
Zero-Shared-State is a privacy and security property (no persistent memory between agents), not an efficiency metric. Token savings come from replacing full-text prompt exchange with compact intent vectors, which depends on the use case.
๐ Security
Token Authentication
The relay requires session tokens for all send/receive operations:
Agent registers role via
POST /session/{id}/register?role=agent_aRelay returns a unique
session_tokenAll subsequent
/sendand/streamcalls must include this tokenUnregistered roles cannot create queues or inject messages
DNS Rebinding Protection
All requests are validated against trusted Host and Origin headers. Requests from untrusted domains are rejected with 403 Forbidden.
Hash Chain Integrity
Every intent is appended to an immutable Blake2b hash chain, providing chronological audit tracking of all communications.
๐งฎ Mathematical Validation
The TUP engine implements rigorous 4-fold validation on transformation matrices:
Condition Number:
numpy.linalg.cond(A) โค 10ยนโฐRound-Trip Check:
A ร Aโปยน โ Iwith tolerance1e-8Orthogonality Check:
A ร Aแต โ I(norm-preserving optimization)Eigenvalue Stability:
|ฮป| โค 1for all eigenvalues (prevents divergence)
๐งช Running Tests
python -m pytest -vTests cover:
test_fallback_compatibility.pyโ Core math, state machine, hash integritytest_mcp_tools.pyโ MCP tool execution, matrix rejection, encode & decodetest_relay_flow.pyโ Token auth, DNS rebinding, unauthorized access rejectiontest_intent_encoder.pyโ Determinism, normalization, similarity, edge cases
๐ Project Structure
tup-mcp-server/
โโโ pyproject.toml # Package configuration & dependencies
โโโ mcp_config.json # Example Claude Desktop config
โโโ mcp_server.py # MCP server (FastMCP + dynamic fallback)
โโโ relay.py # Token-authenticated Streamable HTTP relay
โโโ tup_core_fallback.py # Pure-Python TUP engine (MIT)
โโโ intent_encoder.py # Reference text-to-vector encoder (MIT)
โโโ README.md # This file
โโโ tests/
โโโ test_fallback_compatibility.py
โโโ test_mcp_tools.py
โโโ test_relay_flow.py
โโโ test_intent_encoder.py๐ข Enterprise
For production-grade deployments with advanced semantic compression, adaptive codebooks, and Cython-optimized performance:
๐ Website: telepathy-tup.com
๐ง Contact: Enterprise inquiries
๐ฆ TUP Core: Drop-in replacement for
tup_core_fallback.pyโ no code changes needed
๐ License
This project is licensed under the MIT License. See LICENSE for details.
The optional high-performance engine telepathy-tup is proprietary and commercially licensed by the Telepathy team.
TUP MCP Server (Espaรฑol)
Telepathy Universal Protocol โ Puente de Protocolo de Contexto de Modelo
Colaboraciรณn segura entre agentes de IA con autenticaciรณn por token.
๐ ยฟQuรฉ es TUP MCP Server?
tup-mcp-server es un servidor de cรณdigo abierto compatible con MCP que permite a agentes de IA de distintas organizaciones colaborar de forma segura โ sin compartir prompts, datos privados ni memoria interna.
Los agentes intercambian Intents estructurados (tipo de operaciรณn + vector codificado + firma criptogrรกfica) en lugar de prompts de texto completo. El Reference Encoder de cรณdigo abierto proporciona codificaciรณn bรกsica; TUP Core Enterprise proporciona compresiรณn semรกntica avanzada.
Caracterรญsticas Principales
๐ Cero Estado Compartido: Los agentes intercambian Intents estructurados, nunca datos crudos.
๐ Relay con Autenticaciรณn por Token: Tokens de sesiรณn protegen contra acceso no autorizado.
๐ Reference Intent Encoder: Codificador texto-a-vector incluido para uso open source.
๐งฎ Validaciรณn Matemรกtica de 4 Niveles: Nรบmero de condiciรณn, round-trip, ortogonalidad y eigenvalores.
๐ Arquitectura Open Core: Funciona inmediatamente con Python puro; acepta
telepathy-tupcomo reemplazo para velocidad enterprise.
๐ Inicio Rรกpido
git clone https://github.com/telepathy-TUP/tup-mcp-server.git
cd tup-mcp-server
pip install -e ".[dev]"
# Terminal 1: Relay
python relay.py
# Terminal 2: MCP Server
python mcp_server.pyโ๏ธ Limitaciones y Transparencia
Cuรกndo TUP reduce tokens (30โ80%)
Coordinaciรณn multi-agente donde solo se intercambian intenciones
Flujos donde los agentes ya tienen contexto y solo necesitan sincronizarse
Cuรกndo TUP NO reduce tokens
Tareas donde el contenido completo debe compartirse entre agentes
Flujos de un solo agente sin comunicaciรณn inter-agente
Reference Encoder vs. TUP Core
El Reference Encoder genera fingerprints deterministas, no embeddings semรกnticos. Para compresiรณn semรกntica de nivel producciรณn, visite telepathy-tup.com.
๐ข Enterprise
Para despliegues de producciรณn con compresiรณn semรกntica avanzada:
๐ telepathy-tup.com
๐ง Consultas enterprise
๐ Licencia
Licenciado bajo MIT. Ver LICENSE. El motor telepathy-tup es propietario.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
An MCP memory server. One memory your agents share โ across models, devices and apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA sophisticated MCP server providing advanced memory capabilities with RAG, hallucination detection, and enterprise-grade AI infrastructure for intelligent agent ecosystems.-
- AlicenseNot gradedqualityBmaintenanceOpen-source MCP server for collaborative AI agents, providing a shared mailbox, identity model, and notification fabric.276 npm3Apache 2.0
- FlicenseCqualityDmaintenanceAn MCP server that routes LLM requests across multiple providers and orchestrates other MCP servers, with a focus on local privacy for embeddings and memory.283-
- AlicenseNot gradedqualityCmaintenanceA self-hostable MCP server that routes prompts to multiple LLM providers using declarative policies, with multi-role orchestration for independence and verification.MIT