This repository contains the Converse MCP Server - a functional Node.js implementation of an MCP server.
src/- Main source code for the Converse MCP Serverdocs/- Complete documentation (API, Architecture, Examples)tests/- Comprehensive test suite (unit, integration, e2e)scripts/- Development and build scriptsexamples/- Usage examples and sample configurationsbin/- Executable binaries for CLI usage
The Converse MCP Server follows a functional architecture with a single unified chat tool that takes a mode parameter:
chatmode - 1..N models answer independently in parallelconsensusmode - ≥2 models answer in parallel, then refine via cross-feedbackroundtablemode - models answer sequentially, each building on the running transcript
IMPORTANT: This project uses pnpm, not npm.
# Install dependencies (use pnpm, NOT npm)
pnpm install
# Start development server
pnpm run dev
# Run tests
pnpm testFor detailed implementation guidance, see:
docs/API.md- Complete API referencedocs/ARCHITECTURE.md- System architecture and design principlesdocs/EXAMPLES.md- Usage examples and patterns
This repo is fully automated for releases via release-please. Do not manually bump versions in package.json, manually run npm publish, or manually edit the top of CHANGELOG.md — the automation owns these.
- Every push to
mainwith a user-facing commit triggers a release. release-please skips pushes whose commits are all hidden types (ci:,chore:,docs:, etc.) with "No user facing commits found — skipping"; force one of these with aRelease-As:footer if you need to. Dependabot auto-merges explicitly dispatch the same workflow after merge so dependency bumps still publish a patch release (always-bump-patchstrategy). Workflow:.github/workflows/release.yml. - The flow in a single workflow run (~50s):
- release-please opens (or updates) a "chore(main): release X.Y.Z" PR with version bump + CHANGELOG.md entry.
- Workflow auto-merges that PR with
gh pr merge --squash. - release-please runs again, sees the just-merged release PR, tags
vX.Y.Z, creates a GitHub Release. - Workflow runs
pnpm install --frozen-lockfile+ lint + typecheck + test:unit, upgrades npm (npm install -g npm@latest), thennpm publish --access public.
- Branch protection on
mainis off — direct pushes are allowed and intentional, since the automation needs to push the auto-merge commit. - Publishing uses npm Trusted Publishing (OIDC) — no
NPM_TOKENsecret. The job'sid-token: writepermission + a trusted publisher configured on npmjs.com (orgFallDownTheSystem, repoconverse, workflowrelease.yml) authenticate the publish, and provenance is generated automatically. Trusted Publishing requires npm >= 11.5.1, which is why the workflow upgrades npm before publishing.
always-bump-patch ignores conventional-commit semantics for bump decisions, so feat: or BREAKING CHANGE: won't auto-promote. To intentionally bump minor/major:
git commit -m "feat: new important thing
Release-As: 2.23.0"
The Release-As: X.Y.Z footer (anywhere in the commit body) overrides the strategy for that release.
Not directly supported with always-bump-patch. Either accept the patch release or batch trivial changes into a meaningful one. (You can also amend release-please-config.json to skip specific commit types in changelog-sections, but the version still bumps.)
.github/dependabot.ymlruns npm + github-actions weekly (Mon 06:00 UTC). Patch+minor are grouped into one PR per ecosystem; majors are individual.- Commits use the
deps:prefix so they bucket under "Dependencies" in CHANGELOG.md. .github/workflows/dependabot-auto-merge.ymlauto-approves patch+minor PRs, waits for the merge to complete, and dispatches the release workflow so merged dependency updates publish a new npm patch release. Major-version PRs get aneeds-reviewlabel and wait for human review.- Don't manually run
npm update/ bump deps inpackage.jsonunless you're fixing something urgent that Dependabot won't catch. The weekly cadence handles routine bumps.
.github/workflows/ci.ymlruns lint + typecheck + test:unit on every PR and every push to main.- CI is not required to merge (no branch protection), but failures should still be addressed before pushing more changes.
- The
unittest suite (pnpm run test:unit) does not make real API calls and does not require API keys — it's the only suite CI runs.
- A repository ruleset auto-requests Copilot code review on PRs against
main. Copilot leaves comment-only reviews (it cannot approve or block merges) and natively skips dependency files likepackage.jsonand lockfiles.
- The historical section (entries up through
[2.22.4]) is manually maintained in "Keep a Changelog" format. - New entries from
[2.22.5]onward are auto-generated by release-please in its own format (### Bug Fixes,### Features,### Dependencies, etc.). The two formats coexist — release-please prepends new sections at the top.
- Don't commit changes to
package.json'sversionfield — release-please owns it. - Don't commit changes to
.release-please-manifest.json— release-please owns it. - Don't manually create git tags
vX.Y.Z— release-please owns them. - Don't commit a
CHANGELOG.mdentry for an unreleased version — release-please will generate it.
.github/workflows/release.yml— the combined release-please + npm publish workflow.github/workflows/ci.yml— lint + typecheck + unit tests.github/workflows/dependabot-auto-merge.yml— auto-merge patch/minor Dependabot PRs.github/dependabot.yml— Dependabot schedule and grouping configrelease-please-config.json— release-please settings (release-type, versioning-strategy, changelog sections).release-please-manifest.json— current released version (release-please updates this)
IMPORTANT: Always use pnpm instead of npm for this project.
Before making any changes or submitting PRs, always run the comprehensive quality checks:
# Run all quality checks (linting, formatting, tests)
pnpm run validate
# Run individual checks
pnpm run lint
pnpm run typecheck
pnpm testIMPORTANT: ESLint is the only formatter for this project — Prettier has been removed. Do NOT run npx prettier on project files; it uses incompatible defaults (double quotes, different indentation) and will:
- Convert single quotes to double quotes (breaks ESLint
quotesrule) - Reindent files in ways that break the ESLint
indentrule - Convert
function()to() =>in test mocks (breaks constructor semantics, causes test failures)
Use pnpm run format (alias for eslint src/ tests/ --fix) or npx eslint --fix <file> to auto-fix formatting issues.
# Start development server with hot reload
pnpm run dev
# Run in debug mode
pnpm run debug
# Run specific test suites
pnpm run test:unit
pnpm run test:integration
pnpm run test:providers
pnpm run test:tools# Install dependencies and start (use pnpm)
pnpm install
pnpm start# Follow logs in real-time with debug logging
LOG_LEVEL=debug pnpm run dev
# Or check specific log levels
LOG_LEVEL=info pnpm start
# Debug with summarization enabled
ENABLE_RESPONSE_SUMMARIZATION=true LOG_LEVEL=debug pnpm run devIMPORTANT: Do NOT run the full test suite (pnpm test) during development. The test suite contains hundreds of tests including integration and e2e tests that make real API calls. Running all tests will timeout and consume API credits.
Instead, run only the specific tests relevant to your changes:
# Run specific test file
pnpm test -- tests/unit/providers/openai.test.js
# Run tests matching a pattern
pnpm test -- tests/unit/providers/*.test.js
# Run with verbose output
pnpm test -- tests/unit/providers/openai.test.js --reporter=verbose# Run full test suite (WARNING: takes a long time, uses real APIs)
pnpm test
# Run tests with coverage
pnpm run test:coverage
# Run tests in watch mode
pnpm run test:watch# Unit tests only
pnpm run test:unit
# Integration tests only
pnpm run test:integration
# End-to-end tests with real API calls
pnpm run test:e2e
# Provider tests
pnpm run test:providers
# Tool tests
pnpm run test:tools
# MCP client tests (HTTP-based client-server testing)
pnpm run test:mcp-client
# Performance tests
pnpm run test:performance
# Utility tests
pnpm run test:utils
# Resource tests
pnpm run test:resources
# Prompt tests
pnpm run test:prompts- Install dependencies:
pnpm install - Run quality checks:
pnpm run validate - Start development server:
pnpm run dev
- Run quality checks again:
pnpm run validate - Run tests:
pnpm test - Verify functionality:
pnpm start - Check logs for any issues
- Final quality check:
pnpm run validate - Verify all tests pass:
pnpm test - Check documentation is up to date
The Converse MCP Server exposes three tools:
-
Chat Tool (
chat) — one tool, three modes selected by themodeparameter:chat(default): 1..N models invoked in parallel; each responds independently and never sees the others. N=1 preserves auto-mode provider failover and Codex thread reuse; N>1 returns per-model labeled sections.consensus: ≥2 models answer in parallel, then a cross-feedback refinement phase runs where each model sees the others' answers and refines its own.["auto"]expands to the first 3 available providers.roundtable: models respond SEQUENTIALLY in the order given; each sees the full running transcript and builds on prior turns. One call = one lap; passcontinuation_idfor more laps. A single model talks to itself across laps; duplicate model entries are allowed only in this mode.- Shared across modes:
files/imagescontext,reasoning_effort,async: truebackground execution,export: truedisk export, andcontinuation_idfor persistent multi-turn threads. You MAY switch modes on a resuming turn — the shared transcript is the context.
// mode "chat" (default) — single answer or independent parallel answers { "prompt": "How should I structure auth for this API?", "models": ["auto"] } // mode "consensus" — parallel answers + cross-feedback refinement { "prompt": "Microservices or monolith for 100k users?", "models": ["gpt-5.6", "grok-4.5", "gemini-2.5-pro"], "mode": "consensus" } // mode "roundtable" — sequential dialogue in the given ORDER { "prompt": "Critique this caching strategy.", "models": ["codex", "gemini", "claude"], "mode": "roundtable" }
-
Check Status Tool (
check_status)- Monitor progress of asynchronous operations
- Retrieve results from completed background jobs
- List recent jobs with status information
- Smart display with AI-generated titles and summaries
-
Cancel Job Tool (
cancel_job)- Cancel running asynchronous operations
- Graceful termination with resource cleanup
- chat: parallel, independent answers. Auto-failover and Codex thread reuse apply in this mode.
- consensus: parallel phase 1, then a refinement phase that always runs when ≥2 phase-1 responses succeed. Requires ≥2 resolved models (an explicit single model is rejected — use mode
chat). - roundtable: sequential turns; each turn's full context is packed into one self-contained message so SDK providers that only read the last user message still see the transcript.
# Check if environment is set up correctly
pnpm run validate
# View recent errors
LOG_LEVEL=debug pnpm start
# Check dependencies
pnpm install# Run tests with verbose output
pnpm test -- --verbose
# Run specific test file
pnpm test tests/tools/chat.test.js
# Check for syntax issues
pnpm run lint# Verify API keys are configured
cat .env
# Check configuration loading
LOG_LEVEL=debug npm startsrc/index.js- Main entry point and MCP server setupsrc/config.js- Configuration and environment managementsrc/tools/- MCP tool implementations (chat.js unified tool + modes/parallel.js, modes/roundtable.js engines)src/providers/- AI provider implementations (OpenAI, Google, XAI)src/utils/- Utility functions (logging, context processing, etc.)src/transport/- HTTP transport layer for MCP communicationsrc/router.js- Request routing and middlewaresrc/systemPrompts.js- System prompt templatessrc/continuationStore.js- Conversation state managementtests/- Comprehensive test suitescripts/- Development and build automation scriptsdocs/- Complete documentation
- Node.js 24.0.0+ (LTS recommended)
- pnpm (required - do NOT use npm or yarn)
- Install:
npm install -g pnpmorcorepack enable
- Install:
- API keys for at least one provider (OpenAI, Google, or XAI)
- Environment variables configured in
.envfile
When enabled, the server automatically generates intelligent titles and summaries for better context understanding:
- Automatic Title Generation: Creates descriptive titles (up to 60 chars) for each request
- Streaming Summaries: Status check returns an up-to-date summary of the progress based on the partially streamed response
- Final Summaries: Concise 1-2 sentence summaries of completed responses
- Smart Status Display: Enhanced check_status tool shows titles and summaries in job listings
- Persistent Context: Summaries are stored with async jobs for better progress tracking
Configuration:
# Enable in your .env file
ENABLE_RESPONSE_SUMMARIZATION=true # Default: false
SUMMARIZATION_MODEL=gpt-5-nano # Default: gpt-5-nanoThe server uses environment-driven configuration. Copy .env.example to .env and configure:
# Required: At least one API key
OPENAI_API_KEY=sk-proj-your_key_here
GOOGLE_API_KEY=your_google_key_here
XAI_API_KEY=xai-your_key_here
# Optional: Server settings
MAX_MCP_OUTPUT_TOKENS=200000
LOG_LEVEL=info
PORT=3157
# Optional: AI Summarization (v1.14.0+)
ENABLE_RESPONSE_SUMMARIZATION=true
SUMMARIZATION_MODEL=gpt-5-nanoThe server can be deployed using:
# NPX (for users - uses npm registry)
npx converse-mcp-server
# Global installation (for users)
npm install -g converse-mcp-server
converse
# From source (for development - use pnpm)
git clone https://github.com/FallDownTheSystem/converse.git
cd converse
pnpm install
pnpm startNote: End users can use npm/npx to install the published package. Developers working on the codebase must use pnpm.
This guide provides everything needed to efficiently work with the Converse MCP Server codebase using Claude.