v2.2.2 - CORS Support for Web Clients
🌐 MCP Firebird v2.2.2 - CORS Support Release
🚀 Critical Enhancement: Web Client Support
This release adds CORS (Cross-Origin Resource Sharing) support to enable web-based MCP clients to connect to the Firebird server without browser security restrictions.
✅ What's New
🌐 CORS Configuration Added:
- Fixed:
Access-Control-Allow-Originheader missing error - Added: Complete CORS middleware to backwards compatible server
- Configured: Proper headers for web client access from any origin
- Supports: Web clients from
localhost:3000and other domains
🔧 CORS Headers Configured:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS
Access-Control-Allow-Headers: Content-Type, mcp-session-id, Cache-Control, Accept
Access-Control-Allow-Credentials: false
🎯 Problem Solved:
Before v2.2.2:
Access to resource at 'http://localhost:3011/sse' from origin 'http://localhost:3000'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present
After v2.2.2:
✅ Web clients can connect from any origin
✅ No more CORS policy blocking errors
✅ SSE connections work from browser applications
✅ OPTIONS preflight requests handled correctly
🔧 Technical Implementation
Server Enhancement:
- Added
corsmiddleware tostartBackwardsCompatibleServerfunction - Maintains full backwards compatibility with existing clients
- Applied to all SSE and HTTP endpoints
- Zero impact on STDIO transport
Supported Scenarios:
- ✅ Web Applications: Browser-based MCP clients
- ✅ Development Servers: localhost with different ports
- ✅ Cross-Domain Access: Any origin can connect
- ✅ Existing Clients: No changes required for current users
📊 Version Progression
| Version | CORS Support | Web Clients | Status |
|---|---|---|---|
| v2.2.1 | ❌ | ❌ Blocked | Previous |
| v2.2.2 | ✅ | ✅ Working | Current |
🚀 Usage Examples
Web Client Connection (Now Working):
// Browser JavaScript - now works without CORS errors
const eventSource = new EventSource('http://localhost:3003/sse');
eventSource.onmessage = function(event) {
console.log('Received:', event.data);
};NPX Commands (Unchanged):
# STDIO Mode (Claude Desktop)
npx mcp-firebird@latest --transport-type stdio \
--database "F:\\Proyectos\\SAI\\AUTOSERVICIO_LA_PAZ.FDB" \
--user SYSDBA --password masterkey
# SSE Mode (Web Clients + MCP Inspector)
npx mcp-firebird@latest --transport-type sse --sse-port 3003 \
--database "F:\\Proyectos\\SAI\\AUTOSERVICIO_LA_PAZ.FDB" \
--user SYSDBA --password masterkey🎯 Who Benefits
- Web Developers: Can now build browser-based MCP clients
- Frontend Applications: Direct SSE connections without proxy servers
- Development Teams: Cross-origin development setups work seamlessly
- Existing Users: Zero impact, all current functionality preserved
📈 Migration from v2.2.1
No changes required! Simply update:
# Update global installation
npm install -g mcp-firebird@latest
# Or use npx (always gets latest)
npx mcp-firebird@latest --version # Shows v2.2.2🔄 Backwards Compatibility
- ✅ STDIO Transport: Unchanged, works exactly as before
- ✅ SSE Transport: Enhanced with CORS, existing clients unaffected
- ✅ Configuration: Same parameters, same behavior
- ✅ Performance: No performance impact
🌟 Key Features Maintained
- 16 Database Tools: Complete Firebird operations
- 10 Smart Prompts: SQL analysis and optimization
- Dual Transport: STDIO + SSE protocols
- Windows Compatible: Proper file path handling
- Production Ready: Tested and stable
🚀 Next Steps
With CORS support now available, developers can:
- Build Web UIs: Create browser-based database management tools
- Integrate with Web Apps: Add MCP Firebird to existing web applications
- Develop Dashboards: Real-time database monitoring interfaces
- Create APIs: Web services that leverage MCP Firebird capabilities
🙏 Support the Project
If this CORS enhancement helps your web development:
📞 Need Help?
- 📖 Documentation: Check README and docs/ folder
- 🐛 Issues: Report problems on GitHub Issues
- 💬 Discussions: Join GitHub Discussions for questions
- 🎥 Examples: See
examples/sse-client.htmlfor web client demo
Full Changelog: v2.2.1...v2.2.2