🚀 ViperMCP: A Model Context Protocol for Viper Server
Mixture-of-Experts VQA, streaming-ready, and MCP-native.
Potencialize seu agente
Instalação do publicador. Não é um endpoint do PlugMCP.
Host a copy with our keys and logs.
Ainda não há uma versão empacotada no registro. Siga o README do repositório.
URL remota ou um comando na sua máquina? Como as duas instalações diferem
Rodar no PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirViperMCP is a mixture-of-experts (MoE) visual question‑answering (VQA) server that exposes streamable MCP tools for:
It’s built on the shoulders of 🐍 ViperGPT and delivered as a FastMCP HTTP server, so it works with all FastMCP client tooling.
/mcp/) with streamingviper_query (text) & viper_task (crops/masks)An OpenAI API key is required. Provide it via one of the following:
OPENAI_API_KEY (environment variable)OPENAI_API_KEY_PATH (path to a file containing the key)?apiKey=... HTTP query parameter (for quick local testing)Use ngrok to expose your local server:
pip install ngrok
ngrok http 8000
Use the ngrok URL anywhere you see http://0.0.0.0:8000 below.
api.key, then run:docker run -i --rm \
--mount type=bind,source=/path/to/api.key,target=/run/secrets/openai_api.key,readonly \
-e OPENAI_API_KEY_PATH=/run/secrets/openai_api.key \
-p 8000:8000 \
rsherby/vipermcp:latest
This starts a CUDA‑enabled container serving MCP at:
http://0.0.0.0:8000/mcp/
💡 Prefer building from source? Use the included
docker-compose.yaml. By default it readsapi.keyfrom the project root. If your platform injects env vars, you can also setOPENAI_API_KEYdirectly.
git clone --recurse-submodules https://github.com/ryansherby/ViperMCP.git
cd ViperMCP
bash download-models.sh
# Store your key for local dev
echo YOUR_OPENAI_API_KEY > api.key
# (recommended) activate a virtualenv / conda env
pip install -r requirements.txt
pip install -e .
# run the server
python run_server.py
Your server should be live at:
http://0.0.0.0:8000/mcp/
To use OpenAI‑backed models via query param:
http://0.0.0.0:8000/mcp?apiKey=sk-proj-XXXXXXXXXXXXXXXXXXXX
Pass images as base64 (shown) or as URLs:
image_path='./your_image.png'
img_byte_arr = io.BytesIO()
image.save(img_byte_arr, format='PNG')
img_byte_arr.seek(0)
image_bytes = img_byte_arr.read()
img_b64_string = base64.b64encode(image_bytes).decode('utf-8')
async with client:
await client.ping()
tools = await client.list_tools() # optional
query = await client.call_tool(
"viper_query",
{"query": "how many muffins can each kid have for it to be fair?"},
{"image": f"data:image/png;base64,{img_b64_string}"},
)
task = await client.call_tool(
"viper_task",
{"task": "return a mask of all the people in the image"},
{"image": f"data:image/png;base64,{img_b64_string}"},
)
The OpenAI MCP integration currently accepts image URLs (not raw base64). Send the URL as type: "input_text".
response = client.responses.create(
model="gpt-4o",
tools=[
{
"type": "mcp",
"server_label": "ViperMCP",
"server_url": f"{server_url}/mcp/",
"require_approval": "never",
},
],
input=[
{"role": "system", "content": "Forward any queries or tasks relating to an image directly to the ViperMCP server."},
{
"role": "user",
"content": [
{"type": "input_text", "text": "based on this image, how many muffins can each kid have for it to be fair?"},
{"type": "input_text", "text": img_url},
],
},
],
)
GET /health => 'OK' (200)
GET /device => {"device": "cuda"|"mps"|"cpu"}
GET /mcp?apiKey= => 'Query parameters set successfully.'
POST /mcp/
viper_query(query, image) -> str
# Returns a text answer to your query.
viper_task(task, image) -> list[Image]
# Returns a list of images (e.g., masks) satisfying the task.
🧭 The MoE router picks from these based on the tool & prompt.
This package may generate and execute code on the host. We include basic injection guards, but you must harden for production. A recommended architecture separates concerns:
MCP Server (Query + Image)
=> Client Server (Generate Code Request)
=> Backend Server (Generates Code)
=> Client Server (Executes Wrapper Functions)
=> Backend Server (Executes Underlying Functions)
=> Client Server (Return Result)
=> MCP Server (Respond)
Huge thanks to the ViperGPT team:
@article{surismenon2023vipergpt,
title={ViperGPT: Visual Inference via Python Execution for Reasoning},
author={D'idac Sur'is and Sachit Menon and Carl Vondrick},
journal={arXiv preprint arXiv:2303.08128},
year={2023}
}
PRs welcome! Please:
/tests pass# Run with Docker (mount key file)
docker run -i --rm \
--mount type=bind,source=$(pwd)/api.key,target=/run/secrets/openai_api.key,readonly \
-e OPENAI_API_KEY_PATH=/run/secrets/openai_api.key \
-p 8000:8000 rsherby/vipermcp:latest
# From source (after setup)
python run_server.py
# Hit health
curl http://0.0.0.0:8000/health
# List device
curl http://0.0.0.0:8000/device
# Use query param key (local only)
curl "http://0.0.0.0:8000/mcp?apiKey=sk-proj-XXXX..."
Open an issue or start a discussion. We ❤️ feedback and ambitious ideas!
A mixture-of-experts (MoE) visual question-answering (VQA) server implemented as a model context protocol (MCP).
Ferramentas
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Este registro não lista nenhuma variável de ambiente obrigatória.
ViperMCP roda localmente via stdio.
Última verificação: 2026-10-28. A mixture-of-experts (MoE) visual question-answering (VQA) server implemented as a model context protocol (MCP).