JUHE API Marketplace
hk4crprasad avatar
MCP Server

FastAPI SSE MCP Random

A FastAPI server implementing the Model Context Protocol (MCP) for structured tool use, providing utility tools including random number generation, image generation via Azure OpenAI DALL-E, and AI podcast generation.

0
GitHub Stars
11/22/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. fastapi_sse_mcp_random

README Documentation

FastAPI SSE MCP Random

A FastAPI server that implements the Model Context Protocol (MCP) using Server-Sent Events (SSE) for streaming communication. This project provides various utility tools including random number generation, image generation using Azure OpenAI DALL-E, and AI podcast generation.

Features

  • Server-Sent Events (SSE) for real-time streaming communication
  • Model Context Protocol (MCP) implementation for structured tool use
  • Multiple utility tools:
    • Echo tool and resources
    • Random number generator
    • Image generation via Azure OpenAI DALL-E 3
    • AI podcast generation
    • "Think tool" for reflective responses

Prerequisites

  • Python 3.10+
  • Azure OpenAI API access (for image generation)

Installation

  1. Clone the repository:
git clone <repository-url>
cd fastapi_sse_mcp_random
  1. Install the dependencies:
pip install -r requirements.txt

Or using uv:

uv pip install -e .

Usage

Starting the server

Run the server with:

python main.py

The server will start at http://0.0.0.0:8000

Available Endpoints

  • GET /: Health check endpoint
  • GET /sse/: SSE connection endpoint
  • POST /messages/: Endpoint for client messages

Available Tools

Echo Tool

{
  "name": "echo_tool",
  "parameters": {
    "message": "Hello, world!"
  }
}

Random Number Generator

{
  "name": "random_number",
  "parameters": {
    "min_value": 1,
    "max_value": 100
  }
}

Image Generation

{
  "name": "generate_image",
  "parameters": {
    "prompt": "A beautiful landscape with mountains and a lake"
  }
}

Podcast Generation

{
  "name": "generate_podcast",
  "parameters": {
    "prompt": "The future of artificial intelligence",
    "duration": 5,
    "name1": "Mark",
    "voice1": "Thomas",
    "name2": "Sophia",
    "voice2": "Emily"
  }
}

Think Tool

{
  "name": "think_tool",
  "parameters": {
    "input": "What are the implications of quantum computing?"
  }
}

Project Structure

  • main.py: Main FastAPI application and MCP tools implementation
  • sse.py: Server-Sent Events (SSE) implementation
  • pyproject.toml: Project metadata and dependencies
  • requirements.txt: Basic dependencies list

Dependencies

  • FastAPI: Web framework for building APIs
  • MCP: Model Context Protocol implementation
  • OpenAI: Client for Azure OpenAI services
  • Uvicorn: ASGI server for running FastAPI applications
  • Requests: HTTP library for API calls

License

[Specify your license here]

Contributing

[Instructions for contributing to the project]

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright © 2025 - All rights reserved