home / mcp / studio mcp clarifying questions server

Studio MCP Clarifying Questions Server

Provides an MCP server that generates and streams clarifying questions for user tasks via HTTP/HTTPS and stdio modes.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "idreesmuhammadqazi-create-mcp": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "MCP_API_KEY": "your_secure_api_key_here",
        "GROQ_API_KEY": "your_api_key_here"
      }
    }
  }
}

You run a Studio MCP Clarifying Questions Server to automatically generate and stream relevant clarifying questions for user task requests. It supports both a local stdio MCP workflow and a networked HTTP/HTTPS transport, enabling you to integrate with MCP clients and keep track of sessions and progress in real time.

How to use

Connect with an MCP client to generate clarifying questions for a user task. In HTTP mode, you authenticate requests with a Bearer token and receive questions via standard HTTP endpoints or streaming events. In stdio mode, you launch the MCP server as a local process and communicate through the standard input/output channel. You can observe question streams, provide answers, and retrieve a complete task context once all questions are answered.

How to install

Prerequisites: install Node.js 18+ and a package manager (npm or yarn). You also need a Groq API key for the question generation flow.

Step by step setup to run locally:

# 1) Clone the project
git clone <repository-url>
cd studio-mcp-clarifying-questions-server

# 2) Install dependencies
npm install
# or
yarn install

# 3) Create a local environment file
cp .env.example .env

# 4) Add your Groq API key and generate an MCP API key
# In .env, you will set GROQ_API_KEY and MCP_API_KEY
```
```bash
```bash
# 5) Optional: generate SSL certificates for HTTPS development
npm run generate-cert

# 6) Build the project (needed before running in production-like modes)
npm run build

Additional sections

Configuration and runtime options are exposed via environment variables. The server can run in HTTP/HTTPS mode or as a local MCP stdio server. You can enable HTTPS with self-signed certificates for development and manage sessions with persistent storage.

Command examples shown below illustrate how to start the server, connect via MCP, and verify health status.

# Run HTTP/HTTPS server (default HTTP)
npm start http

# Run with development auto-reload for HTTP
npm run dev http

# Run MCP server in stdio mode (for Claude Desktop or Studio)
npm start mcp

# Or start directly from the built dist entry (stdio)
node dist/index.js mcp

Configuration details you will use

Environment variables control how the server behaves. The following are used in typical setups.

GROQ_API_KEY=your_api_key_here
MCP_API_KEY=your_secure_api_key_here
SERVER_URL=http://localhost:3000
PORT=3000
HOST=localhost
USE_HTTPS=true
SSL_KEY_PATH=./certs/key.pem
SSL_CERT_PATH=./certs/cert.pem
GROQ_MODEL=mixtral-8x7b-32768
SESSION_TIMEOUT_MS=3600000

Security and health

When running in HTTP/HTTPS mode, all /api/* endpoints are protected with an Authorization Bearer token. A public health check endpoint remains unauthenticated for quick status checks.

If you encounter SSL certificate issues with self-signed certificates, you can bypass verification in clients during development.

You can verify server health with a simple health check request to /health.

Troubleshooting

SSL certificate errors, port conflicts, and API key misconfigurations are the most common issues during setup. Ensure you have valid keys, the server port is free, and that you start the server with the correct mode (http or mcp). If a port is in use, adjust PORT in your environment file and restart.

If you need to reconfigure for HTTPS development, regenerate certificates and ensure USE_HTTPS is enabled in your environment.

Available tools

generate_questions

Generates a set of clarifying questions based on the task description and context.

answer_question

Records a user-provided answer to a specific question and updates session progress.

get_context

Retrieves the current task context, including questions and responses.

stream

Streams questions in real time using Server-Sent Events for live interaction.

list_sessions

Lists all active or past sessions with progress and timestamps.