Token导航 LogoToken导航TokenDH.com
MCP Rest Utils logo
安全风控未说明官方级别未说明来源级核验

MCP Rest Utils

MCP Server

提供构建Model Context Protocol (MCP)服务器的共享REST API工具集,包含HTTP客户端、工具工厂、类型安全配置和统一错误处理等功能。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
API集成错误处理TypeScript类型安全

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

munch-group

提供方

munch-group

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

MCP REST实用程序

用于构建模型上下文协议(MCP)服务器的共享REST API实用程序。

特性

  • RestClient:具有自动重试、超时处理和错误管理功能的HTTP客户端
  • RestToolFactory:创建和执行MCP工具的工厂模式
  • 类型安全配置:REST工具定义的TypeScript接口
  • 错误处理:跨所有服务器的统一错误处理

安装

来自GitHub

npm install git+https://github.com/munch-group/mcp-rest-utils.git

来源

git clone https://github.com/munch-group/mcp-rest-utils.git
cd mcp-rest-utils
npm install
npm run build

用法

import { RestClient, RestToolFactory } from "@mcp/rest-utils";

// Create a REST client
const client = new RestClient({
  baseUrl: "https://api.example.com",
  defaultHeaders: { "Content-Type": "application/json" },
  timeout: 30000,
  retries: 3,
});

// Define tools
const tools = [{
  name: "get_data",
  description: "Get data from API",
  method: "GET",
  endpoint: (args) => `/data/${args.id}`,
  inputSchema: { /* ... */ },
}];

// Create tool factory and execute
const factory = new RestToolFactory(client);
const result = await factory.executeTool(tools[0], { id: "123" });

建筑

npm run build

许可证

国际学生委员会

目录标签

目录标签

API集成错误处理TypeScript类型安全RESTAPI本地部署HTTP客户端工具工厂

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP