-
Notifications
You must be signed in to change notification settings - Fork 29
feat(swagger): add automatic MCP tool generation from Swagger/OpenAPI… #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… specs - Add command to generate MCP tools from Swagger 2.0 and OpenAPI 3.0 specifications - Support both local files and remote URLs as input sources - Parse endpoints and generate tool classes with HTTP client implementation - Handle authentication (Bearer tokens, API keys) - Auto-register generated tools in configuration - Include comprehensive test fixtures for Swagger/OpenAPI formats - Document new command with usage examples in README This enables rapid integration of external APIs by automatically converting their Swagger/OpenAPI documentation into functional MCP tools. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This comment was marked as outdated.
This comment was marked as outdated.
…/OpenAPI specs" This reverts commit 4868901.
…1.4.0) Introduces powerful automatic tool generation from any Swagger/OpenAPI specification, dramatically reducing time needed to integrate external APIs. Major features: - SwaggerParser: Supports OpenAPI 3.x and Swagger 2.0 formats - SwaggerToMcpConverter: Converts API endpoints to MCP tool parameters - MakeSwaggerMcpToolCommand: Interactive CLI with endpoint selection - Smart naming: Detects hash-like operationIds and uses path-based naming - Authentication support: API Key, Bearer Token, OAuth2 generation - API testing: Validates connectivity before tool generation - Endpoint grouping: By tags, path prefixes, or individual selection - Comprehensive test coverage for naming conversion and parsing logic 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…erator Extends the Swagger/OpenAPI generator to support creating both MCP Tools and Resources: - Add resource generation mode with smart type selection (GET → Resource, others → Tool) - Implement programmatic stub system for dynamic class generation - Add comprehensive resource generation tests - Update documentation to reflect dual generation capability - Enhance command UI with type selection workflow Allows users to generate read-only Resources for data endpoints alongside action-oriented Tools. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Claude finished @kargnas's task —— View job Code Review Complete ✅I've thoroughly reviewed the PR that adds automatic MCP tool and resource generation from Swagger/OpenAPI specifications. This is a significant and well-implemented feature that dramatically simplifies API integration. Here's my comprehensive analysis: Todo List
🔍 Overall AssessmentThis is an excellent feature implementation that adds substantial value to the Laravel MCP Server package. The automatic generation of MCP tools and resources from Swagger/OpenAPI specs will save developers significant time when integrating external APIs. Key Strengths:
🚀 New Features ImplementedPrimary Command:
|
Claude finished @kargnas's task —— View job Todo List
✅ Implementation CompleteI've successfully implemented all four improvements from my previous code review: Improvement #1: URL Validation Security
Improvement #2: Standardized Error Handling
Improvement #3: Configurable HTTP Timeouts
Improvement #4: Method Refactoring
Changes Summary
The implementation maintains full backward compatibility while significantly improving security, error handling, configurability, and code maintainability. |
- Add URL validation to prevent SSRF attacks in SwaggerParser - Standardize error handling to use JsonRpcErrorException - Make HTTP timeouts configurable instead of hardcoded - Refactor generateHttpRequest() method into smaller focused methods Co-authored-by: Sangrak Choi <kargnas@users.noreply.github.com>
… specs
This enables rapid integration of external APIs by automatically converting their Swagger/OpenAPI documentation into functional MCP tools.
🤖 Generated with Claude Code