Skip to main content
Glama

APISIX-MCP

by api7
stream-route.ts726 B
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { CreateOrUpdateStreamRouteSchema } from "../schemas/stream-route.js"; import makeAdminAPIRequest from "../utils/adminAPI.js"; const setupStreamRouteTools = (server: McpServer) => { server.tool("create_or_update_stream_route", "Create a stream route, if the stream route already exists, it will be updated", CreateOrUpdateStreamRouteSchema.shape, async (args) => { const routeId = args.id; if (routeId) { return await makeAdminAPIRequest(`/stream_routes/${routeId}`, "PUT", args.route); } else { return await makeAdminAPIRequest(`/stream_routes`, "POST", args.route); } }); }; export default setupStreamRouteTools;

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/api7/apisix-mcp'

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