npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

evolution-api-mcp

v1.0.5

Published

MCP Server for Evolution API v2 - Integrate WhatsApp functionality with Claude Desktop and other MCP clients

Downloads

29

Readme

Evolution API MCP Server

npm version License: MIT

MCP (Model Context Protocol) server for Evolution API v2 integration. This server allows you to integrate WhatsApp functionality through the Evolution API directly into Claude Desktop and other MCP-compatible clients.

🚀 Quick Start

Installation

The easiest way to use this MCP server is via npx (no installation required):

npx evolution-api-mcp

Or install globally:

npm install -g evolution-api-mcp

Basic Configuration

Set the required environment variables:

export EVOLUTION_URL=https://your-evolution-api.com
export EVOLUTION_API_KEY=your-global-api-key

Or create a .env file:

EVOLUTION_URL=https://your-evolution-api.com
EVOLUTION_API_KEY=your-global-api-key

Claude Desktop Integration

Add to your Claude Desktop MCP configuration (~/.claude/mcp.json):

{
  "mcpServers": {
    "evolution-api": {
      "command": "npx",
      "args": ["evolution-api-mcp"],
      "env": {
        "EVOLUTION_URL": "https://your-evolution-api.com",
        "EVOLUTION_API_KEY": "your-global-api-key"
      }
    }
  }
}

📋 Features

Instance Management

  • ✅ Create and manage WhatsApp instances
  • ✅ Connect instances with QR code generation
  • ✅ Restart and delete instances
  • ✅ Set presence status (online, offline, typing, etc.)

Message Operations

  • ✅ Send text messages
  • ✅ Send media (images, videos, documents, audio)
  • ✅ Send stickers and reactions
  • ✅ Send location and contact information
  • ✅ Send interactive messages (polls, lists, buttons)

Chat Management

  • ✅ Find and search messages
  • ✅ Manage contacts and chats
  • ✅ Mark messages as read/unread
  • ✅ Archive and unarchive chats
  • ✅ Check if number is on WhatsApp

Group Operations

  • ✅ Create and manage groups
  • ✅ Update group settings (name, description, picture)
  • ✅ Manage participants (add, remove, promote, demote)
  • ✅ Generate and manage invite codes

Profile & Settings

  • ✅ Update profile information
  • ✅ Manage privacy settings
  • ✅ Configure webhooks
  • ✅ Get API information and status

🛠️ Configuration

Environment Variables

| Variable | Required | Description | Example | |----------|----------|-------------|---------| | EVOLUTION_URL | ✅ | Evolution API base URL | https://api.example.com | | EVOLUTION_API_KEY | ✅ | Global API key | your-api-key-here | | MCP_SERVER_NAME | ❌ | Server name for MCP | evolution-api-mcp | | HTTP_TIMEOUT | ❌ | Request timeout in ms | 30000 | | RETRY_ATTEMPTS | ❌ | Number of retry attempts | 3 | | RETRY_DELAY | ❌ | Delay between retries in ms | 1000 |

Configuration File

You can also use a configuration file (evolution-config.json):

{
  "evolutionUrl": "https://your-evolution-api.com",
  "evolutionApiKey": "your-global-api-key",
  "server": {
    "name": "evolution-api-mcp",
    "version": "1.0.0"
  },
  "http": {
    "timeout": 30000,
    "retryAttempts": 3,
    "retryDelay": 1000
  }
}

Then run with:

npx evolution-api-mcp --config evolution-config.json

📖 Usage Examples

Basic Instance Management

# In Claude Desktop, you can ask:
"Create a new WhatsApp instance called 'my-bot'"
"Connect the instance 'my-bot' and show me the QR code"
"List all my WhatsApp instances"

Sending Messages

# In Claude Desktop:
"Send a text message 'Hello World!' to +5511999999999 using instance 'my-bot'"
"Send an image from https://example.com/image.jpg to +5511999999999"
"Send a location (latitude: -23.5505, longitude: -46.6333) to +5511999999999"

Group Management

# In Claude Desktop:
"Create a group called 'My Group' with participants +5511999999999 and +5511888888888"
"Add +5511777777777 to the group 'My Group'"
"Update the group description to 'Welcome to our group!'"

🔧 Development

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Evolution API v2 instance

Setup

# Clone the repository
git clone https://github.com/your-repo/evolution-api-mcp.git
cd evolution-api-mcp

# Install dependencies
npm install

# Copy environment variables
cp .env.example .env
# Edit .env with your Evolution API credentials

# Build the project
npm run build

# Run in development mode
npm run dev

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

Project Structure

evolution-api-mcp/
├── src/
│   ├── cli/                 # CLI interface
│   ├── clients/             # HTTP client for Evolution API
│   ├── config/              # Configuration management
│   ├── registry/            # Endpoint definitions
│   ├── server/              # MCP server implementation
│   └── utils/               # Utilities and helpers
├── tests/                   # Test files
├── bin/                     # Executable files
└── docs/                    # Documentation

Available Scripts

| Script | Description | |--------|-------------| | npm run build | Build the project | | npm run dev | Run in development mode | | npm test | Run tests | | npm run test:watch | Run tests in watch mode | | npm start | Start the built server |

📚 Documentation

Quick Start Guides

Reference Documentation

Developer Resources

🐛 Troubleshooting

Common Issues

Connection Failed

Error: Connection to Evolution API failed
  • Check if EVOLUTION_URL is correct and accessible
  • Verify EVOLUTION_API_KEY is valid
  • Ensure Evolution API is running and healthy

Instance Not Found

Error: Instance 'my-instance' not found
  • Check if the instance name is correct
  • Verify the instance was created successfully
  • List all instances to see available ones

Authentication Error

Error: Authentication failed
  • Verify your EVOLUTION_API_KEY is correct
  • Check if the API key has the necessary permissions
  • Ensure the API key hasn't expired

For more troubleshooting information, see TROUBLESHOOTING.md.

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for your changes
  5. Ensure tests pass (npm test)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support


Made with ❤️ for the Evolution API and MCP community