decocms 2.138.0 → 2.158.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +417 -40
- package/dist/README.md +295 -0
- package/dist/client/assets/AlertCircle-DsQlVvig.js +1 -0
- package/dist/client/assets/AlignLeft-Cvo6EEA1.js +1 -0
- package/dist/client/assets/ArrowDown-KTP4HONB.js +1 -0
- package/dist/client/assets/ArrowLeft-CR3SWku2.js +1 -0
- package/dist/client/assets/ArrowUp-BfaawFDM.js +1 -0
- package/dist/client/assets/Check-OSWZCZf9.js +1 -0
- package/dist/client/assets/CheckCircle-B2wkNkz_.js +1 -0
- package/dist/client/assets/CheckDone01-j6DaSyTU.js +1 -0
- package/dist/client/assets/CheckVerified02-D6qy17me.js +1 -0
- package/dist/client/assets/ChevronDown-BR4cCk-W.js +1 -0
- package/dist/client/assets/ChevronLeft-D4Ua6sXw.js +1 -0
- package/dist/client/assets/ChevronRight-ByOuE_Vi.js +1 -0
- package/dist/client/assets/Clock-BEpmd0mM.js +1 -0
- package/dist/client/assets/Code01-BsBlwdG0.js +1 -0
- package/dist/client/assets/CommitMono-VariableFont-ytizKI8U.woff2 +0 -0
- package/dist/client/assets/Container-BVSlDn4p.js +1 -0
- package/dist/client/assets/Copy01-B595Thpy.js +1 -0
- package/dist/client/assets/Dataflow03-DW4Gd5sB.js +1 -0
- package/dist/client/assets/DotsHorizontal-0eyRqScK.js +1 -0
- package/dist/client/assets/DotsVertical-Cshw63SI.js +1 -0
- package/dist/client/assets/Download01-DFmX-SGA.js +1 -0
- package/dist/client/assets/Edit01-BzJXGmI-.js +1 -0
- package/dist/client/assets/Edit05-BKDqgNc4.js +1 -0
- package/dist/client/assets/Eye-CHYeRDXI.js +1 -0
- package/dist/client/assets/File02-ZK3-99s4.js +1 -0
- package/dist/client/assets/File06-B7IZdrgj.js +1 -0
- package/dist/client/assets/FilterLines-pJtef_Pv.js +1 -0
- package/dist/client/assets/Globe01-p5f8j_mm.js +1 -0
- package/dist/client/assets/Globe02-D7s1ULQJ.js +1 -0
- package/dist/client/assets/Grid01-DIGu5eh8.js +1 -0
- package/dist/client/assets/Hash02-CkWXLlvG.js +1 -0
- package/dist/client/assets/Home02-DiSPSdMx.js +1 -0
- package/dist/client/assets/Image01-4wUrHqw6.js +1 -0
- package/dist/client/assets/Inbox01-csEiEq63.js +1 -0
- package/dist/client/assets/InfoCircle-s0XyUQYC.js +1 -0
- package/dist/client/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
- package/dist/client/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
- package/dist/client/assets/Key01-BP2mhRrj.js +1 -0
- package/dist/client/assets/LayersTwo01-C4CgBsBK.js +1 -0
- package/dist/client/assets/LayoutLeft-DzzE993C.js +1 -0
- package/dist/client/assets/Link01-CHaReCKl.js +1 -0
- package/dist/client/assets/LinkExternal01-Cj5yLC8K.js +1 -0
- package/dist/client/assets/List-BnvhY7Nh.js +1 -0
- package/dist/client/assets/Loading01-aMp99RZI.js +1 -0
- package/dist/client/assets/Lock01-STjQUMU6.js +1 -0
- package/dist/client/assets/Play-Dr8AlTmi.js +1 -0
- package/dist/client/assets/Plus-Dp8Rr75G.js +1 -0
- package/dist/client/assets/RefreshCcw01-DDGad8lb.js +1 -0
- package/dist/client/assets/Save01-36pjbcKA.js +1 -0
- package/dist/client/assets/SearchMd-r7i5BQk7.js +1 -0
- package/dist/client/assets/Settings01-DKTz1YSf.js +1 -0
- package/dist/client/assets/Shield01-J7QygUij.js +1 -0
- package/dist/client/assets/Terminal-CtjH6zFY.js +1 -0
- package/dist/client/assets/Trash01-DJTe1fKw.js +1 -0
- package/dist/client/assets/Upload01-BEhQSPeB.js +1 -0
- package/dist/client/assets/Users03-CG_islph.js +1 -0
- package/dist/client/assets/X-DjDetE_c.js +1 -0
- package/dist/client/assets/XCircle-CSLSI6pa.js +1 -0
- package/dist/client/assets/XClose-dSJ6zVxj.js +1 -0
- package/dist/client/assets/Zap-BdJ17pmL.js +1 -0
- package/dist/client/assets/agent-connections-preview-DB81vdUX.js +1 -0
- package/dist/client/assets/agent-detail-BAru2zv4.js +2 -0
- package/dist/client/assets/agents-DTLxCfRX.js +1 -0
- package/dist/client/assets/alert-dialog-Bbrwo05x.js +7 -0
- package/dist/client/assets/auth-catchall-BETKUynS.js +1 -0
- package/dist/client/assets/avatar-D94UEcg7.js +1 -0
- package/dist/client/assets/badge-DxYG_XB9.js +1 -0
- package/dist/client/assets/binder-wDmRPNL2.js +1 -0
- package/dist/client/assets/breadcrumb-BrsAPde7.js +1 -0
- package/dist/client/assets/card-CkYe6Ikt.js +1 -0
- package/dist/client/assets/chart-DnUFHI2d.js +15 -0
- package/dist/client/assets/checkbox-DhgSL5Cz.js +1 -0
- package/dist/client/assets/circle-alert-CgP-qNn-.js +1 -0
- package/dist/client/assets/collapsible-DYgsVB3N.js +1 -0
- package/dist/client/assets/collection-detail-D5XIUYKg.js +26 -0
- package/dist/client/assets/collection-display-button-DEx37m4V.js +1 -0
- package/dist/client/assets/collection-search-DXvW2iQG.js +1 -0
- package/dist/client/assets/collection-tab-CNXNROrc.js +1 -0
- package/dist/client/assets/collection-table-wrapper-xKuLiuQ5.js +1 -0
- package/dist/client/assets/collection-tabs-BEqvkJum.js +1 -0
- package/dist/client/assets/command-wAVHsF2T.js +1 -0
- package/dist/client/assets/connect-yoERnUTv.js +1 -0
- package/dist/client/assets/connection-card--y0YdfEA.js +1 -0
- package/dist/client/assets/connection-detail-1Ku6b0Wl.js +1 -0
- package/dist/client/assets/connection-status-Cq0AmCwK.js +1 -0
- package/dist/client/assets/connections-Cih6wM0L.js +1 -0
- package/dist/client/assets/constants-BBAQxhFl.js +1 -0
- package/dist/client/assets/constants-_xTq0aTt.js +1 -0
- package/dist/client/assets/context-Bk-UzwLO.js +29 -0
- package/dist/client/assets/create-organization-dialog-D50lIYTQ.js +1 -0
- package/dist/client/assets/create-project-dialog-B3BGNP1R.js +1 -0
- package/dist/client/assets/danger-DuT5kBaU.js +1 -0
- package/dist/client/assets/danger-zone-Cjq5A9rY.js +1 -0
- package/dist/client/assets/decopilot-events-BrbCILIn.js +1 -0
- package/dist/client/assets/dependencies-BXhkBUyi.js +1 -0
- package/dist/client/assets/dialog-B-Kp8Cuq.js +1 -0
- package/dist/client/assets/differenceInSeconds-NQ4PDo0z.js +1 -0
- package/dist/client/assets/dropdown-menu-DjhC4m2a.js +1 -0
- package/dist/client/assets/dynamic-plugin-layout-DRpqAaco.js +1 -0
- package/dist/client/assets/editable-task-title-CWlhOc5Q.js +16 -0
- package/dist/client/assets/empty-state-680W7nUY.js +1 -0
- package/dist/client/assets/env-vars-editor-BRxwCr-L.js +1 -0
- package/dist/client/assets/estree-CwOGYdhi.js +44 -0
- package/dist/client/assets/extract-connection-data-DUglufvW.js +1 -0
- package/dist/client/assets/file-browser-BLB4FkOU.js +2 -0
- package/dist/client/assets/form-DK8WrQI3.js +1 -0
- package/dist/client/assets/format-time-CMKyl-GC.js +1 -0
- package/dist/client/assets/formatDistanceToNow-Cb2QZZJn.js +1 -0
- package/dist/client/assets/general-DonW35nE.js +1 -0
- package/dist/client/assets/generate-id-Dyweu44Y.js +1 -0
- package/dist/client/assets/github-icon-Dp3wHhYE.js +1 -0
- package/dist/client/assets/grid-view-CqJSMZVQ.js +1 -0
- package/dist/client/assets/home-DIVCSvrl.js +1 -0
- package/dist/client/assets/icon-picker-DvkCVh_W.js +1 -0
- package/dist/client/assets/index-B84Dx7nI.js +218 -0
- package/dist/client/assets/index-BGwf3l_M.js +1 -0
- package/dist/client/assets/index-BPI27S5s.js +25 -0
- package/dist/client/assets/index-BmSASrPR.js +1 -0
- package/dist/client/assets/index-C8u6axf-.js +1 -0
- package/dist/client/assets/index-CcaZ2Rhp.css +1 -0
- package/dist/client/assets/index-CmH5OQnm.js +1 -0
- package/dist/client/assets/index-D9XxJ5Op.js +1 -0
- package/dist/client/assets/index-DA_JOtb0.js +1 -0
- package/dist/client/assets/index-SKwvOtlz.js +184 -0
- package/dist/client/assets/infiniteQueryObserver-DenS4T97.js +1 -0
- package/dist/client/assets/input-NIbTU7RU.js +1 -0
- package/dist/client/assets/integration-icon-DNJkhUIt.js +1 -0
- package/dist/client/assets/label-B6R7vHKQ.js +1 -0
- package/dist/client/assets/layout-CECSvrhq.js +1 -0
- package/dist/client/assets/layout-CMdmqG4j.js +1 -0
- package/dist/client/assets/localstorage-keys-BckSA5cs.js +1 -0
- package/dist/client/assets/login-BfEg3qXN.js +1 -0
- package/dist/client/assets/markdown-Cqv1T19z.js +29 -0
- package/dist/client/assets/marked.esm-BaswSlok.js +56 -0
- package/dist/client/assets/mcp-app-renderer-gG-wM7zZ.js +11 -0
- package/dist/client/assets/mcp-server-card-M7WdUx8I.js +1 -0
- package/dist/client/assets/mcp-server-detail-D73ue2Yz.js +2 -0
- package/dist/client/assets/members-Buq9RcXv.js +3 -0
- package/dist/client/assets/monaco-editor-BXv0Xqkq.js +19 -0
- package/dist/client/assets/monitoring-CEhjsxOM.js +31 -0
- package/dist/client/assets/monitoring-dashboard-edit-BntH-KiR.js +1 -0
- package/dist/client/assets/monitoring-dashboard-view-Bw3iwoxc.js +4 -0
- package/dist/client/assets/oauth-callback-D455SJn4.js +1 -0
- package/dist/client/assets/page-C-6ciKw-.js +1 -0
- package/dist/client/assets/page-DrITT5mj.js +1 -0
- package/dist/client/assets/plugin-empty-state-BLzOpmuv.js +1 -0
- package/dist/client/assets/plugin-empty-state-D73E0OXs.js +1 -0
- package/dist/client/assets/plugin-header-DkXBoQof.js +1 -0
- package/dist/client/assets/plugin-header-_N_-KJkN.js +1 -0
- package/dist/client/assets/plugins-D4w2xHCL.js +1 -0
- package/dist/client/assets/popover-D7xgfP4W.js +1 -0
- package/dist/client/assets/project-app-view-DWi5m8l8.js +1 -0
- package/dist/client/assets/project-layout-CWEThOiP.js +1 -0
- package/dist/client/assets/project-plugins-BKPLJXFp.js +1 -0
- package/dist/client/assets/projects-list-Y8k15POh.js +1 -0
- package/dist/client/assets/purify.es-C0_7NiBM.js +2 -0
- package/dist/client/assets/readme-viewer-DWnTz46N.css +1 -0
- package/dist/client/assets/readme-viewer-WWU4z7Xg.js +1 -0
- package/dist/client/assets/registry-layout-D_LH6ewr.js +5 -0
- package/dist/client/assets/registry-utils-CMqg9IHN.js +1 -0
- package/dist/client/assets/reports-layout-B3u5OkMC.js +3 -0
- package/dist/client/assets/reset-password-Cm7BWULq.js +1 -0
- package/dist/client/assets/resizable-pH8vbRAI.js +1 -0
- package/dist/client/assets/save-actions-CTDUNaiW.js +1 -0
- package/dist/client/assets/scroll-area-DOWQyO2m.js +1 -0
- package/dist/client/assets/select-1y3LRFgk.js +1 -0
- package/dist/client/assets/shell-layout-B6SbKq-6.js +3 -0
- package/dist/client/assets/sidebar-settings-BZx3Z8UA.js +1 -0
- package/dist/client/assets/skeleton-CMw17Qjd.js +1 -0
- package/dist/client/assets/slugify-CEUa2lfQ.js +1 -0
- package/dist/client/assets/spinner-DiXeE5Xk.js +1 -0
- package/dist/client/assets/standalone-DS4gw9AE.js +29 -0
- package/dist/client/assets/store-invite-BdRmGVAy.js +1 -0
- package/dist/client/assets/switch-BA80KxP2.js +1 -0
- package/dist/client/assets/table-vuF1fVQ6.js +1 -0
- package/dist/client/assets/tabs-D3RTRDyW.js +1 -0
- package/dist/client/assets/tasks-C_CW4iPq.js +1 -0
- package/dist/client/assets/tasks-panel-D3YXt5j8.js +1 -0
- package/dist/client/assets/textarea-BW2ziFqJ.js +1 -0
- package/dist/client/assets/time-range-picker-CZg_Yx1g.js +5 -0
- package/dist/client/assets/toggle-group-DO86EMeS.js +1 -0
- package/dist/client/assets/tools-list-BzLGkrz5.js +1 -0
- package/dist/client/assets/tooltip-CHJhCJL3.js +1 -0
- package/dist/client/assets/topbar-portal-BomQ7YMR.js +1 -0
- package/dist/client/assets/types-DibruoFW.js +155 -0
- package/dist/client/assets/typescript-Ca_eWjgL.js +21 -0
- package/dist/client/assets/unwrap-tool-result-BYXdCQMg.js +1 -0
- package/dist/client/assets/usage-B8eRkRZY.js +1 -0
- package/dist/client/assets/use-binding-Bdb-0lwc.js +1 -0
- package/dist/client/assets/use-collections-BoFyuDa6.js +1 -0
- package/dist/client/assets/use-connection-DSPQNIQD.js +1 -0
- package/dist/client/assets/use-copy-Ba97e-kV.js +1 -0
- package/dist/client/assets/use-create-virtual-mcp-Cf71AE6l.js +1 -0
- package/dist/client/assets/use-install-from-registry-B6NE77_0.js +1 -0
- package/dist/client/assets/use-list-state-kborONTL.js +1 -0
- package/dist/client/assets/use-llm-CKGJlXuC.js +1 -0
- package/dist/client/assets/use-mcp-prompts-C___IsDE.js +1 -0
- package/dist/client/assets/use-mcp-tools-K2l5CqFr.js +1 -0
- package/dist/client/assets/use-members-DajocvHM.js +1 -0
- package/dist/client/assets/use-mobile-DznYZ63b.js +1 -0
- package/dist/client/assets/use-preferences-BfaOwWT4.js +1 -0
- package/dist/client/assets/use-project-DZlIfmd3.js +1 -0
- package/dist/client/assets/use-settings-modal-C2h2dbTq.js +1 -0
- package/dist/client/assets/use-view-mode-3gfyljcZ.js +1 -0
- package/dist/client/assets/use-virtual-mcp-5EdNqvyH.js +1 -0
- package/dist/client/assets/useInfiniteQuery-CFRJ66U9.js +1 -0
- package/dist/client/assets/useMutation-Be5QSQym.js +1 -0
- package/dist/client/assets/useQuery-CIRdCYZz.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CQgxvKZn.js +1 -0
- package/dist/client/assets/user-CY9QFLJr.js +1 -0
- package/dist/client/assets/workflow-Db4yuI9S.js +1 -0
- package/dist/client/empty-state-cards.png +0 -0
- package/dist/client/empty-state-error.svg +19 -0
- package/dist/client/empty-state-home.png +0 -0
- package/dist/client/empty-state-logs.svg +80 -0
- package/dist/client/empty-state-openrouter.svg +320 -0
- package/dist/client/empty-state-success-muted.svg +19 -0
- package/dist/client/empty-state-success.svg +19 -0
- package/dist/client/emptystate-mcp.svg +33 -0
- package/dist/client/favicon.svg +5 -0
- package/dist/client/globe.svg +4 -0
- package/dist/client/icons/capy-0.png +0 -0
- package/dist/client/icons/capy-1.png +0 -0
- package/dist/client/icons/capy-10.png +0 -0
- package/dist/client/icons/capy-11.png +0 -0
- package/dist/client/icons/capy-12.png +0 -0
- package/dist/client/icons/capy-13.png +0 -0
- package/dist/client/icons/capy-14.png +0 -0
- package/dist/client/icons/capy-15.png +0 -0
- package/dist/client/icons/capy-16.png +0 -0
- package/dist/client/icons/capy-17.png +0 -0
- package/dist/client/icons/capy-18.png +0 -0
- package/dist/client/icons/capy-19.png +0 -0
- package/dist/client/icons/capy-2.png +0 -0
- package/dist/client/icons/capy-20.png +0 -0
- package/dist/client/icons/capy-21.png +0 -0
- package/dist/client/icons/capy-22.png +0 -0
- package/dist/client/icons/capy-23.png +0 -0
- package/dist/client/icons/capy-24.png +0 -0
- package/dist/client/icons/capy-25.png +0 -0
- package/dist/client/icons/capy-26.png +0 -0
- package/dist/client/icons/capy-27.png +0 -0
- package/dist/client/icons/capy-28.png +0 -0
- package/dist/client/icons/capy-29.png +0 -0
- package/dist/client/icons/capy-3.png +0 -0
- package/dist/client/icons/capy-30.png +0 -0
- package/dist/client/icons/capy-31.png +0 -0
- package/dist/client/icons/capy-32.png +0 -0
- package/dist/client/icons/capy-33.png +0 -0
- package/dist/client/icons/capy-34.png +0 -0
- package/dist/client/icons/capy-35.png +0 -0
- package/dist/client/icons/capy-36.png +0 -0
- package/dist/client/icons/capy-37.png +0 -0
- package/dist/client/icons/capy-38.png +0 -0
- package/dist/client/icons/capy-4.png +0 -0
- package/dist/client/icons/capy-5.png +0 -0
- package/dist/client/icons/capy-6.png +0 -0
- package/dist/client/icons/capy-7.png +0 -0
- package/dist/client/icons/capy-8.png +0 -0
- package/dist/client/icons/capy-9.png +0 -0
- package/dist/client/index.html +12 -0
- package/dist/client/logos/Claude Code.svg +3 -0
- package/dist/client/logos/Windsurf.svg +3 -0
- package/dist/client/logos/cursor.svg +3 -0
- package/dist/client/logos/deco logo.svg +4 -0
- package/dist/client/sounds/notification.mp3 +0 -0
- package/dist/client/store-empty-state.svg +109 -0
- package/dist/client/verified-badge.svg +4 -0
- package/dist/server/cli.js +2143 -0
- package/dist/server/migrate.js +2001 -0
- package/dist/server/server.js +1922 -0
- package/package.json +141 -24
- package/bin/deco.js +0 -33
package/README.md
CHANGED
|
@@ -1,70 +1,447 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MCP Mesh
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Context Management System for AI Applications**
|
|
4
|
+
|
|
5
|
+
MCP Mesh is an open-source platform that centralizes **Model Context Protocol (MCP)** connection management for teams and organizations. It provides secure credential storage, fine-grained access control, and unified observability for AI tool orchestration.
|
|
6
|
+
|
|
7
|
+
## What is MCP Mesh?
|
|
8
|
+
|
|
9
|
+
When AI assistants use tools via the Model Context Protocol, managing connections across a team becomes challenging:
|
|
10
|
+
|
|
11
|
+
- **Connection sprawl**: Each MCP service has its own auth, config, and credentials
|
|
12
|
+
- **Credential sharing**: Sharing access means sharing passwords or API keys
|
|
13
|
+
- **No audit trail**: Who called which tool, when, and with what result?
|
|
14
|
+
- **Tool isolation**: MCP services can't compose or share dependencies
|
|
15
|
+
|
|
16
|
+
MCP Mesh solves these problems by acting as a **secure proxy** between AI clients and MCP services:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌─────────────────┐ ┌──────────────┐ ┌─────────────────┐
|
|
20
|
+
│ Claude Desktop │────▶│ MCP Mesh │────▶│ Gmail MCP │
|
|
21
|
+
│ Cursor Agent │ │ (Proxy) │ │ Slack MCP │
|
|
22
|
+
│ Custom Client │ │ │────▶│ GitHub MCP │
|
|
23
|
+
└─────────────────┘ └──────────────┘ └─────────────────┘
|
|
24
|
+
│
|
|
25
|
+
┌─────────┴──────────┐
|
|
26
|
+
│ - Authentication │
|
|
27
|
+
│ - Authorization │
|
|
28
|
+
│ - Credential Vault │
|
|
29
|
+
│ - Audit Logging │
|
|
30
|
+
│ - Observability │
|
|
31
|
+
└────────────────────┘
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
### ✅ Implemented
|
|
37
|
+
|
|
38
|
+
- **Organization Management** — Create orgs, invite members, assign roles
|
|
39
|
+
- **Connection Registry** — Register and manage MCP connections
|
|
40
|
+
- **Secure Credential Vault** — AES-256-GCM encrypted credential storage
|
|
41
|
+
- **MCP Proxy** — Proxy requests to downstream MCPs with credential injection
|
|
42
|
+
- **OAuth 2.1 Server** — Full MCP OAuth spec compliance (PKCE, Dynamic Client Registration)
|
|
43
|
+
- **Management Tools via MCP** — All admin operations exposed as MCP tools
|
|
44
|
+
- **Web Dashboard** — React UI for managing orgs, connections, and members
|
|
45
|
+
- **Multi-DB Support** — SQLite (default), PostgreSQL, MySQL via Kysely
|
|
46
|
+
- **OpenTelemetry** — Distributed tracing and Prometheus metrics
|
|
47
|
+
- **Magic Link Auth** — Passwordless authentication via email
|
|
48
|
+
- **SSO Support** — Google, GitHub, and SAML providers
|
|
49
|
+
|
|
50
|
+
### 🚧 Planned
|
|
51
|
+
|
|
52
|
+
- [ ] MCP Bindings (protocol-level interfaces for tool abstraction)
|
|
53
|
+
- [ ] Tool composition across connections
|
|
54
|
+
- [ ] Webhook events
|
|
55
|
+
- [ ] CLI tool
|
|
56
|
+
|
|
57
|
+
## Quick Start
|
|
58
|
+
|
|
59
|
+
### Prerequisites
|
|
60
|
+
|
|
61
|
+
- [Bun](https://bun.sh) runtime (v1.0+)
|
|
62
|
+
|
|
63
|
+
### Run Locally (Zero Config)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Clone the repository
|
|
67
|
+
git clone https://github.com/deco-cx/admin.git
|
|
68
|
+
cd admin/apps/mesh
|
|
69
|
+
|
|
70
|
+
# Install dependencies
|
|
71
|
+
bun install
|
|
72
|
+
|
|
73
|
+
# Run database migrations
|
|
74
|
+
bun run migrate
|
|
75
|
+
|
|
76
|
+
# Start the server
|
|
77
|
+
bun run dev
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Run with NATS (Optional)
|
|
81
|
+
|
|
82
|
+
By default, the event bus uses polling to wake up workers. For lower latency and better multi-replica coordination, you can run a local [NATS](https://nats.io) server instead.
|
|
83
|
+
|
|
84
|
+
**Install nats-server:**
|
|
4
85
|
|
|
5
86
|
```bash
|
|
6
|
-
|
|
87
|
+
# macOS
|
|
88
|
+
brew install nats-server
|
|
89
|
+
|
|
90
|
+
# Other platforms — see https://docs.nats.io/running-a-nats-service/introduction/installation
|
|
7
91
|
```
|
|
8
92
|
|
|
9
|
-
|
|
93
|
+
**Start NATS:**
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
nats-server
|
|
97
|
+
```
|
|
10
98
|
|
|
11
|
-
|
|
99
|
+
**Add to your `.env` file:**
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
NATS_URL=nats://localhost:4222
|
|
103
|
+
```
|
|
12
104
|
|
|
13
|
-
|
|
14
|
-
all from a single dashboard. Browse specialized agents, wire up 50+ integrations
|
|
15
|
-
via MCP, and track every token, cost, and action in real time.
|
|
105
|
+
When `NATS_URL` is set, mesh automatically switches to the NATS notify strategy. Polling remains active as a safety net.
|
|
16
106
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
The server starts at `http://localhost:3000` with:
|
|
110
|
+
- 📋 Health check: `http://localhost:3000/health`
|
|
111
|
+
- 🔐 Auth endpoints: `http://localhost:3000/api/auth/*`
|
|
112
|
+
- 🔧 MCP endpoint: `http://localhost:3000/mcp`
|
|
113
|
+
- 📊 Metrics: `http://localhost:3000/metrics`
|
|
114
|
+
|
|
115
|
+
A SQLite database is automatically created at `./data/mesh.db`.
|
|
116
|
+
|
|
117
|
+
## Architecture
|
|
118
|
+
|
|
119
|
+
### Project Structure
|
|
22
120
|
|
|
23
121
|
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
122
|
+
apps/mesh/
|
|
123
|
+
├── src/
|
|
124
|
+
│ ├── api/ # Hono HTTP server
|
|
125
|
+
│ │ ├── routes/
|
|
126
|
+
│ │ │ ├── auth.ts # Custom auth endpoints
|
|
127
|
+
│ │ │ ├── management.ts # MCP management server
|
|
128
|
+
│ │ │ ├── models.ts # LLM provider routing
|
|
129
|
+
│ │ │ └── proxy.ts # MCP proxy server
|
|
130
|
+
│ │ └── utils/
|
|
131
|
+
│ │ └── mcp.ts # MCP server builder
|
|
132
|
+
│ │
|
|
133
|
+
│ ├── auth/ # Better Auth configuration
|
|
134
|
+
│ │ ├── index.ts # Auth instance
|
|
135
|
+
│ │ ├── jwt.ts # JWT utilities
|
|
136
|
+
│ │ ├── oauth-providers.ts # Social login providers
|
|
137
|
+
│ │ └── sso.ts # SAML SSO
|
|
138
|
+
│ │
|
|
139
|
+
│ ├── core/ # Core abstractions
|
|
140
|
+
│ │ ├── access-control.ts # Permission checking
|
|
141
|
+
│ │ ├── context-factory.ts # MeshContext factory
|
|
142
|
+
│ │ ├── define-tool.ts # Tool definition helper
|
|
143
|
+
│ │ └── mesh-context.ts # Request context type
|
|
144
|
+
│ │
|
|
145
|
+
│ ├── database/ # Kysely database setup
|
|
146
|
+
│ ├── encryption/ # Credential vault (AES-256-GCM)
|
|
147
|
+
│ ├── observability/ # OpenTelemetry setup
|
|
148
|
+
│ ├── storage/ # Database adapters
|
|
149
|
+
│ │
|
|
150
|
+
│ ├── tools/ # MCP management tools
|
|
151
|
+
│ │ ├── connection/ # CONNECTION_* tools
|
|
152
|
+
│ │ ├── organization/ # ORGANIZATION_* tools
|
|
153
|
+
│ │ └── database/ # DATABASE_* tools
|
|
154
|
+
│ │
|
|
155
|
+
│ └── web/ # React frontend
|
|
156
|
+
│ ├── components/
|
|
157
|
+
│ ├── hooks/
|
|
158
|
+
│ ├── layouts/
|
|
159
|
+
│ ├── providers/
|
|
160
|
+
│ └── routes/
|
|
161
|
+
│
|
|
162
|
+
├── migrations/ # Kysely migrations
|
|
163
|
+
├── spec/ # Design specifications
|
|
164
|
+
│ └── 001.md # Full mesh spec
|
|
165
|
+
└── data/ # SQLite database (gitignored)
|
|
32
166
|
```
|
|
33
167
|
|
|
34
|
-
|
|
168
|
+
### Tech Stack
|
|
169
|
+
|
|
170
|
+
| Layer | Technology |
|
|
171
|
+
|-------|------------|
|
|
172
|
+
| Runtime | Bun |
|
|
173
|
+
| Server | Hono |
|
|
174
|
+
| Database | Kysely (SQLite/PostgreSQL/MySQL) |
|
|
175
|
+
| Auth | Better Auth (+ MCP, API Key, Organization plugins) |
|
|
176
|
+
| Frontend | React 19, TanStack Router, TanStack Query |
|
|
177
|
+
| Styling | Tailwind CSS v4 |
|
|
178
|
+
| MCP | @modelcontextprotocol/sdk |
|
|
179
|
+
| Observability | OpenTelemetry, Prometheus |
|
|
180
|
+
|
|
181
|
+
## API Reference
|
|
182
|
+
|
|
183
|
+
### MCP Endpoints
|
|
184
|
+
|
|
185
|
+
#### Management API (`/mcp`)
|
|
186
|
+
|
|
187
|
+
Exposes organization and connection management tools via MCP protocol:
|
|
35
188
|
|
|
36
189
|
```bash
|
|
37
|
-
#
|
|
38
|
-
|
|
190
|
+
# List tools
|
|
191
|
+
curl -X POST http://localhost:3000/mcp \
|
|
192
|
+
-H "Authorization: Bearer <token>" \
|
|
193
|
+
-H "Content-Type: application/json" \
|
|
194
|
+
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Available Tools:**
|
|
198
|
+
|
|
199
|
+
| Tool | Description |
|
|
200
|
+
|------|-------------|
|
|
201
|
+
| `ORGANIZATION_CREATE` | Create a new organization |
|
|
202
|
+
| `ORGANIZATION_LIST` | List user's organizations |
|
|
203
|
+
| `ORGANIZATION_GET` | Get organization details |
|
|
204
|
+
| `ORGANIZATION_UPDATE` | Update organization |
|
|
205
|
+
| `ORGANIZATION_DELETE` | Delete organization |
|
|
206
|
+
| `ORGANIZATION_MEMBER_ADD` | Add member to organization |
|
|
207
|
+
| `ORGANIZATION_MEMBER_REMOVE` | Remove member |
|
|
208
|
+
| `ORGANIZATION_MEMBER_LIST` | List members |
|
|
209
|
+
| `ORGANIZATION_MEMBER_UPDATE_ROLE` | Update member role |
|
|
210
|
+
| `COLLECTION_CONNECTIONS_CREATE` | Register MCP connection |
|
|
211
|
+
| `COLLECTION_CONNECTIONS_LIST` | List connections |
|
|
212
|
+
| `COLLECTION_CONNECTIONS_GET` | Get connection details |
|
|
213
|
+
| `COLLECTION_CONNECTIONS_UPDATE` | Update connection |
|
|
214
|
+
| `COLLECTION_CONNECTIONS_DELETE` | Delete connection |
|
|
215
|
+
| `CONNECTION_TEST` | Test connection health |
|
|
216
|
+
| `CONNECTION_CONFIGURE` | Configure connection |
|
|
217
|
+
|
|
218
|
+
#### Proxy API (`/mcp/:connectionId`)
|
|
39
219
|
|
|
40
|
-
|
|
220
|
+
Proxies requests to downstream MCP services:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# Call a tool on a connected MCP service
|
|
224
|
+
curl -X POST http://localhost:3000/mcp/conn_abc123 \
|
|
225
|
+
-H "Authorization: Bearer <token>" \
|
|
226
|
+
-H "Content-Type: application/json" \
|
|
227
|
+
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"SEND_EMAIL","arguments":{...}},"id":1}'
|
|
41
228
|
```
|
|
42
229
|
|
|
43
|
-
|
|
230
|
+
The proxy:
|
|
231
|
+
1. Validates your token
|
|
232
|
+
2. Checks permissions for the tool
|
|
233
|
+
3. Retrieves and decrypts the connection's credentials
|
|
234
|
+
4. Forwards the request with proper auth
|
|
235
|
+
5. Logs the request to audit trail
|
|
236
|
+
|
|
237
|
+
### OAuth Discovery
|
|
238
|
+
|
|
239
|
+
MCP Mesh implements the full MCP OAuth specification:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# Protected Resource Metadata
|
|
243
|
+
GET /.well-known/oauth-protected-resource
|
|
244
|
+
|
|
245
|
+
# Authorization Server Metadata
|
|
246
|
+
GET /.well-known/oauth-authorization-server
|
|
247
|
+
|
|
248
|
+
# Dynamic Client Registration
|
|
249
|
+
POST /api/auth/register
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Configuration
|
|
253
|
+
|
|
254
|
+
### Environment Variables
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
# Database (optional - defaults to SQLite)
|
|
258
|
+
DATABASE_URL=postgresql://user:pass@host:5432/mesh
|
|
259
|
+
|
|
260
|
+
# Server port (optional - defaults to 3000)
|
|
261
|
+
PORT=3000
|
|
262
|
+
|
|
263
|
+
# Encryption key for credential vault (auto-generated if not set)
|
|
264
|
+
ENCRYPTION_KEY=your-32-byte-key
|
|
265
|
+
|
|
266
|
+
# Remote ClickHouse URL for production monitoring queries (optional)
|
|
267
|
+
# When set, spans are exported via OTLP (to an OTel Collector) and queries
|
|
268
|
+
# go to this ClickHouse instance. When unset, spans are written as NDJSON
|
|
269
|
+
# files to ~/deco/system/monitoring and queried locally via chdb.
|
|
270
|
+
CLICKHOUSE_URL=http://localhost:8123
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Auth Configuration
|
|
274
|
+
|
|
275
|
+
Create `auth-config.json` for custom auth providers:
|
|
44
276
|
|
|
45
277
|
```json
|
|
46
278
|
{
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
279
|
+
"emailAndPassword": {
|
|
280
|
+
"enabled": true
|
|
281
|
+
},
|
|
282
|
+
"socialProviders": {
|
|
283
|
+
"google": {
|
|
284
|
+
"clientId": "your-google-client-id",
|
|
285
|
+
"clientSecret": "your-google-client-secret"
|
|
286
|
+
},
|
|
287
|
+
"github": {
|
|
288
|
+
"clientId": "your-github-client-id",
|
|
289
|
+
"clientSecret": "your-github-client-secret"
|
|
50
290
|
}
|
|
51
|
-
}
|
|
291
|
+
},
|
|
292
|
+
"magicLinkConfig": {
|
|
293
|
+
"enabled": true,
|
|
294
|
+
"emailProviderId": "resend-primary"
|
|
295
|
+
},
|
|
296
|
+
"emailProviders": [
|
|
297
|
+
{
|
|
298
|
+
"id": "resend-primary",
|
|
299
|
+
"provider": "resend",
|
|
300
|
+
"config": {
|
|
301
|
+
"apiKey": "your-resend-api-key",
|
|
302
|
+
"fromEmail": "noreply@yourdomain.com"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
]
|
|
52
306
|
}
|
|
53
307
|
```
|
|
54
308
|
|
|
55
|
-
|
|
309
|
+
See `auth-config.example.json` for a complete example.
|
|
310
|
+
|
|
311
|
+
## Development
|
|
312
|
+
|
|
313
|
+
### Scripts
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
# Development (hot reload)
|
|
317
|
+
bun run dev
|
|
318
|
+
|
|
319
|
+
# Run tests
|
|
320
|
+
bun run test
|
|
321
|
+
|
|
322
|
+
# Type check
|
|
323
|
+
bun run check
|
|
56
324
|
|
|
57
|
-
|
|
58
|
-
|
|
325
|
+
# Build for production
|
|
326
|
+
bun run build:client
|
|
327
|
+
bun run build:server
|
|
59
328
|
|
|
60
|
-
|
|
329
|
+
# Run production build
|
|
330
|
+
bun run start
|
|
331
|
+
|
|
332
|
+
# Database migrations
|
|
333
|
+
bun run migrate
|
|
334
|
+
bun run better-auth:migrate # Better Auth tables
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Testing
|
|
338
|
+
|
|
339
|
+
Tests use Bun's built-in test runner:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
# Run all tests
|
|
343
|
+
bun test
|
|
61
344
|
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
345
|
+
# Run specific test file
|
|
346
|
+
bun test src/core/access-control.test.ts
|
|
347
|
+
|
|
348
|
+
# Watch mode
|
|
349
|
+
bun test --watch
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
## Deployment
|
|
353
|
+
|
|
354
|
+
### Docker
|
|
355
|
+
|
|
356
|
+
```dockerfile
|
|
357
|
+
FROM oven/bun:1 AS builder
|
|
358
|
+
WORKDIR /app
|
|
359
|
+
COPY package.json bun.lock ./
|
|
360
|
+
RUN bun install --frozen-lockfile
|
|
361
|
+
COPY . .
|
|
362
|
+
RUN bun run build:client && bun run build:server
|
|
363
|
+
|
|
364
|
+
FROM oven/bun:1-slim
|
|
365
|
+
WORKDIR /app
|
|
366
|
+
COPY --from=builder /app/dist ./dist
|
|
367
|
+
CMD ["bun", "run", "dist/server/server.js"]
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
### Docker Compose
|
|
371
|
+
|
|
372
|
+
```yaml
|
|
373
|
+
version: '3.8'
|
|
374
|
+
services:
|
|
375
|
+
mesh:
|
|
376
|
+
build: .
|
|
377
|
+
ports:
|
|
378
|
+
- "3000:3000"
|
|
379
|
+
volumes:
|
|
380
|
+
- ./data:/app/data
|
|
381
|
+
- ./auth-config.json:/app/auth-config.json
|
|
382
|
+
environment:
|
|
383
|
+
- NODE_ENV=production
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### With PostgreSQL
|
|
387
|
+
|
|
388
|
+
```yaml
|
|
389
|
+
version: '3.8'
|
|
390
|
+
services:
|
|
391
|
+
postgres:
|
|
392
|
+
image: postgres:16
|
|
393
|
+
environment:
|
|
394
|
+
POSTGRES_DB: mesh
|
|
395
|
+
POSTGRES_USER: mesh
|
|
396
|
+
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
397
|
+
volumes:
|
|
398
|
+
- postgres_data:/var/lib/postgresql/data
|
|
399
|
+
|
|
400
|
+
mesh:
|
|
401
|
+
build: .
|
|
402
|
+
depends_on:
|
|
403
|
+
- postgres
|
|
404
|
+
environment:
|
|
405
|
+
DATABASE_URL: postgresql://mesh:${DB_PASSWORD}@postgres:5432/mesh
|
|
406
|
+
ports:
|
|
407
|
+
- "3000:3000"
|
|
408
|
+
|
|
409
|
+
volumes:
|
|
410
|
+
postgres_data:
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
## Specification
|
|
414
|
+
|
|
415
|
+
For the complete technical specification, see [`spec/001.md`](./spec/001.md).
|
|
416
|
+
|
|
417
|
+
Key topics covered:
|
|
418
|
+
- MCP-native API architecture
|
|
419
|
+
- OAuth 2.1 implementation (Authorization Server, Resource Server, Client)
|
|
420
|
+
- Organization-based access control
|
|
421
|
+
- MCP Bindings concept
|
|
422
|
+
- OpenTelemetry observability
|
|
423
|
+
- Database schema design
|
|
424
|
+
- Self-hosting guide
|
|
425
|
+
|
|
426
|
+
## Contributing
|
|
427
|
+
|
|
428
|
+
We welcome contributions! Please see our [Contributing Guide](../../CONTRIBUTING.md).
|
|
429
|
+
|
|
430
|
+
### Development Setup
|
|
431
|
+
|
|
432
|
+
1. Fork and clone the repository
|
|
433
|
+
2. Install dependencies: `bun install`
|
|
434
|
+
3. Start development server: `bun run dev`
|
|
435
|
+
4. Make changes and add tests
|
|
436
|
+
5. Submit a pull request
|
|
66
437
|
|
|
67
438
|
## License
|
|
68
439
|
|
|
69
|
-
|
|
70
|
-
|
|
440
|
+
MIT License - see [LICENSE](../../LICENSE.md) for details.
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
<p align="center">
|
|
445
|
+
Built with 💚 by <a href="https://decocms.com">decocms.com</a>
|
|
446
|
+
</p>
|
|
447
|
+
|