Activepieces MCP server

Dynamic server to which you can add apps (Google Calendar, Notion, ...) or advanced Activepieces Flows (A refund logic, a research and enrichment logic, ...).
Back to servers
Provider
Activepieces
Release date
Apr 05, 2025
Language
TypeScript
Package
Stats
673 downloads
14.6K stars

Activepieces is an open source automation platform that makes all of its pieces (integrations) available as MCP servers for use with LLMs through Claude Desktop, Cursor, or Windsurf. With over 280 integrations, it allows you to easily connect AI tools with various services and applications.

Installation

Docker Installation

The quickest way to get started is by using Docker:

docker run -d \
  --name activepieces \
  -e AP_DB_TYPE=postgres \
  -e AP_DB_URL=postgres://postgres:postgres@postgres:5432/postgres \
  -e AP_ENCRYPTION_KEY=CHANGETHIS \
  -e AP_FRONTEND_URL=http://localhost:8080 \
  -p 8080:80 \
  activepieces/activepieces:latest

Environment Variables

Configure your installation with these important environment variables:

AP_DB_TYPE: Database type (postgres or mysql)
AP_DB_URL: Database connection string
AP_ENCRYPTION_KEY: Secret key for data encryption
AP_FRONTEND_URL: The URL where users will access the platform

Using Docker Compose

For a more complete setup including a database, use this docker-compose.yml:

version: "3.8"
services:
  postgres:
    image: postgres:14.4
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=postgres
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

  activepieces:
    image: activepieces/activepieces:latest
    depends_on:
      - postgres
    ports:
      - "8080:80"
    environment:
      - AP_DB_TYPE=postgres
      - AP_DB_URL=postgres://postgres:postgres@postgres:5432/postgres
      - AP_ENCRYPTION_KEY=CHANGETHIS
      - AP_FRONTEND_URL=http://localhost:8080

volumes:
  postgres_data:

Run it with:

docker-compose up -d

Usage

Setting Up Your First Flow

  1. After installation, navigate to http://localhost:8080 (or your configured URL)
  2. Create a new account or log in
  3. Click "Create Flow" to start building your automation
  4. Add triggers (starting events) and actions (responses to events)

Using Pieces (Integrations)

Activepieces includes over 280 integrations (called "pieces") that enable connections to various services:

  1. In your flow, select "Add Step"
  2. Browse available pieces or search for specific services
  3. Configure the selected piece with your account credentials
  4. Set up the specific actions or triggers for that service

Creating MCP Servers

To use Activepieces pieces as MCP servers with LLMs:

# Install the Activepieces CLI
npm install -g @activepieces/cli

# Create an MCP server for a specific piece
ap mcp serve @activepieces/piece-gmail

This will start an MCP server that allows LLMs to interface with Gmail through tools like Claude Desktop or Cursor.

Branching and Conditions

Create logic in your flows:

  1. Add a "Branch" step to your flow
  2. Configure the condition (e.g., "if email contains 'urgent'")
  3. Build different paths for when the condition is true or false

Using Code Steps

For custom logic:

// Example code step
export const code = async (inputs) => {
  // Process data from previous steps
  const processedData = inputs.data.map(item => {
    return {
      id: item.id,
      normalized: item.value.toLowerCase()
    };
  });
  
  return {
    processedData
  };
};

Advanced Configuration

Securing Your Installation

For production environments:

docker run -d \
  --name activepieces \
  -e AP_DB_TYPE=postgres \
  -e AP_DB_URL=postgres://user:password@host:port/db \
  -e AP_ENCRYPTION_KEY=LONG_RANDOM_STRING \
  -e AP_FRONTEND_URL=https://your-domain.com \
  -e AP_JWT_SECRET=ANOTHER_RANDOM_STRING \
  -p 443:80 \
  activepieces/activepieces:latest

Scaling with Redis

For high-volume environments:

docker run -d \
  --name activepieces \
  -e AP_DB_TYPE=postgres \
  -e AP_DB_URL=postgres://user:password@host:port/db \
  -e AP_ENCRYPTION_KEY=LONG_RANDOM_STRING \
  -e AP_FRONTEND_URL=https://your-domain.com \
  -e AP_REDIS_URL=redis://redis:6379 \
  -p 443:80 \
  activepieces/activepieces:latest

Troubleshooting

Common Issues

If you encounter problems:

  1. Check container logs with docker logs activepieces
  2. Verify database connection details
  3. Ensure all environment variables are properly set
  4. Check network connectivity between services

Database Migrations

If schema changes are needed after updates:

docker exec activepieces ap database migrate

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later