Sponsored by Deepsite.site

Multi-Provider MCP Server

Created By
matheusleite8 months ago
Custom MCP Server to integrate with tools and run inside a n8n instance
Content

Multi-Provider MCP Server

A robust and extensible Model Context Protocol (MCP) server that supports multiple tool providers. This server enables AI models to utilize tools from different service providers through a standardized interface.

Features

  • Modular architecture for easy extension with new providers
  • Centralized configuration management
  • Provider-specific tool implementations
  • CLI mode for direct tool testing
  • Comprehensive error handling and logging

Supported Providers

Currently, the server supports the following providers:

  • Evolution API: Tools for WhatsApp messaging and group management

Getting Started

Prerequisites

  • Node.js 14.x or higher
  • npm or yarn

Installation

  1. Clone the repository
  2. Install dependencies:
    npm install
    
  3. Create a .env file from the template:
    cp .env.example .env
    
  4. Configure your environment variables in the .env file

Running the Server

Start the server in development mode:

npm run dev

Or in production:

npm start

Using CLI Mode for Testing Tools

You can directly test any tool by running:

npm run tool <tool_name> '<json_args>'

Example:

npm run tool envia_mensagem '{"number":"5511999999999","mensagem":"Hello world!"}'

Adding a New Provider

  1. Create a new provider class in the src/providers directory, extending BaseProvider
  2. Implement the required tools and their handlers
  3. Register your provider in src/providers/index.js
  4. Add provider configuration in src/config/index.js
  5. Update .env.example with new variables

Provider Template

const BaseProvider = require('../core/BaseProvider');

class MyNewProvider extends BaseProvider {
  constructor(config) {
    super('provider-name', config);
    this._registerTools();
  }
  
  _registerTools() {
    // Register your tools here
  }
}

module.exports = MyNewProvider;

Architecture

├── src/
│   ├── config/             # Configuration settings
│   ├── core/               # Core server functionality
│   │   ├── BaseProvider.js # Base class for providers
│   │   ├── MCPServer.js    # MCP server implementation
│   │   └── ProviderManager.js # Manages all providers
│   ├── providers/          # Provider implementations
│   │   ├── EvolutionProvider.js  # Evolution API provider
│   │   └── index.js        # Provider exports
│   ├── utils/              # Utility functions
│   │   ├── httpClient.js   # HTTP client wrapper
│   │   └── logger.js       # Logging utility
│   └── index.js            # Application entry point
├── .env                    # Environment variables
├── .env.example            # Environment variables template
└── package.json            # Project metadata

License

ISC

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Amap Maps高德地图官方 MCP Server
WindsurfThe new purpose-built IDE to harness magic
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
Tavily Mcp
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server