跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Postman,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
在 AI 智能体中使用 Postman:浏览工作区、集合、文件夹和请求、环境、Spec Hub 规范和 API、带调用日志的 Mock 服务器、监控和团队成员,跨资源搜索,并在你确认后创建或修改集合、请求、环境、Mock、监控和规范。
试试这样问
Postman 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Postman、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Postman + ChatGPT
在 AI 智能体中使用 Postman:浏览工作区、集合、文件夹和请求、环境、Spec Hub 规范和 API、带调用日志的 Mock 服务器、监控和团队成员,跨资源搜索,并在你确认后创建或修改集合、请求、环境、Mock、监控和规范。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
POSTMAN_API_URL, POSTMAN_API_KEY
步骤 1 — 获取凭证
设置大约需要 2 分钟。你需要一个能访问相关工作区的 Postman 账户。
- 在 Postman 中打开头像、Settings、API keys(https://go.postman.co/settings/me/api-keys),点击 Generate API Key。命名后复制密钥;它以
PMAK-开头。 - 把它粘贴到
POSTMAN_API_KEY。密钥通过X-Api-Key请求头发送,并以你的 Postman 用户身份操作:你在各个工作区能看到的,AI 都能看到。 - 将
POSTMAN_API_URL设为https://api.postman.com;如果你的团队使用 Postman 欧盟数据区域的 Enterprise 方案,则设为https://api.eu.postman.com。 - 安装连接器并运行
postman_get_me:它会显示你的用户 id、团队和每月 API 用量,同时确认密钥可用。
id 和 uid:大多数对象都有 id 和 uid(<owner user id>-<id>)。Mock、监控和 postman_update_collection 使用集合的 uid;postman_create_collection_request、postman_update_collection_request 和 postman_create_collection_folder 使用普通 id。其他读取工具两者都接受。
可以读取:
- 你和你的团队:
postman_get_me、postman_list_workspaces(把createdBy设为你的用户 id 即可得到“我的工作区”)、postman_get_workspace(其中的集合、环境、Mock、监控和 API)、postman_list_team_users,以及按文本查找请求、集合、工作区、环境、文档、flow 或规范的postman_search(默认只搜索你的团队,设置ownership可包含公开资源)。 - Postman Collection Format v2.1 格式的集合:
postman_list_collections、postman_get_collection(大型集合先用model=minimal)、postman_get_collection_folder,以及包含方法、URL、请求头、请求体、认证和脚本的postman_get_collection_request。 - 环境:
postman_list_environments和postman_get_environment,包含每个变量的键、值、类型和启用状态。 - API 设计:Spec Hub 的
postman_list_specs、postman_get_spec、postman_list_spec_files、postman_get_spec_file和postman_get_spec_definition(完整解析后的 OpenAPI 或 AsyncAPI 定义);旧版 API Builder 的 API 用postman_list_apis和postman_get_api。 - Mock:
postman_list_mocks、postman_get_mock和postman_get_mock_call_logs,即客户端发给 Mock 的内容和 Mock 的响应(每次最多 100 条或 6.5 MB;请求头和请求体需配合include)。 - 监控:
postman_list_monitors和postman_get_monitor,其中lastRun显示最近一次的状态、时间以及通过和失败的断言数。
经你确认后可以写入:postman_create_collection、postman_update_collection(名称、描述、变量、认证;文件夹和请求保持不变)、postman_create_collection_folder、postman_create_collection_request、postman_update_collection_request(传入的字段替换旧值)、postman_create_environment、postman_update_environment、postman_create_mock、postman_create_monitor、postman_run_monitor、postman_create_spec(OpenAPI、AsyncAPI、protobuf、GraphQL、Smithy)和 postman_update_spec_file。AI 会说明要在哪个工作区创建或修改什么,得到你的同意后才调用。写入的内容对工作区所有成员可见。请注意:
postman_run_monitor会把集合中的真实请求发送到对应的 API,并消耗你方案中的一次监控运行;postman_create_monitor之后会按计划持续运行。- 新建的 Mock 默认公开,除非
private为 true。 postman_update_environment每次调用只接受一种 JSON Patch 操作;AI 会先读取环境以确定变量位置(values[0]即/values/0)。- Postman API 无法直接运行集合。请使用监控,或在你自己的 CI 中使用 Postman CLI。
安装后 35 个工具全部启用,没有被关闭的工具,也没有任何工具会删除工作区、集合、请求、环境、Mock、监控或规范。
机密信息:secret 类型的环境变量在共享时会连同值一起返回,集合变量或请求认证中也可能包含令牌。除非你要求,AI 不会复述这些值。
数据格式:集合和请求使用 Postman Collection Format v2.1(item 中包含文件夹和请求)。日期为 UTC 的 ISO 8601。
分页:postman_list_workspaces、postman_list_apis、postman_list_specs、postman_list_monitors、postman_get_mock_call_logs 和 postman_search 返回 meta.nextCursor;AI 会带上 cursor 继续调用,直到它为空。postman_list_collections 用 limit 和 offset 分页;它的 name 筛选按名称精确匹配,不能与二者同时使用。
限制:Postman 允许每个用户每分钟 300 个请求;postman_list_collections、postman_list_workspaces、postman_get_workspace 和监控相关端点则是 10 秒内最多 10 次。每个方案还有每月 API 调用配额,可在 postman_get_me 的 operations 中查看。带 rateLimited 的 429 表示需要等待(Retry-After 给出秒数);serviceLimitExhausted 表示方案配额已用完,需要团队管理员处理。
常见错误:401 表示密钥错误、已过期或已吊销,或属于另一个数据区域(检查 POSTMAN_API_URL)。403 表示你在该工作区的角色不允许此调用。404 表示 id 不存在或你无权查看。400 会指出错误的字段,例如在需要 uid 的地方传了集合 id。
连接器不会删除任何内容,也不涉及 fork 和 pull request、评论、标签、治理、API 目录、私有 API 网络、SCIM、审计日志、账单以及旧版 API Builder 的写入操作。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 ChatGPT 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
ChatGPT 在网页版的 Plugins 页面把 MCP 服务器添加为插件,仅付费套餐可用,不再需要开发者模式。在 Business 工作区中只有管理员和所有者可以添加;在 Enterprise 和 Edu 中,管理员可以授予 Create plugins with MCPs 权限。
- 前往 chatgpt.com/plugins,点击 Add,然后选择 Add custom MCP server。
- 填写名称,例如 Name:
Postman。 - 在 Connection 下的 Server URL 中填入
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID,Authentication 保持为 OAuth。 - 选择 I understand and want to continue,然后点击 Create as a plugin。ChatGPT 提示时,登录 AnythingMCP 并允许访问。
- 在个人插件中安装这个新插件,然后在对话中输入 @ 并选择它。
可用工具
| Tool | What it does |
|---|---|
postman_get_me | Read the Postman user the API key belongs to: user id, username, email, team id and name, and the monthly usage of API calls and other plan… |
postman_list_workspaces | List the workspaces the key can see: id, name, type and visibility (personal, team, private, public, partner) |
postman_get_workspace | Read one workspace with the collections, environments, mocks, monitors and APIs it contains (ids, uids and names), its visibility and who… |
postman_list_collections | List collections, optionally of one workspace: id, uid, name, owner and dates |
postman_get_collection | Read a whole collection in Postman Collection Format v2.1: info, folders and requests (item), variables, auth and scripts |
postman_get_collection_request | Read one request of a collection: method, url, headers, query parameters, body, auth and scripts |
postman_get_collection_folder | Read one folder of a collection with the ids of its requests and subfolders (or their full contents with populate) |
postman_list_environments | List environments, optionally of one workspace: id, uid, name, owner and dates |
postman_get_environment | Read an environment with its variables (key, value, type, enabled) |
postman_list_apis | List the APIs (API Builder) of a workspace: id, name, summary and dates |
postman_get_api | Read one API with, on request, its linked collections, versions, schemas or Git repository details |
postman_list_mocks | List the active mock servers: id, uid, name, mockUrl, the collection and environment they serve, and whether they are private |
postman_get_mock | Read a mock server: mockUrl, collection, environment, private flag, delay and server responses |
postman_get_mock_call_logs | Read the requests a mock server received and what it answered, newest first with sort=servedAt and direction=desc |
postman_list_monitors | List monitors (scheduled collection runs): id, uid, name, owner and whether they are active |
postman_get_monitor | Read a monitor: collection, environment, schedule (cron and time zone), regions, notifications, and lastRun with status, start and finish… |
postman_list_specs | List the API specifications in Spec Hub for a workspace: id, name, type (OPENAPI:3.0, ASYNCAPI:2.0 ...) and dates |
postman_get_spec | Read a spec's metadata: name, type, dates and who created and changed it |
postman_list_spec_files | List the files of a spec with their path and type (ROOT is the entry file, DEFAULT a referenced file) |
postman_get_spec_file | Read one file of a spec, including its content as text |
postman_get_spec_definition | Read the complete, resolved definition of an OpenAPI or AsyncAPI spec, with all files combined |
postman_list_team_users | List the users of the Postman team: id, name, username, email, roles and join date |
postman_search | Search Postman for requests, collections, workspaces, environments, documents, flows or specs by text |
postman_create_collection | Create a collection in a workspace, empty or with folders and requests in Postman Collection Format v2.1 |
postman_update_collection | Change a collection's name or description, its variables or its auth, leaving folders and requests as they are |
postman_create_collection_folder | Create a folder in a collection, at the top level or inside another folder |
postman_create_collection_request | Add a request to a collection, at the top level or in a folder: method, URL, headers, query parameters, body and scripts |
postman_update_collection_request | Change a request in a collection: name, method, URL, headers, query parameters, body, auth or scripts |
postman_create_environment | Create an environment in a workspace with its variables |
postman_update_environment | Change an environment with JSON Patch operations of one kind per call: add variables, replace the name or a variable property, or remove… |
postman_create_mock | Create a mock server that answers with the saved example responses of a collection |
postman_create_monitor | Create a monitor that runs a collection on a schedule from Postman's cloud |
postman_run_monitor | Run a monitor now, which sends the collection's real requests to their APIs and uses a monitoring run of the plan |
postman_create_spec | Create an API specification in Spec Hub from one or more files (OpenAPI, AsyncAPI, protobuf, GraphQL, Smithy) |
postman_update_spec_file | Change one file of an OpenAPI or protobuf spec: its content, its name, or its type (ROOT or DEFAULT) |
示例提示
- “我们的‘Payments’工作区里有哪些集合?Checkout 集合包含哪些请求?”
- “订单 API 的夜间监控最近一次运行通过了吗?有多少个断言失败?”
- “给我看我们的结账 Mock 服务器最近 20 次返回 404 的调用。”
- “在 Payments 集合中添加一个 POST 请求‘Create refund’,带 orderId 和 amount 的 JSON 请求体。”
- “给我 Orders 规范解析后的 OpenAPI 定义,并列出它的端点。”
FAQ
ChatGPT 免费套餐能用自定义 MCP 服务器吗? OpenAI 只为付费套餐提供自定义 MCP 服务器的说明,Free 套餐不在其列。
下一步
这份指南对你有帮助吗?