Skip to main content
Glama
RVAILab

Profile Questions MCP Server

by RVAILab
README.md
# Profile Questions MCP Server

An MCP (Model Context Protocol) server that allows AI agents to interact with the White Rabbit Profile Questions API. This enables agents to create questions, submit answers, and query existing profile data.

## Installation

```bash
cd mcp-servers/profile-questions
npm install
npm run build
```

## Configuration

Set the following environment variables:

| Variable | Description | Default |
|----------|-------------|---------|
| `PROFILE_QUESTIONS_API_URL` | Base URL of the White Rabbit API | `http://localhost:3000` |
| `PROFILE_QUESTIONS_API_KEY` | API key for authentication | (none) |

## Usage with Claude Desktop

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "profile-questions": {
      "command": "node",
      "args": ["/path/to/mcp-servers/profile-questions/dist/index.js"],
      "env": {
        "PROFILE_QUESTIONS_API_URL": "https://your-api-url.com",
        "PROFILE_QUESTIONS_API_KEY": "your-api-key"
      }
    }
  }
}
```

## Available Tools

### list_questions

List profile questions by source.

**Parameters:**
- `source` (required): `profile_optimizer` | `admin` | `onboarding` | `survey`
- `category` (optional): Filter by category
- `questionType` (optional): `free_form` | `multiple_choice` | `yes_no` | `fill_in_blank`
- `activeOnly` (optional): Only return active questions (default: true)
- `page` (optional): Page number (0-indexed)
- `limit` (optional): Items per page (default: 50)

### create_question

Create a new profile question.

**Parameters:**
- `questionText` (required): The question text (1-500 characters)
- `questionType` (required): `free_form` | `multiple_choice` | `yes_no` | `fill_in_blank`
- `source` (required): `profile_optimizer` | `admin` | `onboarding` | `survey`
- `description` (optional): Description for the question (max 1000 characters)
- `options` (required for multiple_choice): Array of at least 2 options
- `allowMultiple` (optional): Allow selecting multiple options (default: false)
- `fillInBlankTemplate` (required for fill_in_blank): Template containing `{blank}` placeholder
- `category` (optional): Category for organizing questions (max 100 characters)
- `displayOrder` (optional): Order for displaying questions (default: 0)
- `isActive` (optional): Whether the question is active (default: true)

### get_my_answers

Get the current user's answers to profile questions.

**Parameters:**
- `source` (optional): Filter answers by source

### submit_answer

Submit an answer to a profile question.

**Parameters:**
- `questionId` (required): UUID of the question to answer
- `answerSource` (required): `profile_optimizer` | `admin` | `onboarding` | `survey`
- `textValue` (optional): For free_form or fill_in_blank questions
- `booleanValue` (optional): For yes_no questions (true/false)
- `selectedOptions` (optional): For multiple_choice questions

### batch_submit_answers

Submit multiple answers at once (up to 50).

**Parameters:**
- `answers` (required): Array of answer objects (same structure as submit_answer)

## Question Types

| Type | Answer Field | Description |
|------|--------------|-------------|
| `free_form` | `textValue` | Open-ended text responses |
| `multiple_choice` | `selectedOptions` | Select from predefined options |
| `yes_no` | `booleanValue` | Binary true/false |
| `fill_in_blank` | `textValue` | Complete a sentence template |

## Examples

### Create a multiple choice question

```json
{
  "tool": "create_question",
  "arguments": {
    "questionText": "What is your experience level with AI tools?",
    "questionType": "multiple_choice",
    "options": ["Beginner", "Intermediate", "Advanced", "Expert"],
    "source": "profile_optimizer",
    "category": "skills"
  }
}
```

### Submit an answer

```json
{
  "tool": "submit_answer",
  "arguments": {
    "questionId": "123e4567-e89b-12d3-a456-426614174000",
    "selectedOptions": ["Advanced"],
    "answerSource": "profile_optimizer"
  }
}
```

### Batch submit answers

```json
{
  "tool": "batch_submit_answers",
  "arguments": {
    "answers": [
      {
        "questionId": "uuid-1",
        "selectedOptions": ["Advanced"],
        "answerSource": "profile_optimizer"
      },
      {
        "questionId": "uuid-2",
        "textValue": "I have 5 years of experience",
        "answerSource": "profile_optimizer"
      }
    ]
  }
}
```

## Development

```bash
# Watch mode for development
npm run dev

# Build for production
npm run build

# Run the server
npm start
```

## Authentication

The server uses bearer token authentication. Set your API key via the `PROFILE_QUESTIONS_API_KEY` environment variable. The key is passed in the `Authorization` header as `Bearer <key>`.

TDQS

A3.6/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct resource-action pair: get_my_answers (retrieve user answers), list_questions (discover questions), create_question (author questions), submit_answer (single answer), batch_submit_answers (bulk answers). The single vs. batch submit pair is clearly delineated, and questions vs. answers tools don't overlap.

Naming Consistency5/5

All names follow a consistent snake_case verb_noun pattern: get_my_answers, list_questions, create_question, submit_answer, batch_submit_answers. The batch_ prefix is a predictable modifier rather than a convention break.

Tool Count5/5

Five tools is well-scoped for a questionnaire/profile domain, with each tool earning its place across the read/create/answer lifecycle. Nothing feels redundant or missing at the count level.

Completeness4/5

Core lifecycle is covered: authoring questions, listing them, and submitting answers singly or in bulk. However, there is no update/delete for questions and no retrieval of a single question by id, which are minor gaps an agent can work around.

Maintenance

ActivityInactive
ResponsivenessNo issues