DeAPI Server
FreeNot checkedProduction-ready MCP server for the deAPI REST API, exposing AI capabilities like audio transcription, image generation, OCR, video generation, and text-to-spee
About
Production-ready MCP server for the deAPI REST API, exposing AI capabilities like audio transcription, image generation, OCR, video generation, and text-to-speech as MCP tools.
README
deapi-ai/mcp-server-deapi MCP server deAPI MCP connector
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/*). API v1 is not supported: the tools send v2 payloads only.
Features
- Complete API Coverage: 54 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
- Titles and Annotations: Every tool has a title and explicit hints (read-only, destructive, idempotent, open-world), so a client can tell lookups from billed jobs
Available Tools
Audio Tools
audio_transcription- Transcribe audio files to text using Whisper modelsaudio_transcription_price- Calculate transcription costaudio_transcription_sync- Fast transcription for short audio clips: the text comes back in the same response, with no job to wait for. For voice notes, commands, short clips; for anything longer use the regular transcription,audio_transcription.audio_transcription_sync_price- Calculate fast transcription cost (per second of audio)text_to_audio- Convert text to natural speech (TTS)text_to_audio_price- Calculate TTS costtext_to_music- Generate music from text description and lyricstext_to_music_price- Calculate music generation costaudio_url_transcription- Transcribe audio from URLs of completed Twitter Spacesaudio_url_transcription_price- Calculate Twitter Spaces transcription cost
Video Transcription Tools
video_file_transcription- Transcribe video files to textvideo_file_transcription_price- Calculate video file transcription costvideo_url_transcription- Transcribe videos from URLs (YouTube, Twitter/X, Twitch, Kick, TikTok)video_url_transcription_price- Calculate video URL transcription cost
Image Tools
text_to_image- Generate images from text promptsimage_to_image- Transform images with text guidanceimage_to_text- Extract text from images (OCR)image_remove_background- Remove background from imagesimage_upscale- Upscale images to higher resolutiontext_to_image_price- Calculate image generation costimage_to_image_price- Calculate image transformation costimage_to_text_price- Calculate OCR costimage_remove_background_price- Calculate background removal costimage_upscale_price- Calculate upscaling cost
Video Tools
text_to_video- Generate videos from text promptsimage_to_video- Animate static images into videosaudio_to_video- Generate video conditioned on audio contentvideo_description- Describe a video in text (from an uploaded file or a video URL)video_upscale- Upscale a video to higher resolutiontext_to_video_price- Calculate text-to-video costimage_to_video_price- Calculate image-to-video costaudio_to_video_price- Calculate audio-to-video costvideo_description_price- Calculate video description costvideo_upscale_price- Calculate video upscaling cost
Web Tools
Web search is in limited availability; accounts without access get a 404, which the tools report as not available for the account. Both calls are synchronous: the results are in the response.
web_search- Search the live web for sources you do not have yet: ranked links, titles and dates, optionally with each page's text, the passages relevant to the query, or a summaryweb_search_price- Quote a web search (free); worth it before many results or summariesweb_contents- Read pages whose URLs you already have: their text, excerpts or a summary. Pages that cannot be read come back with theirstatus(and areasonsuch asfetch_failedwhen the API gives one), are listed undernot_readand are not chargedweb_contents_price- Quote reading those pages (free)
Embedding Tools
text_to_embedding- Generate text embeddings for semantic searchtext_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 balanceget_available_models- List available AI models with specificationscheck_job_status- Query async job status by ID; withwait_secondsit waits for the job and returns the finished result in the original tool's shape. A failed job reportssuccess: falsewitherror_reason,error_code,retryableandrefunded
Account and API Key Tools
Reading needs an ADMIN key, except the key's own details and usage, which any key can read. An API-role key gets a clear message with the dashboard link instead of a bare 403.
get_account- Balance, currency and auto top-up settingsget_account_usage- Cost, requests and errors of the whole account over a window, by day, hour, type, model or keylist_payments- Balance top-upslist_api_keys- The account's keys: role, status, expiry, spend limit and its use, IP allowlist (never secrets)get_api_key/get_api_key_usage- One key's details or usage; withoutkey_id, the key this connection usescreate_api_key/update_api_key/delete_api_key- Create a key (its secret is shown once), disable, re-enable or change one, or delete one. Off by default (DEAPI_KEY_MANAGEMENT_TOOLS=false): the tools then change nothing and answer with the link to the dashboard, so the assistant can send the user there. On, they act and are marked destructive, so clients ask the user before each call. A created key's secret passes through the conversation, so turn this on only where that is acceptable
Webhooks
Every generation tool accepts webhook_url (HTTPS) and an optional webhook_secret (32–255 chars). deAPI calls that URL when the job finishes, signed with X-DeAPI-Signature: sha256=<HMAC-SHA256(secret, "<timestamp>.<body>")>; the tool still returns the result to the caller as usual.
Titles and annotations
Every tool has a title (for example "Generate video", "Price: OCR", "Check balance") and sets
readOnlyHint, destructiveHint, idempotentHint and openWorldHint, which MCP clients use
to decide how to present a tool and whether to ask before calling it:
- Price quotes,
get_balance,get_available_models,check_job_statusand the account reads are read-only and idempotent. - Tools that run a job are not read-only (each call is billed and creates a new result), not destructive (nothing that exists is changed) and not idempotent (two calls run two jobs).
openWorldHintis true forweb_searchand for every tool that takes a URL (a file the API fetches, or awebhook_urlit posts to); tools confined to the account, its jobs and the model catalogue set it to false.- The API key tools are destructive only with
DEAPI_KEY_MANAGEMENT_TOOLSon (see above).
Model-driven defaults
Generation parameters such as width, height, steps, frames and fps default to the selected model's own values when left unset — each model has different limits, so there is no fixed default that works everywhere. The get_available_models output and every tool description list each model's accepted ranges. Set enhance_prompt: true on text_to_image, image_to_image, text_to_video or image_to_video to let deAPI rewrite the prompt; the result then includes prompt_boost with the prompt actually used.
Installation
Prerequisites
For running the MCP server:
- Python 3.11 or higher
uv,pip, orcondafor package management
For a deAPI account:
- Sign up at app.deapi.ai and create an API token at app.deapi.ai/settings/api-keys
Install from PyPI
pip install deapi-mcp
# or run it without installing:
uvx deapi-mcp
The deapi-mcp command starts the HTTP server (see Running the Server).
Setup from source
- Clone the repository:
git clone https://github.com/deapi-ai/mcp-server-deapi.git
cd mcp-server-deapi
- 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
# Create conda environment
conda create -n mcp-server-deapi python=3.11
conda activate mcp-server-deapi
# Install dependencies
pip install -e .
- (Optional) Create a
.envfile for configuration:
# Copy the example file
cp .env.example .env
# Edit with your preferences (optional - defaults work fine locally).
# Set DEAPI_JWT_SECRET_KEY before exposing the server beyond localhost.
# DEAPI_API_BASE_URL=https://api.deapi.ai
# DEAPI_HTTP_TIMEOUT=30.0
# DEAPI_MAX_RETRIES=3
Usage
Running the Server
The server can run in two modes:
Local Mode (for use with Claude Desktop on the same machine):
MCP_HOST=127.0.0.1 python -m deapi_mcp.server_remote
The server starts on http://localhost:8000. On loopback it may run without DEAPI_JWT_SECRET_KEY
(it then signs OAuth tokens with a per-process key, so a restart logs clients out).
Remote Mode (for deployment to a remote server):
# A fixed signing key is required whenever the server binds beyond loopback
# (the default host is 0.0.0.0) or uses Redis; without it the server refuses to start.
export DEAPI_JWT_SECRET_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))")
MCP_HOST=0.0.0.0 MCP_PORT=8000 python -m deapi_mcp.server_remote
See the Remote Deployment section for production deployment options.
Connecting from Claude Desktop / Claude.ai
Option 1: Add Connector with the sign-in window (Recommended)
Both Claude Desktop and Claude.ai support MCP connectors with built-in OAuth authentication.
- Get your deAPI API key from app.deapi.ai/settings/api-keys
- In Claude Desktop or Claude.ai, go to Customize → Connectors → Add custom connector
- Name it
deAPIand enter the endpointhttps://your-server-domain/mcp - Click Add, then Connect: a deAPI sign-in window opens. Paste your API key and choose Allow access. Claude then discovers all tools.
Without the window: under Advanced settings choose Use your own OAuth client, with
Client ID deapi-mcp and your API key as Client Secret.
For details on the OAuth flow, see AUTH.md.
Option 2: Request Headers (no OAuth)
Where your Claude plan offers Request headers for custom connectors, add the connector with
no sign-in and the header Authorization: Bearer YOUR_DEAPI_TOKEN.
Claude Desktop takes remote servers from Connectors only: its claude_desktop_config.json
runs local (stdio) servers and is not the place for this server's URL.
Other clients
Open the server's root URL (https://your-server-domain/) in a browser: it shows the endpoint
and a ready-to-copy setup for Claude, ChatGPT, Claude Code, Cursor, VS Code, Codex CLI and
Gemini CLI.
Any client that speaks Streamable HTTP works with the endpoint /mcp and one of these headers:
Authorization: Bearer <your deAPI API key>X-API-Key: <your deAPI API key>
A key deAPI does not accept is refused with 401 when the client connects.
Using the Tools
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:
- Get available models:
Use get_available_models to see available models
- Check your balance:
Use get_balance to check remaining credits
- Generate an image:
Use text_to_image with:
- prompt: "A beautiful sunset over mountains"
- model: "Flux1schnell"
- Transcribe audio:
Use audio_transcription with:
- audio: "base64-encoded-audio-or-url"
- include_ts: true
Media inputs (images, audio, video) are a URL or the file inline as a data URI or base64. Inline media travel in the MCP request itself, which takes at most 4 MiB, so about 3 MB of media per request; send a larger file by URL (this server fetches up to 10 MB per image, 20 MB per audio file and 50 MB per video, 75 MB per call in all).
For a short clip, use fast transcription: audio_transcription_sync with the same audio;
the transcript comes back in the response, with no job to wait for. For voice notes,
commands, short clips; for anything longer use the regular transcription,
audio_transcription.
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.
Architecture
Key Components
- DeapiClient (
deapi_mcp/deapi_client.py): the deAPI Python SDK client of one tool call, for the caller's key, over a shared connection pool and a shared model catalogue cache - PollingManager (
deapi_mcp/polling_manager.py): Smart adaptive polling for async jobs - Schemas (
deapi_mcp/schemas.py): Pydantic models for type safety - Auth code store (
deapi_mcp/auth_code_store.py): single-use OAuth authorization codes, in Redis whenDEAPI_REDIS_HOSTis set (so any replica can finish a login), otherwise in process memory - Webhooks (
deapi_mcp/webhooks.py): optional HMAC-verified receiver for deAPI completion callbacks, so waiting tools wake on the callback instead of polling (DEAPI_WEBHOOKS_INTERNAL) - Tools (
deapi_mcp/tools/): Organized tool implementationsaudio.py- Audio transcription, TTS & music generation toolsimage.py- Image generation, transformation, OCR, background removal & upscalingvideo.py- Video generation, image/audio-to-video, description & upscale toolsweb.py- Web search and page contents toolsembedding.py- Text embedding toolsprompt.py- Prompt booster toolsutility.py- Balance, models, status toolsaccount.py- Account, usage, payments and API key tools
Smart Adaptive Polling
The server uses job-type-specific polling strategies:
| Job Type | Initial Delay | Max Delay | Timeout |
|---|---|---|---|
| Audio | 1s | 5s | 5 min |
| Image | 2s | 8s | 5 min |
| Video | 5s | 30s | 15 min |
| Embedding | 0.5s | 3s | 2 min |
Other (incl. check_job_status) |
2s | 10s | 5 min |
Polling uses exponential backoff with a configurable multiplier (default: 1.5x,
DEAPI_POLLING_<TYPE>__BACKOFF_FACTOR).
Error Handling
- HTTP Errors: Reads are retried up to 3 times (
DEAPI_MAX_RETRIES) with exponential backoff; a job submission is retried only when it provably was not processed (rate limited, or the connection never opened), so a job is never submitted twice - Rate limits (429): a retry waits the API's
Retry-After, but never more than 5 s, and a write (job submission, price quote, key change) is retried at most once, so a rate-limited call gives up well insideDEAPI_TOOL_MAX_WAIT. The result then says how long to wait (fromRetry-After) and that nothing was charged - Retired models (410): the error names the model, the date it was retired and its replacement
- Refusals (403): told apart by the API's code: a key's IP allowlist, a key role that needs ADMIN, or a suspended account
- Limits: the tools publish no API limits (lengths, sizes, ranges, prices) of their own; those are on the model card (
get_available_models) and in the API's own error when a value is out of range - Long jobs: one tool call waits at most
DEAPI_TOOL_MAX_WAIT(45 s, below the 60 s call timeout many MCP clients use). A job still running then returnssuccess: true, done: falsewith itsjob_id, andcheck_job_status(job_id, wait_seconds=...)resumes the wait - Job Failures: Reported with the API's reason, error code, and whether the job is retryable / was refunded
- API Errors: Properly formatted error responses
Configuration
Configuration can be set via environment variables (prefixed with DEAPI_). A variable set to
an empty value (DEAPI_REDIS_PORT=) counts as unset and takes the default. Comments go on their
own line: some tools (docker --env-file, kubectl create configmap --from-env-file) keep text
after a value, # ... included, as part of that value. .env.example lists
every variable with its default; the block below shows the common ones.
# API Configuration
DEAPI_API_BASE_URL=https://api.deapi.ai
DEAPI_API_VERSION=v2
# HTTP Client
DEAPI_HTTP_TIMEOUT=30.0
# Media one tool call uploads, in MB (all its files): this server's own limit
DEAPI_MAX_UPLOAD_MB=75
# Largest media file fetched from a URL, by type, in MB: server limits
DEAPI_MAX_IMAGE_FETCH_MB=10
DEAPI_MAX_AUDIO_FETCH_MB=20
DEAPI_MAX_VIDEO_FETCH_MB=50
# Media fetches per caller at once, seconds to wait for a slot, seconds per fetch, and the
# slowest average speed (kB/s) a fetch may keep after its first 5 s
DEAPI_MAX_MEDIA_FETCHES_PER_CALLER=4
DEAPI_MEDIA_FETCH_SLOT_WAIT=10
DEAPI_MEDIA_FETCH_TIMEOUT=30
DEAPI_MEDIA_FETCH_MIN_KBPS=32
# Media fetches at once in the whole process, the memory (MB) they may reserve together (one
# caller at most an eighth of it, never less than the largest type cap), and the threads
# resolving media host names
DEAPI_MAX_MEDIA_FETCHES=64
DEAPI_MEDIA_FETCH_BUDGET_MB=256
DEAPI_MEDIA_DNS_THREADS=32
# Largest request body on /mcp, in MiB (at most 4): inline base64 media up to about 3 MB
DEAPI_MAX_REQUEST_MB=4
DEAPI_MAX_RETRIES=3
# Seconds one tool call waits before returning done=false and the job_id
DEAPI_TOOL_MAX_WAIT=45.0
# Check a plain API key against deAPI at connect (cached; an API outage lets keys through)
DEAPI_VERIFY_API_KEYS=true
# Let the key tools create, change and delete API keys (needs an ADMIN key). Off: they
# answer with the dashboard link
DEAPI_KEY_MANAGEMENT_TOOLS=false
# OAuth for self-registering clients (DCR, CIMD) with a deAPI sign-in screen
DEAPI_OAUTH_PUBLIC_CLIENTS=true
# Header with the real client IP from a trusted edge (limits wrong keys on the sign-in screen)
# DEAPI_CLIENT_IP_HEADER=CF-Connecting-IP
# Polling Configuration (override defaults)
DEAPI_POLLING_AUDIO__INITIAL_DELAY=1.0
DEAPI_POLLING_AUDIO__MAX_DELAY=5.0
DEAPI_POLLING_AUDIO__TIMEOUT=300.0
# Internal completion webhooks (off by default). The receiver URL must be
# reachable from api.deapi.ai; a half-configured set refuses to start.
# Uncomment and fill in all three to turn them on.
DEAPI_WEBHOOKS_INTERNAL=false
# DEAPI_WEBHOOK_RECEIVER_URL=https://mcp.example.com/webhooks/deapi
# Secret the API signs callbacks with: 32-255 characters
# DEAPI_WEBHOOK_SECRET=
DEAPI_WEBHOOK_FALLBACK_POLL_INTERVAL=15.0
# Shared store for OAuth authorization codes (optional). Unset host = in-memory
# store, which only works with a single replica. Uncomment and set your own host.
# DEAPI_REDIS_HOST=redis.example.com
DEAPI_REDIS_PORT=6379
# DEAPI_REDIS_PASSWORD=
DEAPI_REDIS_DB=0
# Connection scheme: plain | tls (tls needs DEAPI_REDIS_CA_FILE)
DEAPI_REDIS_SCHEME=plain
# true = refuse to start without a Redis host
DEAPI_REDIS_REQUIRED=false
# Seconds in-flight tool calls may run after SIGTERM before they are cancelled.
# Keep it below your platform's termination grace period.
MCP_GRACEFUL_SHUTDOWN_SECONDS=930
# Behind a reverse proxy: the public URL OAuth discovery advertises (without it the
# 401 challenge points at the bind address), and which proxies' X-Forwarded-* headers
# are trusted.
# PUBLIC_BASE_URL=https://mcp.example.com
# FORWARDED_ALLOW_IPS=*
With internal webhooks on, every job the server submits carries its own receiver URL and the API calls back the moment the job ends; the waiting tool wakes at once, with a slow poll underneath as a safety net. A caller-supplied webhook_url takes precedence for that job (the API takes one webhook per job), which then polls normally. A replayed delivery (same delivery_id) wakes nobody twice. The job registry is in process memory by default; with several replicas, see DEPLOYMENT.md.
Development
Project Structure
mcp-server-deapi/
├── deapi_mcp/
│ ├── server_remote.py # Streamable-HTTP MCP server
│ ├── deapi_client.py # deAPI SDK client per tool call
│ ├── api_errors.py # SDK errors worded for the agent
│ ├── polling_manager.py # Smart adaptive polling logic
│ ├── schemas.py # Pydantic models
│ ├── config.py # Configuration management
│ ├── auth.py # current_deapi_token ContextVar
│ ├── fastmcp_auth.py # FastMCP OAuth provider, X-API-Key middleware
│ ├── key_verifier.py # One-time API key check against deAPI
│ ├── oauth_endpoints.py # OAuth 2.0 endpoints
│ ├── oauth_clients.py # Public clients: DCR and Client ID Metadata Documents
│ ├── consent.py # Sign-in screen at /authorize
│ ├── auth_code_store.py # OAuth authorization codes (Redis or in-memory)
│ ├── middleware.py # Model cards of a call, enriched tool descriptions
│ ├── landing.py # Setup page at /
│ ├── icons.py # deAPI icon served to clients
│ ├── client_icons.py # Client pictures on the sign-in screen
│ ├── utils.py # Shared helpers (uploads, safe URL fetch, ...)
│ ├── observability.py # Per-call outcome, injectable metrics sinks
│ ├── webhooks.py # Internal completion-webhook receiver
│ └── tools/ # Tool implementations
│ ├── audio.py # Audio transcription, TTS & music generation
│ ├── image.py # Image generation, OCR & processing
│ ├── video.py # Video generation, image/audio-to-video, description & upscale
│ ├── embedding.py # Text embeddings
│ ├── prompt.py # Prompt booster
│ ├── utility.py # Balance, models, status
│ ├── account.py # Account, usage, payments, API keys
│ ├── _price_helpers.py # Resolve parameters from the model card
│ └── _responses.py # Shared tool response shape
├── tests/ # Test suite
│ ├── __init__.py
│ └── conftest.py # Pytest fixtures
├── pyproject.toml # Dependencies
├── Dockerfile # Container build
├── docker-compose.yml # Container orchestration
├── .env.example # Environment config template
├── README.md # This file
├── DEPLOYMENT.md # Deployment guide
├── AUTH.md # OAuth authentication setup
└── CLAUDE.md # Claude Code guidance
Running Tests
Install dev dependencies:
uv pip install -e ".[dev]"
Run tests:
pytest
Run smoke tests (requires a running server):
python tests/smoke_test.py
Run the authentication end-to-end matrix in Docker (server image against a fake deAPI API):
docker compose -f tests/e2e/docker-compose.yml up --build --exit-code-from e2e
docker compose -f tests/e2e/docker-compose.yml down
Code Formatting
Format code with Black:
black deapi_mcp/ tests/
Lint with Ruff:
ruff check deapi_mcp/ tests/
Type-check with mypy (strict):
mypy deapi_mcp
CI runs all three plus the test suite on Python 3.11–3.14.
Building your own server on the core
deapi_mcp is importable, so a deployment can assemble its own server from the same tools
and add what it needs (for example its own metrics) without forking:
from fastmcp import FastMCP
from deapi_mcp.server_remote import create_app, register_core_tools
server = FastMCP("my-deapi")
register_core_tools(server) # every deAPI tool
app = create_app(server, metrics=None) # Starlette app: /mcp, /health, OAuth routes
As with the stock server, set DEAPI_JWT_SECRET_KEY first: without it the app refuses to start
on a non-local host.
metrics is an optional overlay that instruments tool calls and OAuth and mounts its own
routes; the stock server (build_app()) passes none. job_registry replaces the in-process
registry that completion webhooks wake waiting tools through, for a deployment whose replicas
share one receiver URL: implement deapi_mcp.webhooks.JobRegistry (or subclass
JobCompletionRegistry, relay signal to the other replicas and call wake where it arrives).
Its start/stop run with the app's lifespan. Recorders for per-call outcomes and
rejected logins plug in through deapi_mcp.observability. Settings an overlay can use
(DEAPI_METRICS_TOKEN, DEAPI_METRICS_REDIS_DB, DEAPI_METRICS_PREFIX) are already defined
in deapi_mcp.config; the core itself never reads them.
The package ships type information (py.typed) and exposes deapi_mcp.__version__.
API Token Security
Important: The MCP server does NOT store API tokens. Authentication works as follows:
- For Remote HTTP Server: Authentication is handled via OAuth 2.0 (Authorization Code with PKCE) or HTTP headers (
Authorization: Bearer <key>orX-API-Key: <key>); the key is never read from the URL - Token forwarding: The server forwards authentication to the deAPI API for each request
- No persistence: Tokens are used only for the specific request and never persisted or logged
- Per-connection auth: Tools do NOT accept
deapi_api_tokenparameters - authentication is managed at the connection level
Always keep your API tokens secure and never commit them to version control. See AUTH.md for detailed OAuth setup.
Remote Deployment
For production environments or when you want to host the MCP server on a remote machine, use the remote server mode.
Quick Start with Docker
- Build and run with Docker:
docker build -t mcp-server-deapi .
docker run -d -p 8000:8000 --name mcp-server-deapi -e DEAPI_JWT_SECRET_KEY="<a long random secret>" --stop-timeout 960 mcp-server-deapi
- Or use Docker Compose (reads
DEAPI_JWT_SECRET_KEYfrom the environment or.env):
docker compose up -d
- Connect a client: add
https://your-server-domain/mcpas a custom connector (see Connecting from Claude Desktop / Claude.ai). Claude needs an HTTPS URL it can reach, so put the server behind a TLS proxy first.
Manual Remote Deployment
- On your remote server:
git clone https://github.com/deapi-ai/mcp-server-deapi.git
cd mcp-server-deapi
pip install -e .
export DEAPI_JWT_SECRET_KEY="<a long random secret>"
python -m deapi_mcp.server_remote
- For production with systemd:
# Create /etc/systemd/system/mcp-server-deapi.service
sudo systemctl enable mcp-server-deapi
sudo systemctl start mcp-server-deapi
- Behind a reverse proxy (nginx + SSL):
server {
listen 443 ssl http2;
server_name mcp.yourdomain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 86400;
}
}
Cloud Deployment Options
- Railway.app: Push to GitHub, connect repository, deploy automatically
- Fly.io:
fly launch && fly deploy - 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.
Troubleshooting
Connection Issues
If the server fails to connect:
- Check your API token is valid
- Verify network connectivity to api.deapi.ai
- Check the logs for specific error messages
- For remote servers: verify firewall rules and that port 8000 is accessible
Job Timeouts
If jobs are timing out:
- Check your balance with
get_balance - Verify the job type timeout is appropriate
- Use
check_job_statusto check if the job is still processing
Model Not Found
If you get model errors:
- Use
get_available_modelsto see available models - Ensure you're using the correct model name
- Check if the model supports your requested operation
Remote Connection Issues
If remote MCP connection fails:
- Test the server:
curl http://your-server:8000/health(a bareGET /mcpanswers 405: the transport is stateless, POST only) - Check server logs:
docker logs mcp-server-deapiorjournalctl -u mcp-server-deapi - Verify firewall rules and SSL certificates (if using HTTPS)
- Ensure MCP endpoint is accessible from your client
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
See CHANGELOG.md.
Support
For issues related to:
- This MCP Server: Open an issue
- A security vulnerability: do not open a public issue; see SECURITY.md
- deAPI Platform: Visit docs.deapi.ai
- MCP Protocol: Visit modelcontextprotocol.io
Installing DeAPI Server
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/deapi-ai/mcp-server-deapiFAQ
Is DeAPI Server MCP free?
Yes, DeAPI Server MCP is free — one-click install via Unyly at no cost.
Does DeAPI Server need an API key?
No, DeAPI Server runs without API keys or environment variables.
Is DeAPI Server hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install DeAPI Server in Claude Desktop, Claude Code or Cursor?
Open DeAPI Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
ARA
Generate images, video and audio from any AI agent — one connector.
by ARAVideo Analyzer
MCP server for video analysis — extracts transcripts, key frames with OCR, and annotated timelines from video URLs. Supports Loom and direct video files (.mp4,
by guimatheus92Omni Video
An MCP server that transforms LLM-enabled IDEs into professional video editors by pre-processing footage into text proxies, generating motion graphics via HTML/
by buildwithtazaYouTube
Transcripts, channel stats, search
by YouTubeEverArt
AI image generation using various models.
by modelcontextprotocolgpu-bridge/mcp-server
GPU inference API for LLMs, image and video generation, TTS, Whisper, embeddings, reranking and OCR, paid per use via x402 or an API key.
by gpu-bridgemerterbak/Grok-MCP
Access xAI's Grok API with agentic tool calling, image generation, vision and file support.
by merterbakSureScaleAI/openai-gpt-image-mcp
Image generation and editing with OpenAI's GPT image models.
by SureScaleAIYangLiangwei/PersonalizationMCP
Aggregate personal data from Steam, YouTube, Bilibili, Spotify, Reddit and other gaming, music, video and social platforms, with OAuth2 and token management.
by YangLiangweiAceDataCloud/MCPFlux
Flux image generation and editing from Black Forest Labs via the Ace Data Cloud API.
by AceDataCloudCompare DeAPI Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All media MCPs
