PolarHub
  • Agents
  • MCP Servers
  • Skills
  • PolarBear
PolarHub © 2026
MCP Serversimage-and-video-processingmcp-deeinfra
返回「image-and-video-processing」

mcp-deeinfra

modelscope·@phuihock/mcp-deeinfra

image-and-video-processing0下载LocalModelScope

简介

暂无描述。

MCP Server 详情

来自 ModelScope 索引

MCP DeepInfra AI Tools Server

This is a Model Context Protocol (MCP) server that provides various AI capabilities using the DeepInfra OpenAI-compatible API, including image generation, text processing, embeddings, speech recognition, and more.

Project Structure

mcp-deepinfra/
 src/
    mcp_deepinfra/
        __init__.py      # Package initialization
        server.py        # Main MCP server implementation
 tests/
    conftest.py          # Pytest fixtures and configuration
    test_server.py      # Server initialization tests
    test_tools.py        # Individual tool tests
 pyproject.toml           # Project configuration and dependencies
 uv.lock                  # Lock file for uv package manager
 run_tests.sh             # Convenience script for running tests
 README.md               # This file

Setup

  1. Install uv if not already installed:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Clone or download this repository.

  3. Install dependencies:

    uv sync
    
  4. Set up your DeepInfra API key: Create a .env file in the project root:

    DEEPINFRA_API_KEY=your_api_key_here
    

Configuration

You can configure which tools are enabled and set default models for each tool using environment variables in your .env file:

  • ENABLED_TOOLS: Comma-separated list of tools to enable. Use "all" to enable all tools (default: "all"). Example: ENABLED_TOOLS=generate_image,text_generation,embeddings

  • MODEL_GENERATE_IMAGE: Default model for image generation (default: "Bria/Bria-3.2")

  • MODEL_TEXT_GENERATION: Default model for text generation (default: "meta-llama/Llama-2-7b-chat-hf")

  • MODEL_EMBEDDINGS: Default model for embeddings (default: "sentence-transformers/all-MiniLM-L6-v2")

  • MODEL_SPEECH_RECOGNITION: Default model for speech recognition (default: "openai/whisper-large-v3")

  • MODEL_ZERO_SHOT_IMAGE_CLASSIFICATION: Default model for zero-shot image classification (default: "openai/gpt-4o-mini")

  • MODEL_OBJECT_DETECTION: Default model for object detection (default: "openai/gpt-4o-mini")

  • MODEL_IMAGE_CLASSIFICATION: Default model for image classification (default: "openai/gpt-4o-mini")

  • MODEL_TEXT_CLASSIFICATION: Default model for text classification (default: "microsoft/DialoGPT-medium")

  • MODEL_TOKEN_CLASSIFICATION: Default model for token classification (default: "microsoft/DialoGPT-medium")

  • MODEL_FILL_MASK: Default model for fill mask (default: "microsoft/DialoGPT-medium")

The tools always use the models specified via environment variables. Model selection is configured at startup time through the environment variables listed above.

Running the Server

To run the server locally:

uv run mcp_deepinfra

Or directly with Python:

python -m mcp_deepinfra.server

Using with MCP Clients

Configure your MCP client (e.g., Claude Desktop) to use this server.

For Claude Desktop, add to your claude_desktop_config.json:

{
  "mcpServers": {
    "deepinfra": {
      "command": "uv",
      "args": ["run", "mcp_deepinfra"],
      "env": {
        "DEEPINFRA_API_KEY": "your_api_key_here"
      }
    }
  }
}

Tools Provided

This server provides the following MCP tools:

  • generate_image: Generate an image from a text prompt. Returns the URL of the generated image.
  • text_generation: Generate text completion from a prompt.
  • embeddings: Generate embeddings for a list of input texts.
  • speech_recognition: Transcribe audio from a URL to text using Whisper model.
  • zero_shot_image_classification: Classify an image into provided candidate labels using vision model.
  • object_detection: Detect and describe objects in an image using multimodal model.
  • image_classification: Classify and describe contents of an image using multimodal model.
  • text_classification: Analyze text for sentiment and category.
  • token_classification: Perform named entity recognition (NER) on text.
  • fill_mask: Fill masked tokens in text with appropriate words.

Testing

To test the server locally, run the pytest test suite:

# Install test dependencies
uv sync --extra test

# Run all tests
pytest

# Run with verbose output
pytest -v

# Run specific test file
pytest tests/test_tools.py

# Use the convenience script
./run_tests.sh

The tests include:

  • Server initialization and tool listing
  • Individual tool functionality tests via JSON-RPC protocol
  • All tests run synchronously without async/await complexity

Running with uvx

uvx is designed for running published Python packages from PyPI or GitHub. For local development, use the uv run command as described above.

If you publish this package to PyPI (e.g., as mcp-deepinfra), you can run it with:

uvx mcp-deepinfra

And configure your MCP client to use:

{
  "mcpServers": {
    "deepinfra": {
      "command": "uvx",
      "args": ["mcp-deepinfra"],
      "env": {
        "DEEPINFRA_API_KEY": "your_api_key_here"
      }
    }
  }
}

For local development, stick with the uv run approach.

相关 MCP Servers(来自「image-and-video-processing」)

魔法组件协议

ModelContextProtocol服务器适用于Magic UI,它通过提供诸如跑马灯、动画、特效和互动背景等组件的代码,使AI助手能够轻松为Web应用程序实现UI组件。

@magicuidesign/mcp

网页开发MCP

一个提供网页开发工具的MCP服务器,例如屏幕捕捉功能,可以让AI代理获取并处理用户屏幕的截图。

@ZukAi-MCP/webdev-mcp

智能组件生成器

一个由人工智能驱动的工具,可以从自然语言描述生成现代UI组件,并与流行的IDE集成,以简化UI开发工作流程。

@21st-dev/magic-mcp

Blender

通过模型上下文协议(MCP)将Blender连接到Claude AI,使Claude能够直接与Blender交互并对其进行控制,从而实现AI辅助的3D建模、场景操作和渲染。

@ahujasid/blender-mcp

Dify组件生成器

集成了Dify AI API,为Ant Design组件提供代码生成服务,支持文本和图像输入,并具备流式处理能力。

@AI-FE/dify-mcp-server

Excalidraw MCP绘图管理器

一种模型上下文协议服务器,提供创建、管理和导出Excalidraw绘图的API功能,支持SVG、PNG和JSON等多种格式。

@i-tozer/excalidraw-mcp

自动安装

点击按钮会唤起 PolarBear 客户端,并把当前 MCP Server 的 Markdown 详情文档地址传给客户端。

/api/mcps/phuihock-mcp-deeinfra/markdown
打开 PolarBear 安装查看 Markdown 文档

手动安装

在 PolarBear 或其他支持 MCP 的客户端中,新建 MCP Server,并参考下方来源或安装提示配置。

mcp-deepinfra/ src/ mcp_deepinfra/ __init__.py # Package initialization server.py # Main MCP server implementation tests/ conftest.py # Pytest fixtures and configuration test_server.py # Server initialization tests test_tools.py # Individual tool tests pyproject.toml # Project configuration and dependencies uv.lock # Lock file for uv package manager run_tests.sh # Convenience script for running tests README.md # This file

基本信息

分类
image-and-video-processing / speech-processing / text-summarization
运行方式
No
许可证
Unknown
详情文件
phuihock-mcp-deeinfra.md