deAPI Mcp Server

SSE

by deapi-ai

368 downloads Not rated yet MIT
GitHub SSE

About

# deAPI MCP Server Production-ready Model Context Protocol (MCP) server for the [deAPI](https://deapi.ai) REST API. This server exposes all deAPI AI capabilities as MCP tools, enabling LLMs to perform audio transcription, image generation, OCR, video generation, text-to-speech, and more. > **deAPI v2** — this server…

Details

Transport
SSE
License
MIT

Explore

- Complete API Coverage: 39 deAPI tools exposed via MCP, covering every v2 client endpoint
- Smart Adaptive Polling: Automatically polls async jobs with optimized intervals based on job type
- OAuth 2.0 Authentication: Secure token exchange via OAuth Authorization Code flow with PKCE
- Error Recovery: Automatic retry logic with exponential backoff
- Progress Reporting: Real-time progress updates to MCP clients
- Type Safety: Full Pydantic schema validation
- Production Ready: Built with FastMCP framework for reliability

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name deAPI Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

For running the MCP server:
- Python 3.10 or higher
- uv, pip, or conda for package management

For a deAPI account:
- Sign up at deapi.ai and get your API token

conda create -n mcp-server-deapi python=3.11
conda activate mcp-server-deapi

pip install -e .


3. (Optional) Create a .env file for configuration:
bash

The server can run in two modes:

Local Mode (for use with Claude Desktop on the same machine):

python -m src.server_remote

The server will start on http://localhost:8000 by default.

Remote Mode (for deployment to a remote server):


Best for: Server running on the same machine, quick setup without OAuth.

Edit your Claude Desktop config file:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
"mcpServers": {
"deapi": {
"url": "http://localhost:8000/mcp",
"headers": {
"Authorization": "Bearer YOUR_DEAPI_TOKEN"
}
}
}
}

Replace YOUR_DEAPI_TOKEN with your actual deAPI token. Save the file and restart Claude Desktop.

DEAPI_API_BASE_URL=https://api.deapi.ai
DEAPI_API_VERSION=v2

DEAPI_POLLING_AUDIO__INITIAL_DELAY=1.0
DEAPI_POLLING_AUDIO__MAX_DELAY=5.0
DEAPI_POLLING_AUDIO__TIMEOUT=300.0

Install dev dependencies:

uv pip install -e ".[dev]"

Run tests:

pytest

Run smoke tests (requires a running server):

python tests/smoke_test.py

For production environments or when you want to host the MCP server on a remote machine, use the remote server mode.

1. Build and run with Docker:

docker build -t mcp-server-deapi .
docker run -d -p 8000:8000 --name mcp-server-deapi mcp-server-deapi

2. Or use Docker Compose:

docker-compose up -d

3. Configure Claude Desktop to connect:

{
"mcpServers": {
"deapi": {
"url": "http://your-server-ip:8000/mcp"
}
}
}

1. On your remote server:

git clone https://github.com/deapi-ai/mcp-server-deapi.git
cd mcp-server-deapi
pip install -e .
python -m src.server_remote

2. For production with systemd:
``bash

- Railway.app: Push to GitHub, connect repository, deploy automatically
- Fly.io:
fly launch && fly deploy
- Heroku:
heroku create && git push heroku main`
- DigitalOcean: Use App Platform or Droplets with Docker
- AWS/GCP/Azure: Deploy with container services (ECS, Cloud Run, Container Instances)

For detailed deployment instructions, security considerations, monitoring, and troubleshooting, see DEPLOYMENT.md.

audio_transcription

Transcribe audio files to text using Whisper models

audio_transcription_price

Calculate transcription cost

text_to_audio

Convert text to natural speech (TTS)

text_to_audio_price

Calculate TTS cost

text_to_music

Generate music from text description and lyrics

text_to_music_price

Calculate music generation cost

audio_url_transcription

Transcribe audio from URLs of completed Twitter Spaces

audio_url_transcription_price

Calculate Twitter Spaces transcription cost

video_file_transcription

Transcribe video files to text

video_file_transcription_price

Calculate video file transcription cost

video_url_transcription

Transcribe videos from URLs (YouTube, Twitter/X, Twitch, Kick)

video_url_transcription_price

Calculate video URL transcription cost

text_to_image

Generate images from text prompts

image_to_image

Transform images with text guidance

image_to_text

Extract text from images (OCR)

image_remove_background

Remove background from images

image_upscale

Upscale images to higher resolution

text_to_image_price

Calculate image generation cost

image_to_image_price

Calculate image transformation cost

image_to_text_price

Calculate OCR cost

image_remove_background_price

Calculate background removal cost

image_upscale_price

Calculate upscaling cost

text_to_video

Generate videos from text prompts

image_to_video

Animate static images into videos

audio_to_video

Generate video conditioned on audio content

video_replace

Replace a person in a video with a character from a reference image

video_remove_background

Remove the background from a video

video_upscale

Upscale a video to higher resolution

text_to_video_price

Calculate text-to-video cost

image_to_video_price

Calculate image-to-video cost

audio_to_video_price

Calculate audio-to-video cost

video_replace_price

Calculate video character replacement cost

video_remove_background_price

Calculate video background-removal cost

video_upscale_price

Calculate video upscaling cost

text_to_embedding

Generate text embeddings for semantic search

text_to_embedding_price

Calculate embedding cost

prompt_booster

Enhance a prompt for any deAPI inference type using AI guides (synchronous, returns refined prompt directly)

prompt_booster_price

Calculate prompt-enhancement cost

get_balance

Check account balance

get_available_models

List available AI models with specifications

check_job_status

Query async job status by ID

- audio_transcription - Transcribe audio files to text using Whisper models
- audio_transcription_price - Calculate transcription cost
- text_to_audio - Convert text to natural speech (TTS)
- text_to_audio_price - Calculate TTS cost
- text_to_music - Generate music from text description and lyrics
- text_to_music_price - Calculate music generation cost
- audio_url_transcription - Transcribe audio from URLs of completed Twitter Spaces
- audio_url_transcription_price - Calculate Twitter Spaces transcription cost

- video_file_transcription - Transcribe video files to text
- video_file_transcription_price - Calculate video file transcription cost
- video_url_transcription - Transcribe videos from URLs (YouTube, Twitter/X, Twitch, Kick)
- video_url_transcription_price - Calculate video URL transcription cost

- text_to_image - Generate images from text prompts
- image_to_image - Transform images with text guidance
- image_to_text - Extract text from images (OCR)
- image_remove_background - Remove background from images
- image_upscale - Upscale images to higher resolution
- text_to_image_price - Calculate image generation cost
- image_to_image_price - Calculate image transformation cost
- image_to_text_price - Calculate OCR cost
- image_remove_background_price - Calculate background removal cost
- image_upscale_price - Calculate upscaling cost

- text_to_video - Generate videos from text prompts
- image_to_video - Animate static images into videos
- audio_to_video - Generate video conditioned on audio content
- video_replace - Replace a person in a video with a character from a reference image
- video_remove_background - Remove the background from a video
- video_upscale - Upscale a video to higher resolution
- text_to_video_price - Calculate text-to-video cost
- image_to_video_price - Calculate image-to-video cost
- audio_to_video_price - Calculate audio-to-video cost
- video_replace_price - Calculate video character replacement cost
- video_remove_background_price - Calculate video background-removal cost
- video_upscale_price - Calculate video upscaling cost

- text_to_embedding - Generate text embeddings for semantic search
- text_to_embedding_price - Calculate embedding cost

- prompt_booster - Enhance a prompt for any deAPI inference type using AI guides (synchronous, returns refined prompt directly)
- prompt_booster_price - Calculate prompt-enhancement cost

- get_balance - Check account balance
- get_available_models - List available AI models with specifications
- check_job_status - Query async job status by ID

Authentication is handled at the connection level, not per-tool-call. Tools do NOT accept a deapi_api_token parameter.

Here's an example workflow:

1. Get available models:

Use get_available_models to see available models

2. Check your balance:

Use get_balance to check remaining credits

3. Generate an image:

Use text_to_image with:
- prompt: "A beautiful sunset over mountains"
- model: "Flux1schnell"

4. Transcribe audio:

Use audio_transcription with:
- audio: "base64-encoded-audio-or-url"
- include_ts: true

Note: When calling tools via Claude Desktop or MCP SDK, authentication is handled automatically through the server connection (OAuth or HTTP headers). See AUTH.md for detailed OAuth setup.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "deapi mcp server": {
            "deapi": {
                "type": "streamable-http",
                "url": "https://mcp.deapi.ai/mcp",
                "headers": {
                    "Authorization": "Bearer <your-deapi-api-key>"
                }
            }
        }
    }
}

McpServers

{
    "deapi": {
        "type": "streamable-http",
        "url": "https://mcp.deapi.ai/mcp",
        "headers": {
            "Authorization": "Bearer <your-deapi-api-key>"
        }
    }
}

Production-ready Model Context Protocol (MCP) server for the deAPI REST API. This server exposes all deAPI AI capabilities as MCP tools, enabling LLMs to perform audio transcription, image generation, OCR, video generation, text-to-speech, and more.

> deAPI v2 — this server targets the deAPI v2 client API (OpenAI-aligned noun paths under /api/v2/*). Set DEAPI_API_VERSION=v1 if you need to point at the legacy v1 endpoints.

Features

- Complete API Coverage: 39 deAPI tools exposed via MCP, covering every v2 client endpoint
- Smart Adaptive Polling: Automatically polls async jobs with optimized intervals based on job type
- OAuth 2.0 Authentication: Secure token exchange via OAuth Authorization Code flow with PKCE
- Error Recovery: Automatic retry logic with exponential backoff
- Progress Reporting: Real-time progress updates to MCP clients
- Type Safety: Full Pydantic schema validation
- Production Ready: Built with FastMCP framework for reliability

Available Tools

Audio Tools

- audio_transcription - Transcribe audio files to text using Whisper models - audio_transcription_price - Calculate transcription cost - text_to_audio - Convert text to natural speech (TTS) - text_to_audio_price - Calculate TTS cost - text_to_music - Generate music from text description and lyrics - text_to_music_price - Calculate music generation cost - audio_url_transcription - Transcribe audio from URLs of completed Twitter Spaces - audio_url_transcription_price - Calculate Twitter Spaces transcription cost

Video Transcription Tools

- video_file_transcription - Transcribe video files to text - video_file_transcription_price - Calculate video file transcription cost - video_url_transcription - Transcribe videos from URLs (YouTube, Twitter/X, Twitch, Kick) - video_url_transcription_price - Calculate video URL transcription cost

Image Tools

- text_to_image - Generate images from text prompts - image_to_image - Transform images with text guidance - image_to_text - Extract text from images (OCR) - image_remove_background - Remove background from images - image_upscale - Upscale images to higher resolution - text_to_image_price - Calculate image generation cost - image_to_image_price - Calculate image transformation cost - image_to_text_price - Calculate OCR cost - image_remove_background_price - Calculate background removal cost - image_upscale_price - Calculate upscaling cost

Video Tools

- text_to_video - Generate videos from text prompts - image_to_video - Animate static images into videos - audio_to_video - Generate video conditioned on audio content - video_replace - Replace a person in a video with a character from a reference image - video_remove_background - Remove the background from a video - video_upscale - Upscale a video to higher resolution - text_to_video_price - Calculate text-to-video cost - image_to_video_price - Calculate image-to-video cost - audio_to_video_price - Calculate audio-to-video cost - video_replace_price - Calculate video character replacement cost - video_remove_background_price - Calculate video background-removal cost - video_upscale_price - Calculate video upscaling cost

Embedding Tools

- text_to_embedding - Generate text embeddings for semantic search - text_to_embedding_price - Calculate embedding cost

Prompt Tools

- prompt_booster - Enhance a prompt for any deAPI inference type using AI guides (synchronous, returns refined prompt directly) - prompt_booster_price - Calculate prompt-enhancement cost

Utility Tools

- get_balance - Check account balance - get_available_models - List available AI models with specifications - check_job_status - Query async job status by ID

Installation

Prerequisites

For running the MCP server:
- Python 3.10 or higher
- uv, pip, or conda for package management

For a deAPI account:
- Sign up at deapi.ai and get your API token

Setup

1. Clone the repository:

git clone https://github.com/deapi-ai/mcp-server-deapi.git
cd mcp-server-deapi

2. Choose your Python environment setup:

Option A: Using uv (recommended - fastest)

uv pip install -e .

Option B: Using pip

pip install -e .

Option C: Using conda
```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.