home / mcp / limesurvey mcp server

LimeSurvey MCP Server

Provides MCP endpoints to manage LimeSurvey surveys, questions, groups, activations, and response exports.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "guiraud-mcp-limesurvey": {
      "url": "http://localhost:8080/mcp"
    }
  }
}

You can interact with LimeSurvey through a dedicated MCP server that exposes core LimeSurvey actions as MCP endpoints. This lets you create surveys, manage questions and groups, activate surveys, and export responses from your preferred MCP client while following the Model Context Protocol.

How to use

You connect to the MCP server via the configured base URL and send requests for predefined actions. The server provides actions to create surveys, add questions and groups, activate surveys, list available surveys, and export responses. Use an MCP client to initiate these actions and provide the required parameters such as survey identifiers, titles, language, and question details. All requests are validated against the MCP schema and sessions to LimeSurvey are cached and reused for efficiency.

How to install

Prerequisites: Ensure you have Python 3.7 or newer installed. You also need access to a LimeSurvey instance (version 3.X or newer) with an admin account.

Step 1: Prepare the project directory and environment.

# Clone the MCP server for LimeSurvey
git clone https://gitlab.com/mehdi_guiraud/mcp-limesurvey.git
cd mcp-limesurvey

# Create and activate a Python virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Step 2: Configure credentials and environment variables.

# Copy the example environment file and edit with your LimeSurvey credentials
cp .env.example .env
nano .env

Step 3: Start the MCP server.

./start_server.sh

Once started, the server will be accessible at http://localhost:8080 and you can interact with it using an MCP client.

Configuration and troubleshooting

Authentication relies on credentials stored in the environment file. Validate that you can reach the LimeSurvey RPC API and that the API is enabled in LimeSurvey (Configuration → Interfaces → Enable RPC API). If you encounter issues, check the server logs for detailed error messages and ensure your LimeSurvey credentials in the .env file are correct.

Security and session handling are handled by the server: sessions are cached and recycled to optimize interactions with LimeSurvey.

Notes on integration with Claude Desktop

To integrate with Claude Desktop you can configure a Custom MCP Server using the provided base URL and specification URL. Use the following details when adding the server:

Base URL: http://localhost:8080/mcp Specification URL: http://localhost:8080/spec

Available MCP Endpoints

The server implements the following actions for LimeSurvey management: create_survey, add_question, add_group, activate_survey, list_surveys, and export_responses. These endpoints let you create surveys, organize questions into groups, enable surveys for response, list existing surveys, and export collected responses.

Tools and endpoints overview

Core actions you can perform through MCP calls include creating a new survey, adding question groups, adding questions, activating a survey, listing surveys, and exporting survey responses. Each action requires specific parameters such as survey_id, group_id, question_text, and formatting options. Use your MCP client to craft requests that specify the model (limesurvey) and the action you want to perform along with the needed parameters.

Available tools

create_survey

Create a new LimeSurvey survey with a title and language, initializing the survey in the system.

add_group

Add a question group to a specified survey, including a title and description.

add_question

Add a question to a specified survey and group, with a given text, type, and options.

activate_survey

Activate a survey so it becomes available for responses.

list_surveys

Retrieve a list of all surveys available in the LimeSurvey instance.

export_responses

Export responses for a given survey in the requested format (e.g., JSON).