-
Notifications
You must be signed in to change notification settings - Fork 99
refactor: MCP #3282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: MCP #3282
Conversation
jqnatividad
commented
Jan 5, 2026
- centralized env var config
- version management
- configurable, more reasonable timeouts
- resource limits
- unit tests
- centralized env var config - version management - configurable, more reasonable timeouts - resource limits - unit tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the MCP (Model Context Protocol) server implementation with a focus on centralized configuration, version management, resource limits, and comprehensive testing.
Key Changes:
- Introduced centralized environment variable configuration with validation and bounds checking
- Implemented version management that reads from package.json
- Added configurable timeouts and resource limits (max concurrent operations, max files per listing, max pipeline steps)
- Created comprehensive unit test suite covering configuration, version management, utilities, MCP tools, pipelines, and filesystem operations
Reviewed changes
Copilot reviewed 22 out of 40 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
.claude/skills/src/config.ts |
New centralized configuration module with environment variable parsing, validation, and sensible defaults |
.claude/skills/src/version.ts |
New version management module that loads version from package.json |
.claude/skills/src/mcp-tools.ts |
Refactored to use centralized config for binary path and timeouts; added concurrent operation limit enforcement |
.claude/skills/src/mcp-server.ts |
Updated to use VERSION constant and centralized config for all settings |
.claude/skills/src/mcp-pipeline.ts |
Added pipeline step limit enforcement using centralized config |
.claude/skills/src/mcp-filesystem.ts |
Added file listing limit enforcement; improved working directory handling |
.claude/skills/src/converted-file-manager.ts |
Updated to use centralized config for LIFO cache size |
.claude/skills/src/loader.ts |
Fixed path resolution for compiled code (dist/src to project root) |
.claude/skills/tests/*.test.ts |
New comprehensive test suite covering all major modules |
.claude/skills/tests/*.test.js |
Compiled JavaScript test files (build artifacts) |
.claude/skills/tests/*.test.d.ts |
TypeScript declaration files for tests |
.claude/skills/tests/*.test.*.map |
Source map files for compiled tests |
.claude/skills/package.json |
Updated test scripts to run unit tests; added test:watch and test:examples scripts |
.claude/skills/README-MCP.md |
Added comprehensive environment variables documentation table and resource limits explanation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 22 out of 40 changed files in this pull request and generated 6 comments.
| // Pass undefined explicitly to use working directory | ||
| const result = await provider.listFiles(undefined); |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TypeScript test passes 'undefined' explicitly to listFiles (line 29), while the compiled JavaScript version calls listFiles() with no arguments (line 23). This is an inconsistency between the TypeScript source and compiled output. While both should work with the current implementation, the discrepancy suggests a compilation or test authoring issue that could lead to different behavior.
| // Pass undefined explicitly to use working directory | |
| const result = await provider.listFiles(undefined); | |
| // Use default working directory by calling without a path | |
| const result = await provider.listFiles(); |