trinitas-mcp
trinitas-mcp is a modular MCP server for dialog memory management, context retrieval, AI model routing, and orchestration.
Store Dialog Turns (
store_dialog_turn): Persist individual conversation messages (user, assistant, system, or tool roles) into a session-based memory store, with optional metadata such as model name, tool calls, or review state.Retrieve Recent Context (
retrieve_recent_context): Fetch the most recent dialog turns for a given session in chronological order, ready for use as LLM context (configurable limit, default 10 turns).Search Session Memory (
search_memory): Perform case-insensitive substring searches across stored dialog turns within a session to find earlier mentions of topics, decisions, or entities (returns newest-first, default limit 20).Route Best AI Model (
route_best_model): Recommend the best AI provider for a specific task type (e.g.chat,code,reasoning,vision,search,embeddings,image,tools), with optional constraints like preferring free-tier providers, excluding certain providers, or requiring a specific API style. Returns a top recommendation plus up to four alternatives.List Available Providers (
list_available_providers): Retrieve all AI providers from the live AI Provider Registry, including their IDs, API styles, free-tier status, and supported capabilities.Review Workflows: Propose and execute structured review strategies, persist review outcomes in SQLite, and retrieve them via dedicated tools or
review://resources.Flexible Deployment: Supports stdio for local integration (e.g., Claude Desktop/Cursor) or HTTP/SSE for remote access, with health/readiness checks and graceful shutdown in HTTP mode.
Retrieves the AI Provider Registry hosted on GitHub Pages to recommend and route AI providers based on task types.
Uses SQLite for local memory storage, allowing persistent dialog turn recording and retrieval per session.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@trinitas-mcpSearch memory for 'project plan'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
trinitas-mcp
trinitas-mcp ist ein modularer MCP-Server (Model Context Protocol) für Context, Memory und Multi-Model-Orchestrierung. Er wurde als wiederverwendbare Komponente entwickelt und eignet sich besonders für Szenarien, in denen strukturierte Dialog-Memory und Review-Workflows benötigt werden.
Der Server trennt klar zwischen Vorbereitung & Verwaltung (MCP-Server) und tatsächlicher Ausführung von LLM-Calls (Host-Orchestrator). Dadurch bleibt der MCP-Server keyless und fokussiert.
Basiert auf dem offiziellen Model Context Protocol Python SDK (mcp[cli] / FastMCP).
Features
Erweiterte Memory-Schicht
Keyword-Suche, FTS5-Volltextsuche und optionale Embedding-basierte semantische Suche
Metadaten werden bei FTS5 und semantischer Suche berücksichtigt
Review-Workflow
propose_review_strategy— erzeugt eine task-spezifische Review-Strategieexecute_review— bereitet strukturierte Review-Ausführung vorRobuster Host-Orchestrator mit Retries, Rate Limiting, Cost Tracking und Parallelisierung
Persistenz & Abfrage
Review-Ergebnisse werden in SQLite gespeichert
Abfrage über Tools oder als MCP Resource (
review://{review_id}/review://{session_id})
Mehrere Transportwege
stdio (Standard für Claude Desktop / Cursor)
HTTP + SSE / Streamable HTTP (für remote Nutzung)
Produktionsfeatures (HTTP-Modus)
Health- und Readiness-Checks (
/health,/ready)Graceful Shutdown
Related MCP server: BuildAutomata Memory MCP Server
Voraussetzungen
Python >= 3.10
Netzwerkzugriff für Registry-Tools (lokal gecacht)
Quick Start (stdio)
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
trinitas-mcpDer Server läuft dann per stdio und kann direkt mit Claude Desktop oder Cursor verwendet werden.
Claude Desktop / Cursor: siehe examples/claude_desktop_config.json.
Vollständiger Review-Workflow
Ein lauffähiges End-to-End-Beispiel:
python examples/full_review_workflow.py→ examples/full_review_workflow.py
Der Workflow umfasst typischerweise folgende Schritte:
Dialog-Turns in Memory speichern
Review-Strategie generieren (
propose_review_strategy)Review vorbereiten und ausführen (
execute_review+ Host-Orchestrator)Ergebnisse persistieren
Reviews über
review://Resource oder Tools abfragen
Für Live-LLM-Calls: python examples/full_review_workflow.py --live (API-Key über TRINITAS_ORCHESTRATOR_API_KEY).
HTTP Modus (remote)
Es gibt zwei HTTP-Transports — wichtig für die richtige Client-URL:
Transport | Server-Start | MCP-Endpunkt | Typische Clients |
streamable-http |
|
| Claude Code ( |
sse (legacy) |
|
| Ältere SSE-MCP-Clients |
Claude Code (empfohlen)
Server (z. B. auf dem Homeserver, alle Interfaces):
trinitas-mcp --transport streamable-http --host 0.0.0.0 --port 8000Client (auf dem Rechner mit Claude):
claude mcp remove trinitas-mcp # falls bereits falsch konfiguriert
claude mcp add trinitas-mcp --transport http http://91.192.10.248:8000/mcp
claude mcp listHäufiger Fehler: http://…:8000/sse mit --transport http → Server loggt POST /sse 405.
Claude sendet POST (Streamable HTTP); Legacy-SSE erwartet GET auf /sse.
Troubleshooting nach erfolgreicher Verbindung:
listMcpResourceszeigt oft (No resources found) — normal. trinitas nutzt Resource-Templates, keine statischen Resources:conversation://{session_id}— Dialog-Kontext (z. B.conversation://demo)review://{review_id}oderreview://{session_id}— gespeicherte Reviews
Tool-Test ohne Netzwerk: Bitte Claude,
ping_mcpoderget_session_statsmitsession_id: "test"aufzurufen.Registry-Tools (
list_available_providers) brauchen ausgehendes HTTPS vom Server zur GitHub-Pages-Registry.Im Server-Log sollte bei Tool-Calls
Processing request of type CallToolRequesterscheinen; fehlt das, bricht der Client ab bevor die Anfrage ankommt.
Legacy SSE
trinitas-mcp --transport sse --host 0.0.0.0 --port 8000Client-Config: examples/mcp_sse_client.json
Health Checks
curl http://127.0.0.1:8000/health
curl http://127.0.0.1:8000/readyAlternativ: examples/run_sse_server.sh (legacy SSE)
Architektur
┌─────────────────────┐ ┌──────────────────────────────┐
│ MCP Server │ │ Host-Orchestrator │
│ │ │ │
│ • Memory (FTS5 + │ │ • LLM Calls (OpenAI-kompatibel)│
│ Semantic Search) │ │ • Retries + Rate Limiting │
│ • Review Tools │◄────────►│ • Cost Tracking │
│ • Resources │ │ • Parallel Execution │
│ • Prompts │ │ • Observability │
└─────────────────────┘ └──────────────────────────────┘Der MCP-Server kümmert sich um Context, Memory und Struktur. Die eigentlichen LLM-Calls werden vom Host-Orchestrator durchgeführt. Diese Trennung macht den Server einfacher, sicherer und besser testbar.
Konfiguration
Wichtige Umgebungsvariablen:
Variable | Beschreibung |
| Verzeichnis für SQLite-Datenbank |
| Semantische Suche aktivieren/deaktivieren ( |
|
|
| Rate Limit pro Provider (Requests/Minute) |
|
|
| Health-Check-Pfade (HTTP-Modus) |
| Graceful-Shutdown-Timeout in Sekunden |
Weitere Konfigurationsmöglichkeiten findest du in REPORT.md.
Entwicklung
Das Projekt verwendet ein commit-basiertes Workflow-Modell. Die verbindlichen Arbeitsregeln stehen in AGENT_INSTRUCTIONS.md.
Weiterführende Dokumentation
REPORT.md— Ausführlicher Projektbericht mit Architektur, Design-Entscheidungen und aktuellem Standexamples/full_review_workflow.py— Komplettes End-to-End-Beispielexamples/host_orchestrator.py— Beispiel für den Host-Orchestrator
Links
Lizenz
MIT License
Maintenance
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
- 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/kbarbel640-del/trinitas-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server