oastools provides a Claude Code plugin that gives Claude direct access to all OpenAPI tooling through the built-in MCP server. Once installed, Claude can validate, fix, convert, diff, walk, and generate code from your OpenAPI specs without any manual setup.
The plugin runs oastools mcp under the hood, so the oastools binary must be installed and available on your PATH before the plugin will work.
Install via any of these methods:
Homebrew (macOS/Linux):
brew install erraggy/oastools/oastoolsGo install:
# Requires Go 1.25+
go install github.com/erraggy/oastools/cmd/oastools@latestBinary download:
Download a pre-built binary from the Releases page and place it on your PATH.
Verify the binary is available:
oastools --versionThis is the easiest method. Run these commands inside Claude Code (the /plugin commands are Claude Code slash commands, not shell commands):
/plugin marketplace add erraggy/oastools
/plugin install oastools
The first command registers the oastools marketplace. The second installs the plugin. You'll be prompted to choose an installation scope:
| Scope | Effect |
|---|---|
| User | Available in all your projects |
| Project | Shared with collaborators (saved to .claude/settings.json) |
| Local | Only for you, only in this repository |
If you prefer not to use the plugin system, you can configure the MCP server directly. Add this to your project's .mcp.json (or create the file if it doesn't exist):
{
"mcpServers": {
"oastools": {
"type": "stdio",
"command": "oastools",
"args": ["mcp"]
}
}
}!!! note The manual approach gives you the 17 MCP tools but not the guided skills or CLAUDE.md instructions that come with the plugin. For the full experience, use Option 1.
After installing, restart Claude Code (or start a new session) and check that the tools are available:
/mcp
You should see oastools listed as an MCP server with 17 tools. You can also ask Claude directly:
"What oastools MCP tools do you have access to?"
The plugin configures the oastools MCP server, which exposes 17 tools that Claude can call directly:
Core (9): validate, parse, fix, convert, diff, join, overlay_apply, overlay_validate, generate
Walk (8): walk_operations, walk_schemas, walk_parameters, walk_responses, walk_headers, walk_security, walk_paths, walk_refs
See the MCP Server reference for detailed documentation of each tool.
The plugin includes skills that teach Claude best-practice workflows for common tasks:
| Skill | What it does |
|---|---|
| validate-spec | Validate a spec, explain errors in plain language, suggest or apply fixes |
| fix-spec | Preview fixes with dry run, apply with confirmation, re-validate |
| explore-api | Parse for an overview, walk endpoints and schemas, drill into specifics |
| diff-specs | Compare two versions, categorize by severity, suggest migration steps |
| generate-code | Parse the spec, generate Go code, review output, suggest integration |
The plugin includes a CLAUDE.md that teaches Claude:
- The input model (file vs URL vs inline content)
- When to prefer
fileovercontent - Common workflows (validate-then-fix, explore-then-modify)
- Best practices (filter walk results, use dry-run for fix, check breaking changes)
Once the plugin is installed, you can ask Claude to work with your OpenAPI specs naturally:
Validate a spec:
"Validate my openapi.yaml and explain any errors"
Claude will call the validate tool, interpret the results, and explain each error with suggested fixes.
Explore an API:
"What endpoints does this API have? Show me the user-related ones."
Claude will parse for an overview, then walk_operations with a tag or path filter.
Compare API versions:
"Compare api-v1.yaml and api-v2.yaml — are there any breaking changes?"
Claude will call diff with both specs and categorize changes by severity.
Fix common issues:
"Fix the duplicate operationIds in my spec"
Claude will preview with dry_run, show you the planned fixes, then apply them.
Generate a Go client:
"Generate a Go HTTP client from openapi.yaml into ./client"
Claude will call generate with client: true and report the generated files.
If you installed via the marketplace, Claude Code will check for updates automatically. You can also update manually:
/plugin update oastools
/plugin uninstall oastools
plugin/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest (name, version, author)
├── .mcp.json # MCP server configuration
├── CLAUDE.md # Instructions for Claude (tools, best practices)
├── hooks/
│ ├── hooks.json # SessionStart hook configuration
│ └── scripts/
│ └── check-binary.sh # Verify oastools binary is on PATH
└── skills/
├── validate-spec/
│ └── SKILL.md # Guided validation workflow
├── fix-spec/
│ └── SKILL.md # Guided fix workflow
├── explore-api/
│ └── SKILL.md # Guided exploration workflow
├── diff-specs/
│ └── SKILL.md # Guided diff workflow
└── generate-code/
└── SKILL.md # Guided code generation workflow
"oastools: command not found"
The MCP server requires the oastools binary on your PATH. See Prerequisites above for installation options. After installing, you may need to restart your terminal or Claude Code session.
Tools aren't appearing in Claude Code
- Verify the plugin is installed:
/plugin list - Check that
oastools mcpruns without errors:echo '{}' | oastools mcp - Restart Claude Code to pick up configuration changes
"spec input is required" errors
Every tool requires a spec input. Make sure you're providing exactly one of file, url, or content inside the spec object:
{"spec": {"file": "openapi.yaml"}}