MCP.so
Sign In
Servers

EAIM MCP Server

@OmarNaguib

MCP server for EAIM Technologies API integration with FastAPI and Socket.IO

A Model Context Protocol (MCP) server for integrating with EAIM Technologies API. This server provides tools and resources for querying social media analytics data through natural language processing.

Features

  • Socket.IO integration for real-time communication
  • Natural language query processing
  • MCP tools for accessing EAIM API data
  • Dashboard and visualization metadata

Prerequisites

  • Python 3.8+
  • pip

Installation

  1. Clone the repository:

    git clone https://github.com/OmarNaguib/eaim-mcp-server.git
    cd eaim-mcp-server
    
  2. Install dependencies:

    pip install -r requirements.txt
    

Usage

Running the server

python main.py

The server will start on http://localhost:8000

Docker

To build and run using Docker:

# Build the Docker image
docker build -t eaim-mcp-server .

# Run the container
docker run -p 8000:8000 eaim-mcp-server

API Endpoints

  • / - Root endpoint with server information
  • /socket.io - Socket.IO endpoint for real-time communication
  • /mcp - MCP server endpoint for tools and resources

MCP Tools

get_visualization_data

Get data for a specific visualization from EAIM API.

Parameters:

  • dashboard_id (number, required): Dashboard ID
  • visualization_id (number, required): Visualization ID
  • brand (string, required): Brand name
  • period (string, required): Time period (last week, last month, last 3 months)

query_natural_language

Query EAIM API using natural language.

Parameters:

  • query (string, required): Natural language query

MCP Resources

available_dashboards

List of available dashboards.

available_visualizations

List of available visualizations for a dashboard.

Parameters:

  • dashboard_id (number, required): Dashboard ID

Socket.IO Events

Client to Server

  • query_data: Send a natural language query to the server
    socket.emit("query_data", {
      query: "Show me the engagement of Vodafone EG over the last month",
    });
    

Server to Client

  • status: Receive status updates from the server
  • data: Receive data from the server
  • error: Receive error messages from the server

Example Usage

// Connect to the Socket.IO server
const socket = io("http://localhost:8000");

// Listen for status updates
socket.on("status", (data) => {
  console.log("Status:", data.message);
});

// Listen for data
socket.on("data", (data) => {
  console.log("Received data:", data);
  // Process and display the data
});

// Listen for errors
socket.on("error", (data) => {
  console.error("Error:", data.message);
});

// Send a query
socket.emit("query_data", {
  query: "Show me the engagement of Vodafone EG over the last month",
});

License

MIT

More from Developer Tools