SuperOffice AI Support MCP Platform
Provides semantic vector search across technical documentation, runbooks, and known issues stored in a PostgreSQL database with pgvector.
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.
SuperOffice AI Support MCP Platform
An enterprise-grade, secure, modular Model Context Protocol (MCP) platform for AI-assisted SuperOffice CRM support triage, diagnostic telemetry, and cross-system incident investigation.
The platform bridges external LLM reasoning engines (such as Claude Desktop, Cursor, and autonomous support agents) with Onsite SuperOffice CRM REST APIs, Microsoft SQL Server database diagnostics, PostgreSQL/pgvector knowledge stores, and infrastructure boundaries under strict security, data minimization, and audit controls.
Independent Integration Project & Trademark Notice
This is an independent open-source integration project and is not an official SuperOffice product. SuperOffice and all other product names, logos, and brands are property of their respective owners. Mention of third-party trademarks does not imply endorsement, affiliation, or sponsorship.
Production Boundary Disclaimer
Current Release: v1.0.0-local.1 (Local Development Release 1.0) — COMPLETE / APPROVED.
Production Ready: NO.
Repository Professionalization: IN PROGRESS (FLC.5C).
Remote Publication: NOT YET PERFORMED.
Production Readiness Program: FUTURE / NOT STARTED.
This platform is verified strictly for local development, offline testing, and architecture validation. It does not claim live production deployment, production network trust, high availability, disaster recovery, or integration with enterprise secret managers.
Architecture Overview
The platform strictly implements a Six-Layer Architecture. Observability is a cross-cutting concern spanning all operational layers:
┌─────────────────────────────────────────────────────────────────────────┐
│ 1. MCP Layer │
│ (SuperOffice MCP, Diagnostics MCP, Knowledge MCP, Investigation MCP) │
└────────────────────────────────────┬────────────────────────────────────┘
│
┌────────────────────────────────────v────────────────────────────────────┐
│ 2. Security Layer │
│ (MCP Gateway, JWT Auth, YAML RBAC, Privilege Flags, PII/Sanitization) │
└────────────────────────────────────┬────────────────────────────────────┘
│
┌────────────────────────────────────v────────────────────────────────────┐
│ 3. Investigation Layer │
│ (Investigation State Machine, Hypothesis Engine, Incident Correlator) │
└────────────────────────────────────┬────────────────────────────────────┘
│
┌────────────────────────────────────v────────────────────────────────────┐
│ 4. Application Service Layer │
│ (Ticket Investigation Service, Knowledge Service, Diagnostics Service) │
└────────────────────────────────────┬────────────────────────────────────┘
│
┌────────────────────────────────────v────────────────────────────────────┐
│ 5. Integration Layer │
│ (SuperOffice REST Client, MSSQL Async Client, Knowledge DB Adapter) │
└────────────────────────────────────┬────────────────────────────────────┘
│
┌────────────────────────────────────v────────────────────────────────────┐
│ 6. Infrastructure Layer │
│ (Host Boundaries, Process Models, OS Diagnostics Boundaries) │
└─────────────────────────────────────────────────────────────────────────┘
▲
│
════════════════╪════════════════
CROSS-CUTTING OBSERVABILITY
(Structured Logs, Audit Sinks, Traces)
═════════════════════════════════Backend Ownership & Isolation Boundaries
Each backend is exclusively owned by a single service boundary. External AI models and LLMs have zero direct access to databases, filesystems, attachments, infrastructure shells, or enterprise credentials:
SuperOffice Business Data $\rightarrow$ SuperOffice MCP (
so-mcp) $\rightarrow$ SuperOffice REST API.MSSQL Database Diagnostics & Logs $\rightarrow$ Diagnostics MCP (
diag-mcp) $\rightarrow$ Microsoft SQL Server & Log parsers.Technical Knowledge & Runbooks $\rightarrow$ Knowledge MCP (
kb-mcp) $\rightarrow$ PostgreSQL +pgvector.Infrastructure Boundaries $\rightarrow$ Infrastructure MCP (
infra-mcp, deferred under Decision D07).Perimeter Security $\rightarrow$ MCP Gateway (
platform-gateway). The Gateway has no direct database access.
Related MCP server: superoffice-mcp-server
Canonical Public Tool Inventory (29 Tools)
The Gateway exposes exactly 29 registered public tools over Streamable HTTP (ADR 007). There are zero aliases and zero public ingestion tools.
Server | Tool Name | Minimum Role | Classification | Data Level | Description |
SuperOffice MCP |
| L1 |
|
| Retrieve ticket details by ticket ID |
| L1 |
|
| Search tickets with criteria and pagination | |
| L1 |
|
| Retrieve communication messages on a ticket | |
| L1 |
|
| List attachment metadata only (D05 enforced) | |
| L1 |
|
| Retrieve company entity by company ID | |
| L1 |
|
| Search company directory | |
| L1 |
|
| Retrieve contact person details (PII redacted) | |
| L1 |
|
| Search contact persons | |
| L2 |
|
| Mirror CRMScripts, screens, and database schemas locally | |
| L2 |
|
| List user-defined | |
| L2 |
|
| Retrieve column schema and types for extra tables | |
| L2 |
|
| Bounded, parameterized read queries on extra tables | |
| L2 |
|
| Chronological ticket audit trail, actions, and field changes | |
| L1 |
|
| Search mirrored CRMScripts, screens, actions, and elements | |
| L2 |
|
| Read mirrored script or definition file with 200-line windowing | |
| L1 |
|
| Inspect screen lifecycle scripts, buttons, and elements | |
| L1 |
|
| Resolve internal consultant and technician profile | |
| L1 |
|
| Reference lists for categories, priorities, statuses, groups | |
| L2 |
|
| Inspect scheduled background tasks and failure status | |
Diagnostics MCP |
| L2 |
|
| Database health, DMV checks, uptime metrics |
| L2 |
|
| Identify top slow queries (max 50 rows, 5s timeout) | |
| L2 |
|
| Parse deadlock graphs from system_health ring buffer | |
| L2 |
|
| Analyze active blocking and wait resource chains | |
| L2 |
|
| Search IIS W3C & SuperOffice warning logs (config-conditional) | |
| L2 |
|
| Database diagnostic records (active / live telemetry) | |
Knowledge MCP |
| L1 |
|
| Semantic vector search across technical documentation |
| L1 |
|
| Retrieve structured operational runbook by ID | |
| L1 |
|
| Search incident patterns and known workarounds | |
Investigation MCP |
| L3 |
|
| Orchestrated investigation (executes 4 subordinate tools) |
Registered vs. Operational Status
search_logs:IMPLEMENTED / CONFIGURATION-CONDITIONAL(operational when local log directories are configured).get_ticket_diagnostic_record:ACTIVE / OPERATIONAL(queriesticket_logandticket_log_actionwith sanitized summaries).get_ticket_audit_trail:ACTIVE / OPERATIONAL(queriesticket_log,ticket_log_action,ticket_log_change, andejuser).get_associate_details,get_ticket_metadata_lists,list_system_events_and_triggers:ACTIVE / OPERATIONAL(queriesASSOCIATE,EJUSER,EJ_CATEGORY,SCHEDULE,SCHEDULED_TASK).list_extra_tables,get_extra_table_schema,query_extra_table:ACTIVE / OPERATIONAL(user-definedy_*discovery).Knowledge tools:CONFIGURED / LOCAL OPERATIONAL(backed by local PostgreSQL + pgvector and FastEmbed).investigate_incident: Operational with 4 frozen subordinate operations (get_ticket,get_database_health,find_slow_queries,find_deadlocks). Subordinateapplication_logsreturnsBLOCKEDandknowledge_basereturnsNOT_CONFIGURED.Infrastructure MCP: 0 public tools (retained as boundary; implementation deferred under Decision D07).
Gateway Prompts & AI Guardrails (3 Prompts)
The MCP Gateway exposes structured, versioned prompt templates (prompts/list, prompts/get) with embedded operational rules and anti-hallucination guardrails:
Prompt Name | Purpose | Key Guardrails & Arguments |
| End-to-end incident triage for a SuperOffice ticket | Factual grounding invariant, negative evidence rules (e.g. |
| Dedicated SQL Server health and performance triage | Enforces 5s statement timeout awareness, 50-row result caps, and SNAPSHOT isolation guidance. Args: |
| Custom SuperOffice CRMScript / EJScript debug flow | Analyzes syntax, runtime exceptions, and database interactions while guarding against arbitrary script execution. Args: |
Security Model & Policy Invariants
Deny-by-Default RBAC: Declarative tool-level policy defined in
tool_permissions.yamland enforced byYamlPolicyEngine. Unknown roles or unmapped tools are unconditionally rejected (DENY).Role Hierarchy:
L1(Basic Support Triage) $\subset$L2(Diagnostics) $\subset$L3(Cross-System Investigation).Attachment Protection (Decision D05): Deny-by-default. The public tool
list_attachmentsreturns strictly metadata. Raw attachment downloads and automatic ingestion to AI models are prohibited.External AI Boundary (Decision D08): Live production transmission of confidential/sensitive SuperOffice CRM data to external AI endpoints is NOT APPROVED. Knowledge ingestion of live customer CRM exports is DENIED.
Database Safety (Decisions D01, D02, D09):
Statement timeout hard-capped at 5.0 seconds (D01).
Query result rows hard-capped at 50 rows (D02).
Mandatory
SNAPSHOTisolation (D09). ZeroWITH (NOLOCK)hints and zero dynamic/arbitrary SQL execution.
Data Minimization & PII Scrubbing: All responses pass through recursive PII and secret redaction filters before delivery to external AI clients.
Knowledge Backend & Ingestion Engine
Database: PostgreSQL with
pgvector(0.8.6) in schemaknowledge(documents,chunks,runbooks,known_issues).Embeddings: In-process
FastEmbedEmbeddingProviderutilizingBAAI/bge-small-en-v1.5(384 dimensions).Immutable Artifacts: Pre-redacted canonical Markdown artifacts stored at
approved/<type>/<id>/<hash>.mdon local filesystem outside Git.Concurrency Control: Transaction-scoped PostgreSQL advisory locking (
pg_advisory_xact_lock) serializes ingest per document while computing embeddings outside the lock.Internal Operator CLI:
# Execute dry-run admission and sanitization check python -m kb_mcp.ingestion.cli dry-run path/to/document.md # Ingest document into local knowledge base python -m kb_mcp.ingestion.cli ingest path/to/document.mdSupported local formats:
.md,.markdown,.txt, Runbook.json, Known-Issue.json. (PDF, DOCX, HTML, OCR, and YAML are deferred).
SuperOffice Codebase Mirror & Synchronization Engine
The platform includes an automated synchronization engine (so_mcp.sync) that mirrors custom scripts, screen definitions, and database schemas from an Onsite SuperOffice instance to a local filesystem directory (e.g., F:\CodeBase_SuperOffice) for offline static analysis, indexing, and AI assistance:
Dual Extraction Modes:
http: Extracts scripts, screens, and schemas via authenticated SuperOffice CRMScript handler (scripts/customer.fcgi).mssql: Directly queries database metadata (dbo.hierarchy,dbo.ejscript,dbo.screen_definition, customy_tables) with safety controls and zero cross-server dependencies.
Security & Secret Scanner: Pre-scans every script body with regex pattern matchers for API keys, passwords, bearer tokens, connection strings, and base64 credentials before persisting to disk.
Deterministic Mirroring & Manifest: Generates clean folder trees matching SuperOffice hierarchy paths, file sanitization for Windows/POSIX safety, and an immutable
manifest.json.Operator Commands:
# Sync entire codebase using PowerShell helper .\scripts\sync-so-codebase.ps1 -OutputDir "F:\CodeBase_SuperOffice" -Mode http # Dry-run evaluation (no disk writes) .\scripts\sync-so-codebase.ps1 -DryRun -Verbose # Direct Python CLI uv run python -m so_mcp.sync.cli -o "F:\CodeBase_SuperOffice" -m http -t "ejscript,screens,schema"
Client Integrations & Desktop Run Modes
Streamable HTTP (Multi-Client Gateway): Run the platform services via
.\scripts\start-local.ps1and connect clients to the MCP Gateway athttp://127.0.0.1:8000/mcp.Direct STDIO Transport (Claude Desktop / Cursor): SuperOffice MCP can run directly over standard input/output without starting HTTP daemons:
uv run python -m so_mcp.stdioStakeholder Presentation Deck: A complete executive presentation deck is provided at
SuperOffice_AI_Support_MCP_Client_Deck.pptxcovering architecture, security boundaries, diagnostic workflows, and the local-to-production roadmap.
Getting Started / Local Development
Prerequisites
Python
>= 3.12uvpackage manager (pip install uvor install via official installer)PowerShell 7+ (on Windows) or Bash (on Linux/macOS)
Setup Instructions
Clone and Install:
uv syncConfigure Local Environment:
cp .env.example .envEdit
.envto configure your local test database endpoints and local development JWT secret.Pre-Flight Diagnostic Probes & Connectivity Dashboard:
# Terminal CLI Report (Fast, structured readiness check) powershell -File scripts/check-preflight.ps1 # Visual Web Dashboard (Browser GUI with live re-run capability) powershell -File scripts/preflight-gui.ps1
Verification & Quality Baseline
The codebase maintains a 100% verified baseline with zero lint or type errors:
# Run full regression suite (1189 passed, 12 skipped live-DB tests)
uv run pytest
# Linting and style verification
uv run ruff check src tests
uv run ruff format --check src tests
# Strict type checking
uv run mypy src testsLocal-Development-Only Exceptions
The local development setup incorporates specific exceptions that must be replaced in production:
Self-Signed TLS Trust:
SUPEROFFICE_ALLOW_SELF_SIGNED_CERT=truefor local test servers.MSSQL Certificate Trust:
DIAGNOSTICS_MSSQL_TRUST_SERVER_CERTIFICATE=truefor local development SQL Server.Symmetric JWT Signing: Local tests use
HS256shared secrets; production requires asymmetric JWT validation / JWKS.Local Database & Cache: Local PostgreSQL on
127.0.0.1:5432and locally cached FastEmbed model weights.Local Artifact Store: Knowledge artifacts stored in a local filesystem directory.
Documentation Index
Document | Description |
Authoritative platform status, gate history, tool inventory, and operational status | |
Comprehensive Six-Layer Architecture, service topologies, and isolation boundaries | |
Individual MCP server boundaries, port allocations, and responsibility contracts | |
Threat modeling, RBAC policy definitions, data classification, and audit policies | |
Investigation Engine state machine, hypothesis evaluator, and incident timeline correlation | |
Data level hierarchy ( | |
Canonical architectural decisions (ADR 001 through ADR 012, Decision Ledger D01–D09) | |
Security vulnerability disclosure, responsible reporting, and boundary invariants | |
Contribution workflows, coding conventions, testing gates, and security rules | |
Complete version history and milestone release notes |
Roadmap
FLC.4: Local Development Release 1.0 Checkpoint & Git Tag (
COMPLETE / APPROVED—v1.0.0-local.1).FLC.5: Repository Professionalization & Remote Publication (Git history audit, provider-neutral hygiene, private repo push).
PR.0–PR.12: Production Readiness Program (Production deployment, containerization, PKI, network policies, HA/DR, and operational acceptance).
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage tickets, run agents and workflows, query tables, and search workspace knowledge.
Work your Zono Support help desk from an AI client: tickets, customers, purchases and knowledge.
Give AI agents 30,000+ safe, token-optimized actions across Workday, SAP, Oracle + hundreds more.
Manage SalesCloser AI sales agents, leads, campaigns and calls from your AI assistant.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to retrieve customer, order, ticket, policy, and agreement information, and to prepare or execute state-changing support actions like escalations and follow-ups with confirmation and access control.-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query and manage SuperOffice CRM Onsite data—contacts, persons, appointments, support tickets, custom extra tables, and audit logs—via the REST WebAPI.MIT
- FlicenseNot gradedqualityCmaintenanceEnables support engineers to analyze tickets against a help center with cited retrieval, role-gated and human-confirmed actions, and safety-gated evaluation.1-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to access and manage CRM data by creating contacts and companies, retrieving activities and conversations, and performing semantic search over previously retrieved information with built-in vector storage and caching.-