Skip to main content
Glama

Taboola API MCP Server

by okochansky

Taboola API MCP Server

A flexible MCP (Model Context Protocol) server with fetchRecommendations functionality. Supports both local (STDIO) and remote (HTTP) deployment modes.

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Activate virtual environment (if using one):
source .venv/bin/activate

Deployment Options

Local Mode (STDIO Transport)

Perfect for local development and testing with MCP Inspector:

# Default mode - runs locally with STDIO transport python server.py # Explicitly specify local mode python server.py --mode local

Remote Mode (HTTP Server)

Deploy as a remote HTTP server accessible over the network:

# Run as HTTP server on default port 8000 python server.py --mode remote # Specify custom host and port python server.py --mode remote --host 0.0.0.0 --port 3000 # Using environment variables export MCP_MODE=remote export MCP_HOST=0.0.0.0 export MCP_PORT=8000 python server.py

Configuration Options

Command Line Arguments

  • --mode: Server mode (local or remote) - default: local
  • --host: Host to bind to in remote mode - default: 0.0.0.0
  • --port: Port to bind to in remote mode - default: 8000

Environment Variables

  • MCP_MODE: Server mode (local or remote)
  • MCP_HOST: Host to bind to in remote mode
  • MCP_PORT: Port to bind to in remote mode

Environment variables override command line arguments.

Functions

fetchRecommendations

Fetches recommendations for a given publisher using their API key via Taboola API.

Parameters:

  • publisher_name (str): The name of the publisher
  • api_key (str): The API key for authentication

Returns:

  • str: JSON recommendations data from Taboola API

Usage Examples

Local Development with MCP Inspector

# Start server locally python server.py # In another terminal, run MCP Inspector npx @modelcontextprotocol/inspector python server.py

Remote Deployment

# Deploy as remote server python server.py --mode remote --port 8000 # Server will be available at: http://your-server-ip:8000 # Connect using HTTP transport with MCP clients

Production Deployment

For production, consider using environment variables:

export MCP_MODE=remote export MCP_HOST=0.0.0.0 export MCP_PORT=8000 python server.py

Or with a process manager like PM2:

pm2 start server.py --name "taboola-mcp" -- --mode remote --port 8000

Testing

Use the provided test script to verify functionality:

# Edit test_function.py with your credentials python test_function.py

Cloud Deployment

Render Deployment

Deploy easily on Render cloud platform:

  1. Push your code to GitHub/GitLab
  2. Connect to Render:
    • Go to Render Dashboard
    • Click "New" > "Blueprint"
    • Connect your repository
    • The render.yaml file will be automatically detected
  3. Deploy:
    • Render will automatically build and deploy your MCP server
    • Your server will be available at: https://your-app-name.onrender.com
Option 2: Manual Render Setup
  1. Create a new Web Service on Render
  2. Connect your repository
  3. Configure the service:
    • Build Command: pip install -r requirements.txt
    • Start Command: python server.py --mode remote --host 0.0.0.0 --port $PORT
    • Environment Variables:
      • MCP_MODE=remote
      • MCP_HOST=0.0.0.0
      • PYTHON_VERSION=3.13.0
  4. Deploy and get your URL

Docker Deployment

For any Docker-compatible platform:

# Build and run locally docker build -t taboola-mcp-server . docker run -p 8000:8000 taboola-mcp-server # Or use docker-compose docker-compose up -d

Other Cloud Platforms

The server is compatible with:

  • Heroku: Use Procfile with web: python server.py --mode remote --port $PORT
  • Railway: Deploy directly from GitHub with automatic detection
  • DigitalOcean App Platform: Use the provided docker-compose.yml
  • AWS/GCP/Azure: Deploy using Docker or direct Python deployment

Security Notes

  • In remote mode, the server binds to 0.0.0.0 by default (all interfaces)
  • Consider using a reverse proxy (nginx, Apache) for production deployments
  • Ensure proper firewall rules are in place for remote access
  • API keys are passed as parameters - ensure secure transmission (HTTPS recommended)
  • Cloud platforms like Render automatically provide HTTPS endpoints
-
security - not tested
F
license - not found
-
quality - not tested

A flexible MCP server that enables users to fetch recommendations from the Taboola API using publisher credentials, supporting both local (STDIO) and remote (HTTP) deployment modes.

  1. Setup
    1. Deployment Options
      1. Local Mode (STDIO Transport)
      2. Remote Mode (HTTP Server)
    2. Configuration Options
      1. Command Line Arguments
      2. Environment Variables
    3. Functions
      1. fetchRecommendations
    4. Usage Examples
      1. Local Development with MCP Inspector
      2. Remote Deployment
      3. Production Deployment
    5. Testing
      1. Cloud Deployment
        1. Render Deployment
        2. Docker Deployment
        3. Other Cloud Platforms
      2. Security Notes

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          This MCP server performs multi-topic searches in business, news, finance, and politics using the Tavily API, providing high-quality sources and intelligent summaries.
          Last updated -
          1
          1
          Python
          MIT License
          • Apple
          • Linux
        • A
          security
          A
          license
          A
          quality
          An MCP server implementation that integrates the Tavily Search API, providing optimized search capabilities for LLMs.
          Last updated -
          1
          TypeScript
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          MCP server for using various search tools like Tavily API. Planning to support various search tools (i.e. wiki search, searxng, etc)
          Last updated -
          1
          Python
          MIT License
          • Apple
          • Linux
        • -
          security
          -
          license
          -
          quality
          A remote MCP server that enables searching for news articles on specific topics through the Tavily API without requiring authentication.
          Last updated -
          TypeScript

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/okochansky/MCPTaboolaAPI'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server