New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

opsdoctor-mcp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opsdoctor-mcp

AI-powered operations diagnostic and workflow audit MCP server for SMB consulting — CRM diagnostics, multi-stage workflow audits, industry knowledge base, and branded PDF reports

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
15
-91.18%
Maintainers
1
Weekly downloads
 
Created
Source

OpsDoctor MCP Server

Version: 2.1.0 Runtime: Node.js + TypeScript (tsx) AI Backend: Google Gemini 2.5 Flash Protocol: Model Context Protocol (MCP) via stdio transport Owner: Resolution AI (resolutionai.solutions)

OpsDoctor is an AI-powered operations diagnostic and workflow audit tool built as an MCP server. It provides structured CRM troubleshooting, multi-stage workflow assessments, an embedded knowledge base, persistent audit history, and branded PDF report generation — all callable as MCP tools from any compatible client (Claude Code, Claude Desktop, etc.).

Tools

OpsDoctor exposes 6 MCP tools:

1. run_diagnostic

Diagnose a CRM or operational issue using AI. Returns a structured report with root causes, step-by-step fixes, verification steps, and prevention tips.

ParameterTypeRequiredDescription
crm_namestringYesCRM system name (e.g. HubSpot, Salesforce, Zoho, Go High Level, Dubsado)
symptomsstringYesDescription of the issue or symptoms
company_contextstringNoCompany size, team structure, or other relevant context
industryenumNoIndustry vertical for context-aware diagnostics
client_namestringNoClient or company name for history tracking

What it does:

  • Looks up the CRM from a library of 39 platform-specific diagnostic profiles with detailed focus areas, common patterns, and known issues
  • When an industry is specified, enriches the prompt with industry-specific knowledge base entries (discovery areas, red flags, technology stack)
  • Sends the assembled context to Gemini for structured analysis
  • Auto-persists the result to audit history

Supported CRMs (39): Acculynx, ActiveCampaign, Airtable, Apptivo, Bitrix24, Buildertrend, Capsule, ClickUp, Close, CoConstruct, CompanyCam, Contractor Foreman, Copper, Creatio, Dubsado, EnrollTools, FieldPulse, Freshsales, GoHighLevel, HoneyBook, HubSpot, Insightly, Jobber, Keap, Less Annoying CRM, Microsoft Dynamics 365, Monday.com, NetSuite, Nimble, Ontraport, Oracle CX, Pipedrive, Procore, Salesforce, SAP Sales Cloud, ServiceTitan, SugarCRM, Zendesk, Zoho

2. run_workflow_audit

Audit an operational workflow. Supports 4 modes for different levels of depth.

ParameterTypeRequiredDescription
workflow_descriptionstringYesDescription of the workflow or process to audit
industrystringNoIndustry vertical (e.g. real-estate, insurance, legal)
team_sizestringNoApproximate team size
modeenumNoquick (default), intake, assess, or followup
intake_answersobjectFor assess/followup7 structured intake answers
previous_scoresobjectFor followupDimension scores from the assess stage
followup_answersstringFor followupAnswers to follow-up questions from assess
client_namestringNoClient name for history tracking

Modes:

ModeAI CallDescription
quickYesSingle-pass audit. Returns an efficiency score (0-100), executive summary, bottlenecks, automation opportunities, risk assessment, and a 90-day action plan. Includes reference baseline comparison.
intakeNoReturns 7 structured discovery questions tailored to the industry. No AI call — instant response.
assessYesProcesses intake answers through AI for dimensional scoring across 4 dimensions (Efficiency 30%, Automation Readiness 25%, Risk Exposure 25%, Scalability 20%). Returns a weighted composite score, per-dimension findings, top issues, reference baseline comparison, and follow-up questions. Scoring uses calibrated rubrics with explicit anchors at each tier.
followupYesDeep-dive second pass. Takes the original intake answers, previous dimension scores, and answers to follow-up questions. Returns revised scores with change explanations, updated findings, and a comprehensive prioritized action plan. Scoring uses the same calibrated rubrics as the assess stage.

Scoring:

Score RangeHealth Label
80-100Healthy
60-79Needs Attention
40-59At Risk
0-39Critical

3. guided_audit

A structured multi-stage wrapper around run_workflow_audit that guides the LLM through the full audit flow. Each stage returns results plus explicit instructions for the next stage. Stateless — the LLM carries forward all context between calls.

ParameterTypeRequiredDescription
stageenumYesstart, assess, followup, or complete
workflow_descriptionstringYesWorkflow description (carry forward through all stages)
industrystringNoIndustry vertical
team_sizestringNoApproximate team size
client_namestringNoClient name for history tracking
intake_answersobjectFor assess+The 7 intake answers
previous_scoresobjectFor followup+Scores from the assess stage
followup_answersstringFor followup+Follow-up question answers

Stage flow:

start → (user answers 7 questions) → assess → (user answers follow-ups) → followup → complete

Each stage's output includes a "Next Step" block telling the LLM exactly which tool to call next, which parameters to carry forward, and what data to collect from the user.

4. query_knowledge_base

Search the embedded knowledge base for discovery questions, red/green flag guides, conversation scripts, technology stack references, data governance guidance, and vendor management entries. No AI call — instant keyword search over embedded content.

ParameterTypeRequiredDescription
querystringYesWhat to look up (e.g. "lead management red flags")
categoryenumNoFilter: discovery, red-flags, green-flags, scripts, technology-stack, data-governance, vendor-management, or all
industryenumNoFilter: general, real-estate, legal, insurance, streaming-entertainment, production, dental, home-services, or all

Knowledge base stats:

  • 330 entries across 8 industry verticals
  • 7 content categories per vertical
  • 8 industries: General (cross-industry), Real Estate, Legal, Insurance, Streaming & Entertainment, Production (Film/Video/Events), Dental, Home Services

5. get_audit_history

Retrieve past diagnostic and audit results from the persistent JSONL store. Results include audit IDs that can be passed to generate_report for PDFs.

ParameterTypeRequiredDescription
client_namestringNoFilter by client name (case-insensitive partial match)
typeenumNoFilter: diagnostic, quick-audit, assess-audit, followup-audit, or all (default)
limitnumberNoMaximum results to return (default: 10, most recent first)

What it returns:

  • Numbered list of past results, most recent first
  • Each entry shows: type, client name, timestamp (Mountain Time), key metrics (score, health label, score changes for follow-ups), and audit ID
  • PDF indicator for entries that have a generated report

6. generate_report

Generate a branded PDF report from a diagnostic or audit result. Accepts an audit ID (loads from history) or inline result data. Writes the PDF to disk and returns the file path.

ParameterTypeRequiredDescription
audit_idstringNoID of a history entry (from get_audit_history). Mutually exclusive with inline data.
report_typeenumNodiagnostic or audit. Required if providing inline data.
report_datastringNoJSON string of the structured result. Required if audit_id is not provided.
client_namestringNoClient name for the report filename

Output: PDF saved to ~/opsdoctor-data/reports/ with naming pattern OpsDoctor_{Type}_{Client}_{Date}.pdf. The history entry is updated with the PDF path.

Scoring Rubrics

All audit prompts include calibrated scoring rubrics with explicit anchors defining what each score range (0-19, 20-39, 40-59, 60-79, 80-100) looks like for each dimension. This prevents score inflation, ensures consistency across runs, and produces scores that are meaningful relative to the reference baselines. The full rubric is in src/data/scoring-rubric.ts (DIMENSIONAL_RUBRIC for assess/followup, QUICK_RUBRIC for quick mode).

Reference Baselines

Audit results include comparative reference baselines for the selected industry. These are informed estimates for service-based SMBs — not statistically validated industry averages — and are clearly labeled as such in all output.

IndustryEfficiencyAutomation ReadinessRisk ExposureScalabilityComposite
General (Cross-Industry)5540504548
Real Estate5238454245
Legal5835554048
Insurance6045584854
Streaming & Entertainment5048425549
Production (Film/Video/Events)4835403841
Dental6550605057
Home Services5238424044

Data & Persistence

  • Audit history: ~/opsdoctor-data/audit-history.jsonl (JSONL, one entry per line)
  • PDF reports: ~/opsdoctor-data/reports/
  • Data directory is configurable via the OPSDOCTOR_DATA_DIR environment variable
  • All results (diagnostics and audits) are automatically persisted on every run

Configuration

Environment Variables

VariableRequiredDescription
GEMINI_API_KEYYes (for AI tools)Google Gemini API key. Without it, run_diagnostic, run_workflow_audit (quick/assess/followup modes), and guided_audit (assess/followup stages) will return an error message. The knowledge base and audit history tools work without it.
OPSDOCTOR_DATA_DIRNoOverride the default data directory (~/opsdoctor-data)

Running

# Development
npm run dev

# Build + run compiled
npm run build
node dist/index.js

MCP Client Configuration

{
  "mcpServers": {
    "opsdoctor": {
      "command": "npx",
      "args": ["tsx", "src/index.ts"],
      "cwd": "/path/to/studio-a/mcp-servers/opsdoctor",
      "env": {
        "GEMINI_API_KEY": "your-key-here"
      }
    }
  }
}

Architecture

src/
  index.ts                  MCP server entry point (stdio transport)
  gemini.ts                 Gemini API client wrapper (never throws)
  types.ts                  Shared TypeScript types for all result formats
  paths.ts                  Deterministic path resolution for data/output dirs
  store.ts                  JSONL persistence (append, load, filter, update)
  tools/
    diagnostic.ts           run_diagnostic — CRM issue diagnosis
    workflow-audit.ts        run_workflow_audit — multi-mode workflow audit
    guided-audit.ts          guided_audit — structured multi-stage wrapper
    knowledge-base.ts        query_knowledge_base — keyword search over KB
    audit-history.ts         get_audit_history — history retrieval
    generate-report.ts       generate_report — PDF generation
  data/
    crm-profiles.ts          39 CRM diagnostic profiles
    benchmarks.ts            Industry reference baselines
    scoring-rubric.ts        Calibrated scoring anchors for audit prompts
    kb-entries.ts            KB entry type definitions + aggregation
    kb/
      general.ts             29 cross-industry KB entries
      real-estate.ts         43 real estate KB entries
      legal.ts               43 legal KB entries
      insurance.ts           43 insurance KB entries
      streaming-entertainment.ts  43 streaming/entertainment KB entries
      production.ts          43 production KB entries
      dental.ts              43 dental KB entries
      home-services.ts       43 home services KB entries
  pdf/
    report-generator.ts      PDFKit-based branded report generation

Dependencies

PackagePurpose
@modelcontextprotocol/sdkMCP server framework
@google/genaiGoogle Gemini AI client
pdfkitPDF report generation
zodInput schema validation

FAQs

Package last updated on 09 Sep 2026

Related posts