convex-mcp-gateway weekly downloads statistics
By tfohlmeister · npm · MCP servers
Auth-aware Convex component that exposes selected Convex functions as MCP tools.
convex-mcp-gateway has 8,736 recorded weekly downloads on npm, a decrease of 7.2% over the past 30 days, ranking #991 of 2,391 tracked listings.
About convex-mcp-gateway
convex-mcp-gateway
Auth-aware MCP server for Convex. Expose selected Convex functions as MCP tools, bring your own JWT issuer, declare scopes/roles per tool, get an audit log and OAuth 2.1 protected-resource discovery for free.
Built as a Convex Component.
<!-- START: Include on https://convex.dev/components -->Features
- Type-safe tool registration:
defineMcpQuery/defineMcpMutation/defineMcpActiondeclare a Convex function as an MCP tool with end-to- end-typedargsand (optional)returnsvalidators. Declare the list once and pass it astoolstohandleMcpRequest, the registry auto-syncs on connect (no separate registration mutation), or callgateway.register(...)for imperative/dynamic catalogs - MCP dual-era Streamable HTTP: legacy 2025-03-26/2025-06-18/2025-11-25 sessions remain supported alongside stateless 2026-07-28 requests, discovery, routing-header validation, and private cache hints. A client requesting an unknown revision negotiates down to 2025-11-25 (what the current official TypeScript SDK pins as latest); all three legacy revisions share one transport wire contract (2025-11-25's SSE resumability framing needs an event store the gateway doesn't have, so it isn't emitted, a deliberate SHOULD deviation)
- Stateless multi-round trips: declarative stateless-era tools use a host-side
beforeCallhook to request input before any Convex function runs, then receive HMAC-verified continuation state plus an idempotency key on retry;resources/readgets the same treatment throughbeforeResourceRead, so a read can ask a question before serving content. See Multi-round-trip requests and Resources - MCP Tasks (poll-first): opt-in
io.modelcontextprotocol/taskssupport; task-augmentedtools/callreturns a handle, clients polltasks/get, owner-bound with TTL retention and lifecycle audit. Built-in durable executor via the Convex scheduler, or bring@convex-dev/workflowfor retries andinput_requiredrounds. See Tasks - MCP resources:
defineMcpResource/defineMcpResourceTemplateserveresources/list,resources/read, andresources/templates/list(RFC 6570). CentralauthorizeResourcehook, opt-in resource audit, runtime shape validation, opt-inresources/subscribecapability, and opt-in anonymous access for public content. See Resources & templates - MCP prompts:
defineMcpPromptservesprompts/listandprompts/get, with argument checks, result validation, anauthorizePrompthook, and opt-in anonymous access. See Prompts - One authorize callback: gates
tools/calland filterstools/listwithmode: "list" | "call"; uses your existingctx.auth.getUserIdentity() - OAuth 2.1 protected-resource discovery: RFC 9728 metadata,
RFC 6750
WWW-Authenticateheaders, multi-tenant ready - Optional OAuth bridge: RFC 8414 AS metadata wrap + RFC 7591 DCR for browser MCP clients (claude.ai) against IdPs without DCR support, with opt-in CIMD advertisement when the upstream authorization server supports it
requireAuthfor all-private servers: opt-in 401-challenge on anonymous requests so browser clients (claude.ai) begin the OAuth flow instead of seeing an emptytools/listand never prompting a logininitializeInstructions: optional server-level guidance returned in the MCPinitializeresult'sinstructionsfield, surfaced to the LLM without bloating individual tool descriptions- Audit log: one row per call with per-tool argument redaction (verbatim / dropped / dotted-path redacted)
- Wire-error sanitization: generic message on the wire, full detail
in audit;
ConvexErrorpasses through for deliberate user-facing messages convex-testhelper:convex-mcp-gateway/testexports a one-lineregister(t)that hooks the component into aconvexTestinstance so your host tests can exercise the full/mcp/round-trip in-process. See Testing
What it does
You mount the gateway in a single httpAction and pass an authorize
JS callback that decides per call whether the request goes through.
The gateway handles the JSON-RPC envelope, legacy Streamable-HTTP session
lifecycle, stateless 2026-07-28 requests, the OAuth discovery doc, the
WWW-Authenticate headers, and the audit log. Your existing Convex auth
(Clerk, Auth0, Pocket-ID, custom JWT issuer) just works.
A standalone editorial-styled version of the diagram is at
docs/diagrams/architecture.html;
in-depth sequence and data-flow diagrams live in
docs/architecture.md.
Try it
The companion repo convex-mcp-gateway-demo is a notes app that registers five tools (public, identity-gated, role-gated) and shows the audit log live. Three run modes including a local-backend setup that needs no Convex account:…
Description from the npm listing.
- convex
- convex-component
- mcp
- model-context-protocol
- oauth
- ai
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm MCP servers plugins
All 20 convex-mcp-gateway alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/convex-mcp-gateway. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.