GitHub Stars
0
User Rating
Not Rated
Forks
0
Issues
0
Views
1
Favorites
0
OpenAI MCP Adapter
A powerful Electron-based desktop application that aggregates Model Context Protocol (MCP) servers and exposes them as OpenAI Custom Actions. This cross-platform application (Windows, Mac, Linux) provides a unified interface for managing multiple MCP servers and makes their tools accessible via a local REST API.
Features
š MCP Server Management
- Add, edit, and remove MCP servers with different transport types (SSE, STDIO, HTTP)
- Real-time server status monitoring
- Granular control over tool exposure
- Auto-start and auto-restart capabilities
š Unified REST API
- Automatic conversion of MCP tools to REST endpoints
- Local Fastify server with localhost-only access
- OpenAPI schema generation for ChatGPT custom actions
- Comprehensive request/response validation
š Ngrok Integration
- Secure tunneling with custom domain support
- Automatic retry with exponential backoff
- Real-time connection status monitoring
- API key management
š ļø Tool Management
- Enable/disable individual tools
- Detailed tool information and capabilities
- Tool-level configuration options
- Real-time tool status updates
š Monitoring & Logging
- Comprehensive logging system
- Real-time status updates
- Error tracking and reporting
- Performance metrics
Installation
Clone the repository:
git clone https://github.com/yourusername/open-ai-mcp-adapter.git cd open-ai-mcp-adapter
Install dependencies:
npm install
Build the application:
npm run build
Start the application:
npm start
Development
Prerequisites
- Node.js 18+
- npm 8+
- Electron development environment
Development Scripts
npm run dev
- Start the application in development mode with hot reloadnpm run build
- Build the applicationnpm run watch
- Watch for changes and rebuildnpm run lint
- Run ESLintnpm run test
- Run Jest testsnpm run clean
- Clean build artifacts
Project Structure
āāā src/ # React frontend code
ā āāā components/ # UI components
ā āāā services/ # Frontend services
ā āāā types/ # TypeScript type definitions
ā āāā utils/ # Utility functions
āāā electron/ # Electron main process code
ā āāā mcp/ # MCP client implementations
ā āāā local-server/ # Fastify server implementation
ā āāā services/ # Backend services
ā āāā utils/ # Backend utilities
āāā package.json # Project configuration
Architecture
The application follows a modular architecture with clear separation of concerns:
Frontend Layer (src/)
- React-based UI components
- Material-UI for styling
- Event-based state management
- Real-time updates
Backend Layer (electron/)
- MCP server management
- Local REST API server
- Ngrok integration
- Configuration persistence
Communication Layer
- IPC for frontend-backend communication
- Event system for real-time updates
- Type-safe message passing
Configuration
The application supports various configuration options:
MCP Server Configuration
- Server name and endpoint
- Transport type (SSE, STDIO, HTTP)
- Authentication settings
- Auto-start options
Ngrok Configuration
- API key
- Custom domain
- Tunnel options
- Retry settings
Local Server Configuration
- Port settings
- CORS configuration
- Rate limiting
- Security options
Security
- š Localhost-only API access
- š Secure configuration storage
- š”ļø Input validation and sanitization
- š API key management
- š« Context isolation in Electron
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
58
Followers
100
Repositories
29
Gists
3
Total Contributions