Skip to main content
Glama

replicate-flux-mcp

getPrediction.ts624 B
import { replicate } from "../services/replicate.js"; import { handleError } from "../utils/error.js"; import { GetPredictionParams } from "../types/index.js"; import { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; export const registerGetPredictionTool = async ({ predictionId, }: GetPredictionParams): Promise<CallToolResult> => { try { const prediction = await replicate.predictions.get(predictionId); return { content: [ { type: "text", text: JSON.stringify(prediction, null, 2), }, ], }; } catch (error) { handleError(error); } };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/awkoy/replicate-flux-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server