Openapi Sync MCP
ภาพรวม
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Type-safe MCP server for OpenAPI Sync to inspect, validate, and synchronize OpenAPI specs.
ใช้ทำอะไรได้
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
- การเชื่อมต่อ: รันบนเครื่อง
- ช่องทาง (transport): stdio
- หมวด: เครื่องมือนักพัฒนา
ติดตั้ง
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ผลตรวจผ่าน 2/2 · ทำงานบนเครื่องคุณ
ขั้นแรก: คุณใช้ AI ตัวไหน
เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง
ต่อกับ Claude ได้ แต่ต้องเตรียมก่อน
ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
เปิดไฟล์ตั้งค่าของแอป Claude บนคอม
SettingsDeveloperEdit Config
วางค่าตั้งนี้แล้วบันทึกไฟล์
{ "mcpServers": { "openapi-sync": { "command": "npx", "args": [ "-y", "openapi-sync-mcp" ] } } }ปิดแอป Claude แล้วเปิดใหม่
ลองเลย
ใช้ Openapi Sync MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Claude บอกว่ากำลังใช้ Openapi Sync MCP หรือมีชื่อเครื่องมือของ Openapi Sync MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ChatGPT ยังต่อ Openapi Sync MCP ไม่ได้
Openapi Sync MCP ต้องติดตั้งในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะตัวที่ทำงานบนเว็บ
คุณทำแบบนี้แทนได้
ก · ใช้แอปที่ต่อ Openapi Sync MCP ได้
- ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
- ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
- ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
- ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
ข · ตัวอื่นในหมวด เครื่องมือนักพัฒนา ที่ต่อกับ ChatGPT ได้
เลือกจากตัวที่ใช้มากในหมวดเดียวกัน เฉพาะตัวที่ต่อด้วยที่อยู่ได้โดยไม่ต้องใส่คีย์
- Sentry✓ ChatGPT
- Front-End Checklist✓ ChatGPT
- Compiler Explorer✓ ChatGPT
ต่อกับ Claude Code ได้ แต่ต้องเตรียมก่อน
ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
เปิด Terminal
Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell
วางคำสั่งนี้แล้วกด Enter
claude mcp add openapi-sync -- npx -y openapi-sync-mcpพิมพ์ /mcp ใน Claude Code
ต้องเห็น Openapi Sync MCP ในรายการและขึ้นว่าเชื่อมต่อแล้ว
ลองเลย
ใช้ Openapi Sync MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Claude Code บอกว่ากำลังใช้ Openapi Sync MCP หรือมีชื่อเครื่องมือของ Openapi Sync MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ Cursor ได้ แต่ต้องเตรียมก่อน
ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
เปิดแชตของ AI ใน Cursor โหมด Agent
ลองเลย
ใช้ Openapi Sync MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Cursor บอกว่ากำลังใช้ Openapi Sync MCP หรือมีชื่อเครื่องมือของ Openapi Sync MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ VS Code ได้ แต่ต้องเตรียมก่อน
ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
เปิดแชตของ AI ใน VS Code โหมด Agent
ลองเลย
ใช้ Openapi Sync MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า VS Code บอกว่ากำลังใช้ Openapi Sync MCP หรือมีชื่อเครื่องมือของ Openapi Sync MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม
ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON
ติดตั้งในเครื่อง
Claude Code
claude mcp add openapi-sync -- npx -y openapi-sync-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"openapi-sync": {
"command": "npx",
"args": [
"-y",
"openapi-sync-mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"openapi-sync": {
"command": "npx",
"args": [
"-y",
"openapi-sync-mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"openapi-sync": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"openapi-sync-mcp"
]
}
}
}ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
สรุป
- ดาวน์โหลดต่อสัปดาห์i
- 61/สัปดาห์
- การเชื่อมต่อ
- รันบนเครื่อง
- ช่องทาง (transport)
- stdio
- รุ่นล่าสุดi
- 6.4.2
- ส่งเข้า registryi
- 18 ก.ย. 2569
- แก้โค้ดล่าสุดi
- 21 ต.ค. 2569
- ผู้ทำ
- akintomiwa-fisayo
- แพ็กเกจ
npm: openapi-sync-mcp- สถานะใน registry
- ใช้งานอยู่
ใช้กับโปรแกรมไหนได้
ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569
ติดตั้งบนเครื่องได้ใน
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
คู่มือที่เกี่ยวข้อง
ทำอะไรได้บ้าง
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
ผลตรวจเบื้องต้นi
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 11 พ.ย. 2569
- ✓ ผ่าน
ตัวตนผู้ทำตรงกับ repo
ชื่อใน registry ยืนยันด้วยบัญชี GitHub akintomiwa-fisayo ซึ่งเป็นเจ้าของ repo
- ✓ ผ่าน
ยังมีคนดูแล
มีการแก้โค้ดล่าสุด 21 วันที่ผ่านมา
- … ยังไม่ตรวจ
มีสัญญาอนุญาต (license)
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
- – ไม่เกี่ยว
endpoint ตอบ
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
- – ไม่เกี่ยว
ล็อกอินแบบ OAuth
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
- … ยังไม่ตรวจ
คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
พูดคุย
ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์
ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย
ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx
รีวิวจากผู้ใช้
ยังไม่มีรีวิว
เทียบกับตัวอื่นในหมวด เครื่องมือนักพัฒนาi
- ดาวมากกว่า 69% ของอีก 5751 ตัวในหมวดนี้
- ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 40% ของอีก 5751 ตัวในหมวดนี้
- ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 5751 ตัวในหมวดนี้
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
คำถามที่พบบ่อย
Openapi Sync MCP ปลอดภัยไหม?
จากการตรวจเบื้องต้นของเรา ผ่าน 2 จาก 2 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใช้กุญแจหรือรหัสอะไรบ้าง?
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
ตัวนี้รันบนเครื่องหรือบนคลาวด์?
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
ยังมีคนดูแลอยู่ไหม?
repo บน GitHub มีการแก้โค้ดล่าสุด 21 วันที่ผ่านมา และส่งรุ่นล่าสุด (6.4.2) เข้า registry 2 เดือนที่ผ่านมา
ใช้กับโปรแกรมไหนได้บ้าง?
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
มีตัวไหนใช้แทนได้บ้าง?
ในหมวดเดียวกันมี REA, Netdata, Front-End Checklist
ตัวที่ใช้แทนได้
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
README จากผู้ทำ
เปิดอ่าน README
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
OpenAPI Sync
OpenAPI Sync is a powerful developer tool that automates the synchronization of your API documentation with your codebase using OpenAPI (formerly Swagger) specifications. It generates TypeScript types, fully-typed API clients (Fetch, Next.js Fetch, Axios, React Query, SWR, RTK Query), endpoint definitions, runtime validation schemas (Zod, Yup, Joi), and comprehensive documentation from your OpenAPI schema—ensuring type safety from API specification through client implementation to runtime validation.
📘 [Full documentation available at openapi-sync.com](https://openapi-sync.com)
Core Features
- ⚡ Zero-Config Presets - 10 pre-configured framework presets (React Query, SWR, Axios, Fetch, RTK Query, Next.js, Python) for instant setup
- 🔄 Real-time API Synchronization - Automatically syncs OpenAPI specs from remote URLs with configurable intervals
- 📝 Automatic Type Generation - Generates TypeScript interfaces for all endpoints with full nested support
- 🔐 Runtime Validation - Generate Zod, Yup, or Joi schemas from OpenAPI specs with all constraints preserved
- 🎯 Interactive Setup Wizard - Streamlined configuration with auto-enabled tag-based folder splitting
- 🛡️ Enterprise Ready - Error handling, validation, state persistence, and custom code preservation
- 📦 Folder Splitting - Organize code by tags or custom logic with aggregator files for easy imports
- 📚 Rich Documentation - JSDoc comments with cURL examples and inline usage guides
- 🤖 Agent-Ready Endpoints - Browse endpoints with pagination and path filtering, inspect deep endpoint details, and read generated types without reloading the spec
- 🩺 Diagnostic Doctor - Diagnostic health checks for config validity, spec accessibility, peer dependencies, cache, and folder write permissions
- 🧹 Stale File Purge - Manifest-based stale code detection and cleanup with dry-run support to prevent orphaned code
- 🔄 Custom Code Injection - Preserve your custom code between regenerations with protected sections
Installation
npm install openapi-sync
or
npm install -g openapi-sync
or use directly
npx openapi-sync
⚠️ macOS Big Sur Users: If you encounter an esbuild error (
Symbol not found: _SecTrustCopyCertificateChain), installesbuild@0.17.19first. See Troubleshooting for details.
🤖 Using with AI Agents
All CLI commands and programmatic APIs are agent-safe — no interactive prompts, fully non-blocking. Use --json for machine-readable output and --silent to suppress logs.
Full agent reference:
llms.txt— a structured discovery file for LLMs, Copilots, and MCP tools.
Agent Quick-Start (no prompts)
# 1. Create config (all settings as flags — no stdin required)
npx openapi-sync init --no-interactive \ --api-name petstore \ --api-url https://petstore3.swagger.io/api/v3/openapi.json \ --output-folder ./src/api \ --client-type react-query \ --validation-library zod \ --config-format typescript \ --json
Or for protected specs, configure auth directly on init:
npx openapi-sync init --no-interactive \ --api-name backend \ --api-url https://api.example.com/openapi.json \ --auth-type bearer \ --auth-token '${env.SPEC_TOKEN}' \ --preset react-query-zod \ --json
2. Validate config + specs before writing any files
npx openapi-sync validate --json
3. Sync — generate types, endpoints, and schemas
npx openapi-sync --json
4. Generate a typed API client
npx openapi-sync generate-client --type react-query --json
Machine-Readable Output (--json)
Every command emits a single, pure JSON object to stdout when --json is passed, making it safe to pipe directly into jq or consume from automated agents. All human-readable progress logs are suppressed or directed to stderr.
$ npx openapi-sync --json
{ "success": true, "apis": ["petstore"], "filesWritten": ["src/api/petstore/types.ts", "src/api/petstore/endpoints.ts"], "endpointCount": 20, "warnings": [], "errors": [], "phases": { "sync": { "filesWritten": ["src/api/petstore/types.ts", "src/api/petstore/endpoints.ts"], "endpointCount": 20 }, "client": { "filesWritten": [], "endpointCount": 20 } } }
$ npx openapi-sync validate --json
{ "valid": true, "apis": { "petstore": { "valid": true, "endpointCount": 20 } }, "configErrors": [] }
$ npx openapi-sync list-endpoints --json
{ "petstore": [ { "name": "getPetById", "method": "GET", "path": "/pet/{petId}", "tags": ["pet"], "summary": "Find pet by ID" }, { "name": "addPet", "method": "POST", "path": "/pet", "tags": ["pet"], "summary": "Add a new pet" } ] }
$ npx openapi-sync list-endpoints --api petstore --path-contains pet --limit 2 --offset 0 --json
$ npx openapi-sync get-endpoint --api petstore --operation-id getPetById --json
$ npx openapi-sync read-type --api petstore --type-name Pet --json
Dry Run (preview without writing files)
Compact, fast previews of planned files:
npx openapi-sync --dry-run --json
npx openapi-sync generate-client --type fetch --dry-run --json
Layouts & Output Directories
- Flat Mode (Default): When
folderSplitis omitted or empty ({}), files are placed directly in the API folder (endpoints.ts,types/index.ts,types/shared.ts). - Tag-Split Mode: Setting
folderSplit: { byTags: true }organizes endpoints into tag subfolders (e.g.{tag}/endpoints.ts,{tag}/types.ts,shared.ts). - Custom Client Directory:
clientGeneration.outputDir(or CLI--output) is fully supported in both flat and folder-split layouts. In flat mode, clients are placed directly in{outputDir}/clients.ts(orapi.ts), while in folder-split mode clients are placed in{outputDir}/{tag}/client.tsand aggregated at{outputDir}/clients.ts, with relative imports resolving back to your generated types and endpoints.
Programmatic API (TypeScript)
import {
ValidateConfig, Init, GenerateClient, ListEndpoints, GetEndpointDetails, ReadGeneratedType, Doctor, Purge, } from "openapi-sync";
// Pre-flight check — no files written const validation = await ValidateConfig({ silent: true }); if (!validation.valid) throw new Error(JSON.stringify(validation));
// Diagnostic health check on config, specs, peer dependencies, and directories const health = await Doctor({ silent: true }); console.log("Health check:", health.healthy ? "All checks passed" : "Issues detected");
// Inspect API surface with pagination and filtering const endpoints = await ListEndpoints({ apiName: "petstore", pathContains: "pet", limit: 5, offset: 0, silent: true, }); console.log(endpoints.petstore.length, "endpoints found");
// Inspect a single endpoint in full detail (4-tier fuzzy matching) const detail = await GetEndpointDetails({ apiName: "petstore", operationId: "getPetById", silent: true }); console.log(detail.endpoint.path);
// Read an exact generated type declaration (with optional line pagination) const typeDecl = await ReadGeneratedType({ apiName: "petstore", typeName: "Pet", silent: true }); console.log(typeDecl);
// Sync and get structured result const syncResult = await Init({ silent: true }); if (!syncResult.success) throw new Error(JSON.stringify(syncResult)); console.log("Files written:", syncResult.filesWritten);
// Generate client const clientResult = await GenerateClient({ type: "react-query", silent: true }); console.log(JSON.stringify(clientResult));
// Detect and purge stale files from disk const purgeResult = await Purge({ yes: true, silent: true }); console.log("Purged files:", purgeResult.purged);
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Config error or validation failed |
2 | Network / spec fetch error |
3 | Generation / file write error |
Agent-safe vs Interactive Commands
| Command | Agent-safe? | Description |
|---|---|---|
npx openapi-sync | ✅ | Sync specs, generate types, endpoints, schemas |
npx openapi-sync validate | ✅ | Validate config + specs; no files written |
npx openapi-sync doctor | ✅ | Diagnostic health check on config, network, peer deps, cache |
npx openapi-sync list-endpoints | ✅ | List endpoints with filtering and pagination; no files written |
npx openapi-sync get-endpoint | ✅ | Inspect detailed schema for one endpoint by operationId or name |
npx openapi-sync read-type | ✅ | Read generated TypeScript declaration block |
npx openapi-sync generate-client | ✅ | Generate typed API client (fetch, next-fetch, axios, react-query, swr, rtk-query) |
npx openapi-sync purge --yes | ✅ | Remove stale generated files without prompting |
npx openapi-sync init --no-interactive | ✅ | Create config file without prompts |
npx openapi-sync init (no flag) | ❌ | Interactive wizard (requires stdin) |
Quick Start
Option 1: Interactive Setup (Recommended) 🎯
The easiest way to get started is with the interactive setup wizard:
npx openapi-sync init
The wizard will guide you through:
- 📝 Configuration file format selection (TypeScript, JSON, or JavaScript)
- 🌐 API specification source (URL or local file)
- 📁 Folder organization options (split by tags or custom logic)
- 🚀 Client generation options (React Query, SWR, Fetch, Axios, RTK Query)
- ✅ Validation library setup (Zod, Yup, Joi)
- 🔧 Custom code preservation settings
- 🏷️ Type naming preferences (operationId usage, prefix)
- 🚫 Endpoint filtering (exclude by tags)
- 📚 Documentation options (cURL examples)
Option 2: Manual Setup
1. Create `openapi.sync.json` in your project root:
{
"refetchInterval": 5000, "folder": "./src/api", "api": { "petstore": "https://petstore3.swagger.io/api/v3/openapi.json" } }
2. Run the sync command:
npx openapi-sync
3. Use generated types and endpoints:
import { getPetById } from "./src/api/petstore/endpoints";
import { IPet } from "./src/api/petstore/types";
const petUrl = getPetById("123"); // Returns: "/pet/123"
View detailed quick start guide →
⚡ Presets (Zero-Config Framework Setup)
Presets bundle opinionated defaults for your framework, client library, and validation stack into a single name. Instead of configuring dozens of settings by hand, pick a preset during npx openapi-sync init or set "preset": " " in your config file. Any explicit configuration values you define always override preset defaults.
| Preset Name | Target Framework / HTTP Client | Validation Library | Features Configured | Recommended Dependencies |
|---|---|---|---|---|
react-query-zod *(Default/Recommended)* | TanStack React Query v5 | Zod | Typed Query & Mutation hooks, Zod schemas, preserved custom code, operationId naming | npm i @tanstack/react-query axios zod |
react-query-yup | TanStack React Query v5 | Yup | Typed Query & Mutation hooks, Yup validation schemas, preserved custom code | npm i @tanstack/react-query axios yup |
swr-zod | Vercel SWR | Zod | SWR hooks with mutation support (useSWRMutation), Zod schemas, preserved custom code | npm i swr axios zod |
swr-yup | Vercel SWR | Yup | SWR hooks with mutation support, Yup schemas, preserved custom code | npm i swr axios yup |
| axios-zod | Axios Client | Z