Client Intelligence Hub
Central source of truth for all client data. Syncs every connected platform on a schedule, normalizes it into one client workspace, and serves it to MTOS and AI agents over MCP.
README
Client Intelligence Hub (MCP Server)
Central source of truth for all client data. Syncs every connected platform on a schedule, normalizes it into one client workspace, and serves it to MTOS and AI agents over MCP. See ARCHITECTURE.md for the full design.
Setup
-
Database — apply the schema to your Supabase project: paste
db/schema.sqlinto the Supabase SQL editor and run it. -
Environment —
.envneeds (in addition to the existing keys):DEFAULT_TENANT_ID=<uuid of your tenant row> SCHEDULER_TICK_SECONDS=60 # optional SYNC_DISABLED=true # optional: run API without syncing -
Seed — create the tenant and first clients (SQL editor):
insert into tenants (name) values ('Map Ranking') returning id; -- put that id in DEFAULT_TENANT_ID, then: insert into clients (tenant_id, name, website) values ('<tenant-id>', 'Acme Plumbing', 'https://acmeplumbing.com'); -
Connect a provider — store encrypted credentials in
connectionsand link external accounts to clients via thelink_client_accountMCP tool (or SQL). Then enable its schedule:insert into sync_schedules (tenant_id, provider, interval_minutes) values ('<tenant-id>', 'clickup', 60); -
Run
npm install npm run dev # tsx watch npm run build && npm start
Endpoints
| Endpoint | Purpose |
|---|---|
POST /mcp |
MCP (Streamable HTTP). Auth: Authorization: Bearer $MCP_SECRET |
GET /health |
Liveness check |
Claude Code connection: claude mcp add --transport http hub http://localhost:3001/mcp --header "Authorization: Bearer <secret>"
Layout
db/schema.sql Postgres schema (canonical store)
src/core/ env, logger, db client
src/lib/crypto.ts AES-256-GCM for credentials at rest
src/connectors/ Connector SDK + implementations (clickup, gohighlevel, google/*) + stubs
src/store/ Repositories: clients, entities/metrics, assets, sync bookkeeping
src/sync/ Scheduler + sync engine + outbound push queue
src/mcp/server.ts The 16-tool MCP surface
src/http.ts Streamable HTTP transport + auth
legacy/ V1 prototype (stateless token-in-params proxy) — reference only
Adding a connector
- Create
src/connectors/<provider>.tsimplementingConnector(seeclickup.tsas the template —pullreceives decrypted credentials, identity links, and the saved cursor; returns normalized entities/metrics). - Replace its stub entry in
src/connectors/registry.ts. - Insert a
connectionsrow (encrypted credentials) and async_schedulesrow.
No core changes required.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.