- Fixed PostgreSQL case sensitivity issue in ORDER BY clause
- Added explicit null profile_uuid exclusion in search queries
- Fixed model filter logic placement
- Documents created via MCP inspector are now properly retrievable
Successfully refactored the massive mcp-proxy.ts file into a clean modular structure:
src/
├── mcp-proxy.ts # Main class (486 lines, down from 2,576)
├── tools/
│ └── static-tools.ts # Tool definitions (428 lines)
├── schemas/
│ └── index.ts # Validation schemas (112 lines)
├── handlers/
│ ├── static-handlers.ts # Static handlers (922 lines)
│ └── dynamic-handlers.ts # Dynamic handlers (159 lines)
└── utils/
└── prompts.ts # Prompt utilities (227 lines)
- New
pluggedin_setuptool provides help without API key - Topics: getting_started, api_key, configuration, troubleshooting
- Users can learn how to set up Plugged.in before having an API key
- All tools that require API key now indicate this in their descriptions
- Example: "Create and save AI-generated documents (requires API key)"
- Instead of throwing errors, tools now return helpful setup instructions
- Guides users to get API key from https://plugged.in/settings/api-keys
- Provides clear environment variable setup instructions
- Docker build configuration works with new file structure
- Multi-stage build correctly compiles TypeScript from all subdirectories
- No changes needed to Dockerfile or .dockerignore
- All compilation errors resolved
- Proper type handling for dynamic sessions
- Fixed import paths and dependencies
- Build now completes successfully
- Better Maintainability: Code is now organized by concern
- Improved User Experience: Clear guidance for users without API keys
- Easier Testing: Modular structure allows focused unit tests
- Cleaner Architecture: Separation of static vs dynamic handlers
- Docker Ready: Works seamlessly in containerized environments
- Test the setup tool:
pluggedin_setup - Verify all tools show helpful messages without API key
- Confirm document search/retrieval works correctly
- Test Docker build and deployment
- Verify all existing functionality remains intact
The refactoring maintains 100% backward compatibility while significantly improving code organization and user experience.