The OAS-MCP project includes a React-based web interface that provides a user-friendly way to configure OpenAPI specifications as MCP servers. The frontend eliminates the need for manual JSON configuration and credential management.
The frontend UI is a single-page application built with React and Vite that allows you to:
npx oas-mcp serve --port 8080 --cred-store file
cd frontend
npm install
npm run dev
http://localhost:5173To build the frontend for production deployment:
cd frontend
npm run build
The built files will be in frontend/dist/ and can be served by any static web server.
The interface supports multiple ways to provide your OpenAPI specification:
.json, .yaml, or .yml files@apidevtools/swagger-parser for validation and dereferencingConfigure your MCP server settings through an intuitive form:
| Setting | Description | Default |
|---|---|---|
| Base URL | API base URL (auto-detected from spec) | https://api.example.com |
| Schema URL | OpenAPI spec URL | Auto-generated suggestion |
| Server Name | MCP server identifier | openapi |
| SSE Server URL | OAS-MCP server endpoint | http://127.0.0.1:8080 |
Secure credential management with support for multiple authentication types:
/credentials endpointThe interface automatically generates MCP server configuration that you can:
mcp.json configurationExample generated configuration:
{
"myapi": {
"url": "http://127.0.0.1:8080/sse?s=https%3A%2F%2Fapi.example.com%2Fopenapi.json&u=https%3A%2F%2Fapi.example.com&n=myapi"
}
}
Keep track of configured MCP servers:
For production use:
frontend/
├── src/
│ ├── modules/
│ │ ├── App.tsx # Main application component
│ │ ├── ConfigForm.tsx # Server configuration form
│ │ ├── GeneratedConfig.tsx # Output configuration display
│ │ └── SpecUploader.tsx # OpenAPI spec input component
│ ├── util/
│ │ ├── buildConfig.ts # Configuration generation logic
│ │ └── parseSpec.ts # OpenAPI spec parsing
│ ├── types.ts # TypeScript type definitions
│ └── main.tsx # Application entry point
├── package.json
├── vite.config.ts
└── README.md
Modern browsers with ES2020+ support required.
The frontend integrates with the OAS-MCP server’s credential store system:
When using --cred-store file, credentials are saved to:
.oas_mcps/creds.json
⚠️ Important: Add this directory to your .gitignore:
# OAS-MCP credential storage
.oas_mcps/
When using --cred-store memory, credentials are lost when the server restarts.
The frontend communicates with these OAS-MCP server endpoints:
| Endpoint | Method | Purpose |
|---|---|---|
/credentials |
POST | Store authentication credentials |
/import-env-credentials |
POST | Import credentials from environment variables |
/sse |
GET | Establish MCP server connection |
Spec validation fails:
$ref references can be resolvedCredential save fails:
Generated config doesn’t work:
Start the OAS-MCP server with --debug for detailed logging:
npx oas-mcp serve --debug --cred-store file
After generating your MCP server configuration:
mcp.json fileFor more details on credential management, see Adding Credentials.