# Swagger MCP - TODO List
## Current Tasks
- π¨ Create a web UI for testing generated tool definitions
- π¨ Add support for generating complete MCP servers from Swagger definitions
- π¨ Implement proxy behavior in generated MCP servers to forward requests to the original REST API
- π¨ Integrate Zod for runtime input validation in generated handlers
- π¨ Generate a complete Node.js project scaffold (tsconfig.json, package.json, entry point, .env.example, etc.) for each generated server (or add instructions to a prompt / cursor file)
- π¨ Implement auto-detection of base URL from OpenAPI spec if not explicitly provided
- π¨ Support configuration of all authentication types via environment variables
- π¨ Ensure all generated code is fully typed with TypeScript
- π¨ Improve error handling in generated tool handlers
- π¨ **[In Progress]** Implement SSE transport mode (requires HTTP server setup)
- π¨ **[In Progress]** Implement HTTP (StreamableHTTP) transport mode
- π¨ **[In Progress]** Implement actual file download/upload logic in generated handlers
## Completed Tasks
### 01/24/2026
- β
**Phase 1 (P0)**: Implement `getFormatSuffix` function with format suffix detection (AsPdf, AsCsv, AsExcel, AsHtml, AsXml, AsText)
- β
**Phase 1 (P0)**: Add string case utilities (camelCase, pascalCase, formatMethodName)
- β
**Phase 1 (P0)**: Update `generateToolName` to accept endpoint parameter and append format suffixes
- β
**Phase 2 (P1)**: Create `SecuritySchemeParser` with security scheme parsing functionality
- β
**Phase 2 (P1)**: Integrate authentication parameter generation in `generateInputSchema`
- β
**Phase 2 (P1)**: Add support for API key, Bearer token, and Basic authentication
- β
**Phase 3 (P1)**: Create `TransportFactory` for transport mode management
- β
**Phase 3 (P1)**: Update `index.ts` to use transport configuration from environment variables
- β
**Phase 3 (P1)**: Add transport configuration variables to `.env.example`
- β
**Phase 4 (P1)**: Add file endpoint detection utilities (isFileEndpoint, hasContentType, getFileResponseFormat)
- β
**Phase 4 (P1)**: Update `generateHandlerFunction` to handle file endpoints with appropriate response types
- β
Fix test runner hardcoded paths in `run-all-tests.ts`
### 03/09/2025
- β
Add MCP prompt for guiding AI assistants through adding new endpoints
- β
Add MCP prompts for guiding AI assistants through common workflows
- β
Fix model code test failure - "Model 'Project' not found in Swagger definition"
- β
Fix error handling test for invalid HTTP method - updated error message and used valid endpoint path
- β
Remove improved-generate-endpoint-tool-code.ts and update tests to use the real generator
- β
Fix endpoint path issues in projects-api-v3.oas2.yml for authentication and file operations tests:
- β
Fix OpenAPI version compatibility tests - updated to check for 'inputSchema' instead of 'parameters'
- β
Fix schema validation tests - updated endpoints to use ones that exist in the Swagger definition
- β
Fix schema validation failures - updated to check for 'inputSchema' instead of 'parameters'
- β
Create examples for different Swagger API types (OpenAPI 2.0, 3.0, etc.)
- β
Add unit tests for the improved generator
- β
Add validation for complex endpoint structures like Create Task
- β
Implement validation for generated tool definitions against MCP schema
- β
Fix the generateEndpointToolCode method to properly handle json.Unmarshaler interfaces in OpenAPI definitions
### 03/08/2025
- β
Implement improved MCP tool code generator with full schema information
- β
Add support for YAML Swagger files
- β
Improve parameter naming to avoid problematic characters
- β
Generate more semantic tool names
- β
Include comprehensive documentation in generated tool definitions
- β
Make generated code self-contained without external dependencies
- β
Update README.md with documentation for the improved generator
- β
Add AI-specific instructions in tool descriptions