modelrun
Provides a workbench for interacting with the Replicate API. This integration allows users to list models and collections, inspect model versions and schemas, create and manage prediction runs, and view the account associated with the API token.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
modelrun
modelrun is a small workbench for Replicate. It follows the shape of the service: models live under an owner and a name, each model has versions with their own input schemas, collections gather models worth browsing, and a prediction is one run of a version — or of an official model — with a free-form input object. From that shape modelrun lists and reads models, walks collections and version history, starts predictions, watches them, cancels them, and reports the account the token belongs to. One binary serves a command-line interface and a stdio MCP server.
A Replicate API token is required. Put it in the
REPLICATE_API_TOKEN environment variable; it is sent to the API as
an Authorization: Bearer header and never appears in output. When
the variable is missing, every call fails with an error that names
it, before any request is made.
Replicate documents no search endpoint, so modelrun offers none:
discovery is list_models and list_collections, narrowed by
reading the model you care about with get_model.
Install
npx @reneturcios/modelrun modelsOr run the container image:
docker run -i -e REPLICATE_API_TOKEN ghcr.io/cloudcorprecords/modelrunThe container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.
Related MCP server: Replicate MCP Server
CLI
export REPLICATE_API_TOKEN=<redacted>
modelrun models
modelrun model meta meta-llama-3-70b-instruct
modelrun collections
modelrun collection text-to-image
modelrun versions stability-ai sdxl
modelrun version stability-ai sdxl db21e45d3f7023abc2a46ee38c23973f6dce16bb082a930b0c49861f96d1e5bf
modelrun predict --model meta/meta-llama-3-70b-instruct '{"prompt":"Explain tides in one sentence."}'
modelrun predict --version db21e45d3f7023abc2a46ee38c23973f6dce16bb082a930b0c49861f96d1e5bf '{"prompt":"a lighthouse at dawn"}'
modelrun prediction zt3k9examplepredictionid
modelrun predictions
modelrun cancel zt3k9examplepredictionid
modelrun account
modelrun --versionEach command prints the upstream JSON payload. Exit codes: 0 on
success, 1 when a call fails (including a missing
REPLICATE_API_TOKEN or an API error), 2 for usage errors.
MCP server
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
npx -y @reneturcios/modelrun mcpMCP client configuration:
{
"mcpServers": {
"modelrun": {
"command": "npx",
"args": ["-y", "@reneturcios/modelrun", "mcp"],
"env": { "REPLICATE_API_TOKEN": "r8_..." }
}
}
}Tools
Tool | Input | What it returns |
|
| One page of models. |
|
| The model, with its description and latest version summary. |
| (none) | The curated collections. |
|
| The collection and the models it contains. |
|
| The model's versions. |
|
| The version, with its input/output schema. |
|
| The created prediction. |
|
| The prediction, with status and output. |
|
| One page of the account's predictions. |
|
| The canceled prediction. |
| (none) | The account that owns the token. |
All calls use the Replicate API under
https://api.replicate.com/v1. create_prediction passes the
input object through unchanged; for community models pass a
version ID, and for official models pass model as owner/name —
exactly one of the two, which the tool enforces before any request.
Development
npm install
npm run build # tsc -> dist/
npm test # node test runner over test/*.test.ts, no network (fake fetch fixtures)
npm run dev # run the CLI from source via tsxLicense
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Run any Relay model (image, video, audio, LLM), poll tasks, upload files and search Relay's docs.
Generate images, videos and music with model discovery, cost estimates and asynchronous results.
Account, billing, team, API key and model discovery tools for agents that use ModelsLab.
Chat with any LLM, generate images, browse models and check your usage and costs.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables users to access and manage Replicate's AI models and predictions via the Model Context Protocol, offering tools for creating, canceling, and retrieving model predictions and parameters.637 npm94MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI image generation and editing using Replicate's official models like Flux, SDXL, and Seedream, with tools to search models and generate images.36,302 npm6Apache 2.0
- AlicenseNot gradedqualityDmaintenanceProvides a standardized interface for interacting with Replicate's tools and services through a unified API, enabling AI model usage via MCP.70 PyPIMIT
- FlicenseBqualityDmaintenanceEnables LLM clients to generate, edit, and evaluate images through the Replicate API.4-