The MCP server configuration has been successfully simplified from a three-key to a two-key authentication system:
WILDEDITOR_API_KEY=backend-api-key # For backend API access
WILDEDITOR_MCP_KEY=mcp-operations-key # For AI agents
WILDEDITOR_MCP_BACKEND_KEY=mcp-backend-key # For MCP-to-backend (redundant!)WILDEDITOR_API_KEY=backend-api-key # Shared: Backend + MCP-to-backend
WILDEDITOR_MCP_KEY=mcp-operations-key # For AI agents only- config.py: Removed
mcp_backend_keysetting - tools.py: All backend calls now use
settings.api_key - resources.py: All backend calls now use
settings.api_key - Test files: Updated to use simplified environment variables
- Documentation: Updated to reflect two-key system
- .env.example: Removed
WILDEDITOR_MCP_BACKEND_KEY - .env.development: Cleaned up to two keys only
- GitHub workflow: Uses existing
WILDEDITOR_API_KEYfor backend communication
- Simpler Management: One less key to generate, store, and rotate
- Better Security: Shared key reduces key sprawl
- Easier Deployment: Fewer secrets to configure in GitHub/production
- Logical Architecture: MCP server is part of your infrastructure, should share backend key
You now only need to add ONE new secret:
WILDEDITOR_MCP_KEY- For AI agents to access MCP server
Existing secrets used:
WILDEDITOR_API_KEY- Shared by backend and MCP serverPRODUCTION_HOST,PRODUCTION_USER,PRODUCTION_SSH_KEY- Server accessMYSQL_DATABASE_URL- Database connection
Run this to generate the single new key:
.\generate-mcp-keys.ps1tests/test_phase2.py::TestMCPPhase2::test_mcp_status_enhanced PASSED
tests/test_phase2.py::TestMCPPhase2::test_list_tools PASSED
tests/test_phase2.py::TestMCPPhase2::test_list_resources PASSED
tests/test_phase2.py::TestMCPPhase2::test_list_prompts PASSED
tests/test_phase2.py::TestMCPPhase2::test_read_resource PASSED
tests/test_phase2.py::TestMCPPhase2::test_call_tool_mock_backend PASSED
tests/test_phase2.py::TestMCPPhase2::test_get_prompt PASSED
INFO: Starting Wildeditor MCP Server on port 8001
INFO: Environment: development
INFO: Backend URL: http://localhost:8000/api
INFO: Application startup complete.
The MCP server is now production-ready with a simplified, more maintainable configuration:
- ✅ Fewer secrets to manage
- ✅ Logical key sharing between backend and MCP
- ✅ All functionality tested and working
- ✅ GitHub Actions workflow updated
- ✅ Documentation updated
You can now deploy with confidence using the streamlined two-key system! 🚀