MCP Server

Control Chorus Research from any AI coding agent via the Model Context Protocol (MCP).

Package

@chorus-research/mcp

Transport

stdio

The Model Context Protocol (MCP) is an open standard that lets AI assistants connect to external tools and data sources. The Chorus Research MCP server gives your AI agent direct access to survey creation, launch, and response collection — no HTTP calls or SDK wrappers needed.

The server exposes:

  • 10 tools — Audiences, pricing, surveys, launch, and response export
  • 2 resources — Audience catalog and pricing configuration
  • 2 prompts — Survey design guide and pre-launch checklist
Prefer REST? The same functionality is available via the REST API. Use whichever fits your workflow.

Installation

No manual installation is needed — MCP clients launch the server automatically using npx.

Run directly (recommended)
npx @chorus-research/mcp
Global install (optional)
npm install -g @chorus-research/mcp
chorus-research-mcp
Most clients (Claude Code, Cursor, etc.) will run npx for you automatically — just add the configuration below and restart.

Configuration

The server requires a CHORUS_API_KEY environment variable. You can obtain a key from the API Keys section in the Chorus Research app.

Environment Variables

ParameterTypeRequiredDescription
CHORUS_API_KEYstringRequiredYour Chorus Research API key. Obtain from the API Keys section in the app.
CHORUS_API_BASE_URLstringOptionalOverride the API base URL. Default: https://api.chorusresearch.io

Claude Code

Add to .mcp.json in your project root:

.mcp.json
{
  "mcpServers": {
    "chorus-research": {
      "command": "npx",
      "args": [
        "-y",
        "@chorus-research/mcp"
      ],
      "env": {
        "CHORUS_API_KEY": "your-api-key"
      }
    }
  }
}

Claude Desktop

Add to your config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "chorus-research": {
      "command": "npx",
      "args": [
        "-y",
        "@chorus-research/mcp"
      ],
      "env": {
        "CHORUS_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root:

.cursor/mcp.json
{
  "mcpServers": {
    "chorus-research": {
      "command": "npx",
      "args": [
        "-y",
        "@chorus-research/mcp"
      ],
      "env": {
        "CHORUS_API_KEY": "your-api-key"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

mcp_config.json
{
  "mcpServers": {
    "chorus-research": {
      "command": "npx",
      "args": [
        "-y",
        "@chorus-research/mcp"
      ],
      "env": {
        "CHORUS_API_KEY": "your-api-key"
      }
    }
  }
}
Keep your API key secret. Do not commit it to version control or expose it in client-side code. Use environment variables or a secrets manager.

Tools

The MCP server exposes 10 tools organized into 5 groups. Your AI agent can call these directly — no HTTP setup required.

Audiences

list_audiences

List all available audience segments for survey targeting. Each audience includes cost per response, targeting criteria, and estimated fielding times.

No parameters required.

get_audience

Get detailed information about a specific audience segment including targeting criteria, cost, and fielding time estimates.

ParameterTypeRequiredDescription
audienceIdstringRequiredAudience identifier (e.g., "genpop")

Pricing

get_pricing_config

Get the current pricing configuration including cost per response and currency.

No parameters required.

estimate_cost

Calculate the cost to launch a survey to a specific audience. Returns a breakdown of baseCostPerComplete × targetCompletes.

ParameterTypeRequiredDescription
audienceIdstringRequiredAudience segment ID (e.g., "genpop")
targetCompletesintegerRequiredNumber of completed responses desired (5-5000, $5 minimum purchase)
projectIduuidOptionalSurvey project ID for LOI auto-calculation

Surveys

list_surveys

List surveys with optional filtering by status and pagination.

ParameterTypeRequiredDescription
statusstringOptionalFilter by status: draft, live, complete, cancelled
pageintegerOptionalPage number Default: 1
pageSizeintegerOptionalResults per page (max 100) Default: 20
sortstringOptionalSort field: createdAt, updatedAt, name
orderstringOptionalSort order: asc or desc

get_survey

Get full details of a specific survey including the complete JSON definition, status, and metadata.

ParameterTypeRequiredDescription
surveyIduuidRequiredSurvey ID (UUID)

create_survey

Create a new survey draft. The survey will be created in draft status.

ParameterTypeRequiredDescription
namestringRequiredSurvey name (1-255 characters)
surveyobjectRequiredSurvey JSON definition. Must include a pages array with question elements. Maximum 10 questions.
targetCompletesintegerRequiredTarget number of completed responses (5-5000, $5 minimum purchase)
descriptionstringOptionalSurvey description (max 1000 characters)

Launch

launch_survey

Launch a survey to collect responses. This is a two-step process to prevent accidental charges.

Two-step launch. Step 2 triggers real charges and starts fielding. Always show the cost estimate to the user and get explicit confirmation before confirming.
ParameterTypeRequiredDescription
surveyIduuidRequiredSurvey ID to launch
audienceIdstringOptionalStep 1: Audience segment ID (e.g., "genpop"). Required for the estimate step.
targetCompletesintegerOptionalStep 1: Number of completed responses desired (min 5, $5 minimum). Required for the estimate step.
confirmTokenstringOptionalStep 2: Confirmation token from the estimate step. Provide this to execute the launch.
paymentMethodIdstringOptionalStep 2: Stripe payment method ID. Uses default payment method if omitted.
Pseudocode
# Step 1: Get estimate and confirmation token
launch_survey(surveyId, audienceId: "genpop", targetCompletes: 100)
→ { estimatedCost: 100.00, confirmToken: "abc123...", expiresAt: "..." }

# Show cost to user, get explicit confirmation

# Step 2: Confirm launch (charges payment, starts fielding)
launch_survey(surveyId, confirmToken: "abc123...")
→ { success: true, workflowId: "launch-...", amountCharged: 100.00 }

get_survey_status

Get real-time fielding status including completion count, progress percentage, and estimated completion time. Results are cached for 30 seconds.

ParameterTypeRequiredDescription
surveyIduuidRequiredSurvey ID to check status for

Responses

get_responses

Export survey response data with pagination. Returns individual responses including answer data, metadata, and completion status. Only returns responses from published (launched) surveys.

ParameterTypeRequiredDescription
surveyIduuidRequiredSurvey ID to export responses for
pageintegerOptionalPage number Default: 1
pageSizeintegerOptionalResults per page (max 1000) Default: 100
statusstringOptionalFilter by response status: complete, partial, incomplete Default: complete
includeDuplicatesbooleanOptionalInclude duplicate/flagged responses Default: false

Resources

MCP resources provide read-only data that your AI agent can access as context.

URINameDescription
chorus://audiencesAudience CatalogFull catalog of available audience segments with targeting criteria, costs, and estimated fielding times.
chorus://pricing/configPricing ConfigurationCurrent pricing configuration including cost per response and currency.
Resources vs. tools: Resources are loaded as context before a conversation starts, while tools are called on-demand during a conversation. Use resources when the agent needs background knowledge; use tools for actions.

Prompts

MCP prompts are reusable templates that guide AI agents through multi-step workflows.

design_survey

Guides an AI agent through survey creation best practices for the Chorus Research platform. Produces a valid SurveyJS JSON definition.

ParameterTypeRequiredDescription
topicstringRequiredThe research topic or objective for the survey
audiencestringOptionalTarget audience description (e.g., "US adults 18+", "parents with young children")
numQuestionsstringOptionalApproximate number of questions desired Default: 10

launch_checklist

Pre-launch validation checklist. Guides an AI agent through verifying a survey is ready to launch, estimating costs, and confirming with the user before charging.

ParameterTypeRequiredDescription
surveyIduuidRequiredThe UUID of the survey to validate for launch
Client support varies. Not all MCP clients support prompts yet. Claude Code and Claude Desktop support them; other clients may add support over time.

Quick Start

Here's a typical workflow showing how an AI agent uses the MCP server from start to finish.

1. Configure your client

Add the configuration JSON for your MCP client and restart it. Verify the server connects by asking your agent to list audiences.

2. Add a payment method

Launching a survey requires a credit card on file. Add one at app.chorusresearch.io/payment-methods in the Chorus Research app.

3. Explore audiences

Conversation
You: "What audiences are available?"

Agent calls: list_audiences()
Agent: "There's one audience available — General Population (US adults 18+)
       at $1.00 per response. Supports 5-5000 completes ($5 minimum)."

4. Create a survey

Conversation
You: "Create a customer satisfaction survey with 5 questions"

Agent calls: create_survey(name: "Customer Satisfaction", survey: {...}, targetCompletes: 100)
Agent: "Done! Survey created in draft status. ID: 550e8400-..."

5. Estimate cost

Conversation
You: "How much would 200 responses cost?"

Agent calls: estimate_cost(audienceId: "genpop", targetCompletes: 200)
Agent: "200 responses × $1.00 each = $200.00 USD total."

6. Launch (two-step)

Conversation
You: "Launch it"

Agent calls: launch_survey(surveyId: "550e8400-...", audienceId: "genpop", targetCompletes: 200)
Agent: "The estimated cost is $200.00 USD. This will charge your account.
       Shall I proceed?"

You: "Yes, go ahead"

Agent calls: launch_survey(surveyId: "550e8400-...", confirmToken: "eyJhb...")
Agent: "Survey launched! Workflow is now fielding 200 responses."

7. Monitor and export

Conversation
You: "How's the survey doing?"

Agent calls: get_survey_status(surveyId: "550e8400-...")
Agent: "45 of 200 responses collected (22.5%). Estimated completion: tomorrow."

You: "Export what we have so far"

Agent calls: get_responses(surveyId: "550e8400-...")
Agent: "Here are the 45 completed responses: [data summary]"

Troubleshooting

IssueSolution
Missing API key errorSet CHORUS_API_KEY in your MCP config's env block. Restart your client after changing config.
Server not appearing in clientVerify the JSON config is valid (no trailing commas). Check that npx @chorus-research/mcp runs successfully in your terminal. Restart the client.
401 UnauthorizedYour API key is invalid or has been revoked. Generate a new key from the API Keys section in the app.
429 Too Many RequestsYou've hit the rate limit (60 req/min for standard endpoints, 10 req/min for launch). Wait a moment and retry.
Expired confirmation tokenConfirmation tokens are valid for 5 minutes. Call launch_survey again with audienceId and targetCompletes to get a fresh token.
Payment method error on launchAdd a credit card at app.chorusresearch.io/payment-methods. A default card is required before launching surveys.
Tools not showing upMake sure the package name is @chorus-research/mcp (not chorus-research-mcp). Check your client's MCP logs for errors.

Need More Help?