# 安装 Petstore MCP Server

- 类型: MCP 工具
- 说明: 将 Swagger Petstore API 作为 MCP 工具用于接口测试与原型验证
- 仓库: https://github.com/la-rebelion/hapimcp
- ⚠ 安全: 该工具来自官方 Registry，且有可审计的开源仓库与近期维护记录，整体供应链信号偏正面。材料显示其会执行代码并连接声明的远程 Petstore 端点，但未要求密钥；在缺少更详细 README 的情况下，主要风险点是常规的网络外发与本地运行行为，整体以需留意为主。

## 方式一 · 一键代装（复制提示词让 AI 代劳）

### Claude Code
```
请帮我安装 askskill 上的 "Petstore MCP Server" MCP 服务：
执行：claude mcp add --transport http 'ai-com-mcp-petstore' 'https://petstore.run.mcp.com.ai/mcp'
```

### Codex
```
请帮我安装 askskill 上的 "Petstore MCP Server" MCP 服务：
在 ~/.codex/config.toml 中添加：
[mcp_servers.ai-com-mcp-petstore]
url = "https://petstore.run.mcp.com.ai/mcp"
然后重启 Codex 生效
```

### Cursor
```
请帮我安装 askskill 上的 "Petstore MCP Server" MCP 服务：
在 .cursor/mcp.json 的 "mcpServers" 中添加：
"ai-com-mcp-petstore": { "url": "https://petstore.run.mcp.com.ai/mcp" }
然后在 Cursor 设置 > MCP 中启用
```

## 方式二 · 命令行安装（原生命令与配置）

### Claude Code
```bash
claude mcp add --transport http 'ai-com-mcp-petstore' 'https://petstore.run.mcp.com.ai/mcp'
```

### Codex
```bash
codex mcp add 'ai-com-mcp-petstore' --url 'https://petstore.run.mcp.com.ai/mcp'
```
配置文件 ~/.codex/config.toml：
```toml
[mcp_servers.ai-com-mcp-petstore]
url = "https://petstore.run.mcp.com.ai/mcp"
```

### Cursor
配置文件 .cursor/mcp.json：
```json
{
  "mcpServers": {
    "ai-com-mcp-petstore": {
      "url": "https://petstore.run.mcp.com.ai/mcp"
    }
  }
}
```
一键安装：cursor://anysphere.cursor-deeplink/mcp/install?name=ai-com-mcp-petstore&config=eyJ1cmwiOiJodHRwczovL3BldHN0b3JlLnJ1bi5tY3AuY29tLmFpL21jcCJ9
