mcpField
P
Postmancer

Postmancer

本地服务
github.com/hijaz开发工具2962 周前更新

关于 Postmancer

Postmancer 是一个实验性的 MCP 服务,用于 API 测试与管理,让 AI 助手通过自然语言调用 RESTful API。它定位为 Postman 和 Insomnia 的替代方案,面向 AI 助手设计。

主要功能

  1. 01发送 HTTP 请求
  2. 02保存请求至集合并分类管理
  3. 03环境变量与变量替换
  4. 04支持 Basic、Bearer、API Key 和 OAuth2 认证
  5. 05请求与响应历史记录

适用场景

  1. 01让 AI 助手测试 REST API 接口
  2. 02管理并复用已保存的 API 请求集合
  3. 03在请求模板中使用环境变量

MCP 相关

Postmancer 作为 MCP 服务运行,向 MCP 客户端(如 Claude Desktop)暴露 http_request、save_request 等工具。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"postmancer": {
"command": "npx",
"args": [
"-y",
"postmancer"
]
}
}
}
启动命令npx -y postmancer

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npmpostmancer

工具

7

收录的工具列表 · 更新于 3 周前

参数类型必填说明
urlstring是
methodenum是GET | POST | PUT | DELETE | PATCH | HEAD | OPTIONS
headersobject否
bodystring否
query_paramsobject否
timeoutnumber否
authobject否
auth.typeenum是basic | bearer | oauth2 | api_key | custom
auth.usernamestring否
auth.passwordstring否
auth.tokenstring否
auth.token_typeenum否bearer
auth.keystring否
auth.valuestring否
auth.inenum否header | query
auth.namestring否
auth.client_idstring否
auth.authorization_urlstring否
auth.token_urlstring否
auth.redirect_uristring否
auth.flowenum否authorization_code | client_credentials | password | implicit
auth.client_secretstring否
auth.scopestring否
auth.headersobject否
retryboolean否
max_retriesnumber否
retry_delaynumber否

详细介绍

MseeP.ai Security Assessment Badge

Postmancer

Trust Score

Postmancer

一个独立的 MCP 服务,用于 API 测试和管理,让 AI 助手能够通过自然语言与 RESTful API 交互。

概述

Postmancer 是一款 MCP(Model Context Protocol)服务,可让 Claude 等 AI 助手发送 HTTP 请求、管理 API 端点集合并测试 API 响应。它提供的功能与 Postman 或 Insomnia 等工具类似,但专为 AI 助手设计。

功能

  • 向任何 REST API 发送 HTTP 请求
  • 在集合中保存和整理请求
  • 设置和使用环境变量,并替换变量
  • 支持多种身份验证方式(Basic、Bearer、API Key、OAuth2)
  • 请求/响应历史记录和测试

快速开始

安装
# Install globally
npm install -g postmancer

# Or run directly with npx
npx postmancer
与 Claude Desktop 搭配使用

将以下内容添加到 Claude Desktop 配置文件中:

  • Windows:%USERPROFILE%\.claude\claude_desktop_config.json
  • macOS/Linux:~/.claude/claude_desktop_config.json
{
  "mcpServers": {
    "postmancer": {
      "command": "npx",
      "args": ["-y", "postmancer"],
      "env": {
        "LOG_LEVEL": "info"
      }
    }
  }
}
使用 Docker
docker run -i --rm \
  --mount type=bind,src=/path/to/collections,dst=/data/collections \
  postmancer

可用工具

Postmancer 为 AI 助手提供以下工具:

  1. http_request - 向任何 URL 发送 HTTP 请求
  2. list_collections - 查看所有已保存的 API 集合
  3. list_requests - 查看集合中的所有请求
  4. save_request - 将请求保存到集合中
  5. request_from_collection - 执行已保存的请求
  6. set_environment_variable - 为请求模板设置变量
  7. get_environment_variables - 查看所有环境变量

配置

使用以下环境变量配置 Postmancer:

  • COLLECTIONS_PATH:集合的存储路径(默认值:~/.postmancer)
  • LOG_LEVEL:日志级别(debug、info、warn、error)(默认值:info)
  • POSTMANCER_ENCRYPTION_KEY:用于加密凭据和令牌的密钥(如果未提供,则会生成随机密钥)
  • ENCRYPTION_KEY:用于加密标记为机密的环境变量的密钥(如果未提供,则使用默认密钥)

出于生产环境的安全考虑,强烈建议设置这些加密密钥,而不要使用默认值。

许可证

MIT

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。