Sign In

@homenshum/convex-mcp-nodebench

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@homenshum/convex-mcp-nodebench

Convex-specific MCP server applying NodeBench self-instruct diligence patterns to Convex development. Schema audit, function compliance, deployment gates, persistent gotcha DB, and methodology guidance. Complements Context7 (raw docs) and official Convex

latest
Source
npmnpm
Version
0.10.1
Version published
Maintainers
1
Created
Source

convex-mcp-nodebench

Convex-specific MCP server that audits, verifies, and guides Convex development. 36 tools across schema audit, function compliance, security, performance, deployment gates, SARIF reporting, persistent gotcha DB, and adaptive architecture planning.

Complements Context7 (raw library docs) and the official Convex MCP (deployment introspection) with structured verification workflows and persistent Convex knowledge.

36 Tools

Core Audit (10 tools)

ToolWhat it does
convex_audit_schemaScan schema.ts for anti-patterns: deprecated validators, v.any(), reserved fields, missing indexes
convex_suggest_indexesAnalyze query patterns across all functions and suggest missing indexes
convex_check_validator_coverageCheck all exported functions have args + returns validators
convex_audit_functionsAudit function registration, validators, public/internal misuse, cross-call violations
convex_check_function_refsValidate api.x.y / internal.x.y references, detect direct function passing
convex_check_type_safetyFind as any casts, undefined returns, loose ID types across all files
convex_audit_authorizationAudit auth guard coverage: which public functions check getUserIdentity()
convex_audit_actionsAudit actions for direct DB access, missing error handling, external API patterns
convex_audit_transaction_safetyFind read-modify-write races, multiple runMutation in single functions
convex_audit_query_efficiencyDetect unbounded .collect(), .filter() without index, mutation-as-read

Infrastructure Audit (9 tools)

ToolWhat it does
convex_analyze_httpAnalyze http.ts: duplicate routes, missing CORS, OPTIONS preflight handlers
convex_check_cronsValidate crons.ts: duplicate names, public handlers, interval issues
convex_analyze_componentsParse convex.config.ts: active/conditional components, unused imports
convex_audit_storage_usageAudit storage: stores, deletes, missing null checks on getUrl()
convex_audit_paginationFind paginate calls missing validators or without proper cursor handling
convex_audit_vector_searchAudit vector indexes, search calls, dimension mismatches
convex_audit_schedulersFind runAfter/runAt usage, self-scheduling loops, missing termination
convex_audit_data_modelingAudit tables: deep nesting, dangling refs, v.any(), arrays-of-arrays
convex_audit_dev_setupCheck project hygiene: _generated dir, tsconfig, package deps, env files

Deployment & Quality Gate (4 tools)

ToolWhat it does
convex_pre_deploy_gatePre-deployment gate: schema, auth, validators, recent audits (blocks on critical)
convex_check_env_varsCheck env vars referenced in code exist in .env files (Convex-filtered)
convex_quality_gateComposite quality score (A-F grade) with configurable thresholds
convex_schema_migration_planDiff schema snapshots and generate migration steps with risk assessment

Reporting (2 tools)

ToolWhat it does
convex_export_sarifExport all audit results as SARIF 2.1.0 (GitHub Code Scanning compatible)
convex_audit_diffCompare current audit against baseline: new issues, fixed issues, trend

Adaptive Architect (3 tools)

ToolWhat it does
convex_scan_capabilitiesRegex scan of project structure: function types, data access, auth, storage, schema patterns
convex_verify_conceptVerify if a concept (e.g. "Vector Search RAG") is implemented via regex signatures
convex_generate_planGenerate Convex-specific implementation steps for missing signatures

Self-discovery loop: scan_capabilitiesverify_conceptgenerate_plan → implement → re-verify

Knowledge & Discovery (5 tools)

ToolWhat it does
convex_record_gotchaPersist a Convex gotcha/edge case for future reference
convex_search_gotchasFull-text search across known Convex gotchas (BM25 + FTS5)
convex_get_methodologyStep-by-step guides: schema audit, function compliance, deploy verification
convex_discover_toolsBM25 + optional embedding-enhanced semantic tool discovery
convex_critter_checkAccountability check: scores task intent (why/who/what) before starting work

Integration Bridge (3 tools)

ToolWhat it does
convex_generate_rules_mdGenerate Convex rules markdown from gotcha DB, recent audits, project stats
convex_snapshot_schemaCapture schema snapshot for diffing (tables, indexes, size). Auto-diffs against previous
convex_bootstrap_projectComprehensive project health scan with improvement plan

Quick Start

Install

npm install @homenshum/convex-mcp-nodebench

Add to MCP config (Claude Code, Cursor, Windsurf)

{
  "mcpServers": {
    "convex-mcp-nodebench": {
      "command": "npx",
      "args": ["@homenshum/convex-mcp-nodebench"]
    }
  }
}

First prompt

Audit the schema at /path/to/my-project, then run the quality gate

Set GOOGLE_API_KEY or OPENAI_API_KEY env var. The convex_discover_tools tool will automatically use embedding-enhanced search when available (Google text-embedding-004 or OpenAI text-embedding-3-small).

Self-Instruct QuickRefs

Every tool response includes a quickRef block guiding the agent to the next step:

{
  "nextAction": "Run convex_check_validator_coverage to ensure all functions have validators",
  "nextTools": ["convex_check_validator_coverage", "convex_audit_functions"],
  "methodology": "convex_schema_audit",
  "relatedGotchas": ["returns_validator_required", "new_function_syntax"],
  "confidence": "high"
}

Pre-Seeded Gotcha Database

Ships with 32 gotchas extracted from Convex best practices, auto-upserted on upgrade:

Critical: pagination_cursor_null_first, query_no_side_effects, use_node_for_external_api, validator_bigint_deprecated

Warnings: ctx_auth_returns_null, http_cors_manual, http_route_no_wildcard, avoid_v_any, mutation_transaction_atomicity, db_get_returns_null, storage_get_returns_null, convex_1mb_document_limit, scheduled_function_must_be_internal, and 19 more covering index ordering, undefined handling, field naming, action patterns...

Data Storage

Persistent SQLite at ~/.convex-mcp-nodebench/convex.db:

TablePurpose
convex_gotchasKnowledge base with FTS5 full-text search
schema_snapshotsSchema history for table + index diffing
deploy_checksDeployment gate audit trail
audit_resultsPer-file analysis cache
concept_verificationsArchitect concept verification history
critter_checksTask accountability records

Testing

npm test

63 tests (53 unit + 10 E2E) verify all 36 tools against the real nodebench-ai codebase (3,158 Convex functions, 328 tables, 82 crons, 44 HTTP routes).

Architecture

packages/convex-mcp-nodebench/
  src/
    index.ts                    -- MCP server, tool assembly (36 tools)
    db.ts                       -- SQLite schema + upsert seed logic
    types.ts                    -- Tool types, QuickRef interface
    gotchaSeed.ts               -- 32 pre-seeded Convex gotchas
    tools/
      schemaTools.ts            -- Schema audit, index suggestions, validator coverage
      functionTools.ts          -- Function audit, cross-call detection, ref checking
      httpTools.ts              -- HTTP endpoint analysis
      deploymentTools.ts        -- Pre-deploy gate, env var checking
      learningTools.ts          -- Gotcha recording + FTS5 search
      methodologyTools.ts       -- Methodology guides, BM25 tool discovery
      integrationBridgeTools.ts -- Rules generation, schema snapshots, project bootstrap
      cronTools.ts              -- Cron job validation
      componentTools.ts         -- Component config analysis
      critterTools.ts           -- Task accountability checking
      authorizationTools.ts     -- Auth guard audit
      queryEfficiencyTools.ts   -- Query performance audit
      actionAuditTools.ts       -- Action anti-pattern detection
      typeSafetyTools.ts        -- Type safety audit
      transactionSafetyTools.ts -- Transaction race detection
      storageAuditTools.ts      -- Storage usage audit
      paginationTools.ts        -- Pagination pattern audit
      dataModelingTools.ts      -- Data modeling audit
      devSetupTools.ts          -- Dev environment audit
      migrationTools.ts         -- Schema migration planning
      reportingTools.ts         -- SARIF export, baseline diff
      vectorSearchTools.ts      -- Vector search audit
      schedulerTools.ts         -- Scheduler audit
      qualityGateTools.ts       -- Composite quality gate
      architectTools.ts         -- Capability scan, concept verify, plan generation
      toolRegistry.ts           -- Central catalog with quickRef + BM25 scoring
      embeddingProvider.ts      -- Optional semantic search (Google/OpenAI embeddings)
    __tests__/
      tools.test.ts             -- 53 unit/integration tests
      architectE2E.test.ts      -- 10 E2E tests (industry-latest concept verification)

Changelog

v0.9.1

  • Fix: Strategy matching order in architect tools -- specific patterns (ctx.db.query, ctx.runMutation) now matched before generic keywords (query, mutation)

v0.9.0

  • 3 new tools: convex_scan_capabilities, convex_verify_concept, convex_generate_plan -- adaptive architect with Convex-specific regex patterns, strategies, and file hints
  • Self-discovery loop: scan → verify → plan → implement → re-verify
  • 7 Convex pattern categories: function types, schema, data access, auth, storage, client-side, cross-function calls
  • ~40 Convex-specific strategies in inferConvexStrategy() with correct priority ordering
  • 10 new E2E tests validating architect tools against industry-latest concepts (Vector Search RAG, Real-Time Collaboration, File Upload Pipeline, Scheduled Retry Queue, Row-Level Security)

v0.8.0

  • 14 new tools: authorization audit, query efficiency, action audit, type safety, transaction safety, storage audit, pagination audit, data modeling audit, dev setup audit, schema migration planning, SARIF 2.1.0 export, baseline diff, vector search audit, scheduler audit
  • Quality gate: Composite A-F scoring with configurable thresholds
  • SARIF 2.1.0: GitHub Code Scanning compatible export aggregating all audit types
  • Baseline diff: Track audit trends (improving/stable/degrading) over time
  • MCP Resources: project-health, recent-audits, gotcha-db
  • MCP Prompts: full-audit, pre-deploy-checklist, security-review

v0.4.0

  • New tool: convex_critter_check -- task accountability with 10 calibrated checks
  • Cross-call fix: improved detection of query→mutation violations
  • v.any() aggregation: grouped by table for cleaner output

v0.3.0

  • New tool: convex_analyze_http -- HTTP endpoint analysis
  • Cross-call detection: queries calling ctx.runMutation/ctx.runAction flagged as critical
  • 12 new gotchas: pagination, ctx.auth, scheduled functions, HTTP routes, CORS, storage, transactions
  • Schema snapshot diffs track index additions/removals per table
  • Gotcha seeding upgraded to upsert

v0.2.0

  • Schema audit noise reduced (836 -> 163 issues)
  • Function audit severity corrected
  • Deploy gate threshold: only blocks on >10 criticals
  • npm tarball reduced from 45.9kB to 31.5kB

v0.1.0

  • Initial release: 16 tools, 20 gotchas, BM25 discovery, embedding-enhanced search

Keywords

mcp

FAQs

Package last updated on 20 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts