Bash Refactor TS Migration Evaluation
Summary
Gradual migration starting with forge-bash as proof of concept. The TypeScript MCP SDK is mature, dependencies bundle cleanly with esbuild, and Node.js APIs cover all needed functionality. No blocking issues found.
Current Python Servers Inventory
| Server | Lines | Dependencies | Complexity | Migration Effort |
|---|---|---|---|---|
| uvilo-trash | ~290 | mcp, pydantic | Medium | Low-Medium |
| typesense-mcp | ~160 | mcp, pydantic | Low | Low |
| suprsend-mcp-proxy | ~80 | mcp | Low | Low |
(uvilo-shell is being rewritten as forge-bash in this project.)
SDK Support
@modelcontextprotocol/server TypeScript SDK is mature. McpServer maps 1:1 to Python’s FastMCP. Zod replaces Pydantic for schema validation. Peer dependency: @cfworker/json-schema.
Per-Tool Migration Concerns
| Tool | Concern | Mitigation |
|---|---|---|
| uvilo-trash | File system operations (shutil.move, os.walk, os.path) | Node.js fs.promises has equivalent APIs |
| typesense-mcp | HTTP requests (urllib.request) | Native fetch (Node 18+) |
| suprsend-mcp-proxy | Spawns a binary subprocess | child_process.execFile — same as forge-bash |
Cost-Benefit
Pro: Single language across all MCP tools; no Python runtime needed; smaller Docker image; faster cold starts; shared utilities (Railway env injection) across all tools.
Con: ~2-3 days migration effort for remaining servers; Node.js fs is more verbose than Python os/shutil for file operations.
Decision
Gradual migration (Option B). forge-bash validates the approach; other servers migrate one at a time after validation. The evaluation confirms feasibility — the SDK is mature, dependencies bundle cleanly, and Node.js APIs cover all needed functionality.