feat: add Zuko MCP server#112
Open
Rishavraaj wants to merge 4 commits into
Open
Conversation
Exposes Zuko CRM data as MCP tools so AI coding agents (Claude Code, Cursor, Windsurf, Codex CLI, Gemini CLI) can query and mutate CRM records over the Model Context Protocol with full OAuth 2.0 / PKCE auth. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes @nx/dependency-checks lint errors in core, models, and sales. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Oz <oz-agent@warp.dev>
d2441c0 to
fb6d0e6
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exposes Zuko CRM data as MCP tools so AI coding agents can query and
mutate CRM records over the Model Context Protocol with full OAuth 2.0 /
PKCE authentication via BetterAuth.
POST /api/mcp— stateless, per-requesttransport, multi-tenant safe via org scoping
mcp()plugin wired intoauth.ts;withMcpAuthvalidates bearer tokens in-process(list, get, create, update, delete)
and a per-agent Setup Guide modal
Windsurf, Codex CLI, and Gemini CLI
Backend —
apps/backendmcp/mcp.service.tsMcpServerwith 15 tools; new server per request (stateless MCP)mcp/mcp.module.tsuseFactorymcp/mcp.bootstrap.ts/api/mcpon the Express adaptermain.tsregisterMcpRoutes()auth.tsmcp()plugin withFRONTEND_URL-awareloginPagemcp.service.spec.tsresolveOrganizationIdand all 4 list toolsDatabase —
libs/modelsOauthApplication,OauthAccessToken,OauthConsent20260427000000_add_mcp_oauth_tablesFrontend —
apps/weborg-connections.tsxuseQuery+ mutations;McpOAuthHandlerin<Suspense>mcp-setup-modal.tsxDialogwith per-agent config snippets and copy buttonserver/fetch.tsserver/query-options.tsqueryOptionswrappersserver/mutations.tsuseConnectAccount,useDisconnectAccount,useInstallGitHubApphooks/use-mcp-oauth.tspublic/icons/mcp.svg,claude.svg,cursor.svg,gemini-cli.svgBug Fixes
task.repository.ts—updateanddeletenow scope byorganizationId(security fix)task.repository.ts—findAllacceptsstatusfilter pushed to DB instead of post-filteringScreen Recording
Screen.Recording.2026-04-28.at.2.46.15.PM.mov
Test Plan
npx prisma migrate deployGET /.well-known/oauth-authorization-server— returns OAuth discovery JSONclaude mcp add --transport http ZukoCRM <endpoint> --header "Authorization: Bearer <token>"tools/listreturns 15 tools;list_dealsreturns org-scoped resultsnx test backend— all MCP service specs pass