Get the FREE Ultimate OpenClaw Setup Guide →

mcp -demo

MCP server from OAI-Labs/mcp-server-demo

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio oai-labs-mcp-server-demo python -m src.main \
  --env BASE_URL="http://localhost:8000" \
  --env GCS_BUCKET="<optional GCS bucket name>" \
  --env GEMINI_API_KEY="<YOUR_GEMINI_API_KEY>"

How to use

This MCP server exposes four tools built on top of FastMCP: create_visualization, text_to_speech, analyze_image, and create_video. After initializing a session, you can call these tools to generate visual content, synthesize speech, analyze images, or produce videos from text prompts or media. To begin, initialize a session to obtain an mcp-session-id, then use the tools/endpoints with that session ID in subsequent requests. The HTTP transport workflow mirrors standard MCP interactions: initialize, receive a session ID, then call tools with the appropriate parameters.

Tool capabilities:

  • create_visualization: Generates an image from a text prompt with optional parameters such as aspect_ratio. Example usage involves sending a request with name: create_visualization and arguments including prompt and aspect_ratio.
  • text_to_speech: Converts text into speech audio. Provide a prompt (text) and choose a voice_name if desired.
  • analyze_image: Analyzes an image from a URL or embedded input and returns extracted details such as text or objects detected, guided by a prompt that describes what to extract.
  • create_video: Creates a video from a textual prompt or a set of images. You can supply a prompt and an optional filename_hint for storage.

Example flow: initialize to get mcp-session-id, then call tools/call with name set to one of the tool names and pass the corresponding arguments. Ensure you pass your API key via x-api-key and the session ID in mcp-session-id for each operation.

How to install

Prerequisites:

  • Python 3.11+
  • uv (Python package manager/runner)
  • Access to the repository (git)
  • A valid Gemini API key (GEMINI_API_KEY)
  1. Clone the repository and install dependencies
git clone https://github.com/Innovate-Lab/mcp-server-demo
cd MCP
uv sync
  1. Configure environment
cp .env.example .env

Edit the .env file if needed to set BASE_URL, GEMINI_API_KEY, and optional GCS_BUCKET.


3) Run the server
```bash
uv run python -m src.main
# Server: http://localhost:8000 | Health: /health

Additional notes

Environment variables and configuration tips:

  • GEMINI_API_KEY must be set to your Google Cloud API key for Gemini-powered capabilities.
  • BASE_URL should reflect where the server is reachable (default http://localhost:8000).
  • GCS_BUCKET is optional; if set, uploads will go to Google Cloud Storage and files will be served from there. If not set, files are stored locally under ./static/.
  • Health endpoint is available at /health; the main API is at /mcp.
  • If you modify ports or base paths, ensure all clients use the updated BASE_URL.
  • The project structure keeps source logic under src/, with tools handling image, audio, and video processing, and storage.py managing uploads.
  • For local testing, ensure network access to any external services required by the tools (e.g., Gemini API).

Related MCP Servers

Sponsor this space

Reach thousands of developers