Check and install OpenAPI Sync MCP server dependency
Ensures the OpenAPI Sync MCP server is installed before running OAS commands.
When this skill is invoked, Claude MUST perform these steps:
Test if MCP tools are available:
Try to access the oas_parse MCP tool with a minimal request:
Quick check method:
Call: mcp__oas__oas_status with { "project_dir": "." }
Display installation prompt:
+----------------------------------------------------------+
| OpenAPI Sync MCP Required |
+----------------------------------------------------------+
The OAS plugin requires the OpenAPI Sync MCP server.
Installation options:
1. npm (Recommended)
npm install -g @jhlee0409/openapi-sync-mcp
2. Manual
Download from: https://github.com/jhlee0409/openapi-sync-mcp/releases
Would you like me to install it now via npm? [Y/n]
If user confirms installation:
npm install -g @jhlee0409/openapi-sync-mcp
Post-install configuration:
After npm install, the MCP server needs to be added to Claude's config.
MCP server installed!
To complete setup, add to your Claude config:
~/.claude.json (or project .mcp.json):
{
"mcpServers": {
"oas": {
"command": "openapi-sync-mcp",
"args": []
}
}
}
Then restart Claude Code.
After installation, verify:
Call: mcp__oas__oas_status with { "project_dir": "." }
MCP verification failed. Troubleshooting:
1. Check binary is in PATH:
which openapi-sync-mcp
2. Check Claude config:
cat ~/.claude.json | grep -A5 "oas"
3. Restart Claude Code after config change
4. Manual test:
openapi-sync-mcp --help
Still having issues?
https://github.com/jhlee0409/openapi-sync-mcp/issues
Each /oas:* command MUST invoke this skill at the start:
## EXECUTION INSTRUCTIONS
When this command is invoked:
### Step 0: MCP Dependency Check
**Invoke skill: mcp-dependency**
- If MCP not available, skill will handle installation
- Only proceed to Step 1 after MCP is confirmed available
### Step 1: ... (original first step)
Skip MCP check if:
OAS_SKIP_MCP_CHECK=1 is set| Scenario | Message |
|---|---|
| MCP not installed | "OpenAPI Sync MCP server is not installed." |
| Install failed | "Failed to install MCP server: {error}" |
| Config missing | "MCP installed but not configured in Claude." |
| Binary not found | "MCP binary not found in PATH." |
On success:
MCP server verified (ready)
On installation:
MCP server installed and configured (ready)
On failure:
MCP server unavailable
Please install manually: npm install -g @jhlee0409/openapi-sync-mcp