context.llm•2.75 kB
# Shortcut MCP Development Context
## Session Summary
Working on Shortcut MCP (Model Context Protocol) server with focus on Loom video analysis integration.
## Recent Work Completed
### 1. Lint and Code Quality Improvements
- Fixed 163 lint errors
- Removed `.js` extensions from imports (using esbuild with bundler module resolution)
- Integrated OpenAPI spec for type generation
- Implemented automatic Zod schema generation
- Cleaned up unused imports and variables
### 2. File Attachment Support
- Added `shortcut_get_story_files` and `shortcut_download_file` MCP tools
- Implemented intelligent text/binary file detection
- Created comprehensive mime type support for 80+ file types and 200+ extensions
- Added special handling for engineering file formats
### 3. Loom Video Analysis Integration (Current Focus)
- Created modules for Loom video analysis:
- `src/loomDetector.ts`: Extracts Loom URLs from stories
- `src/loomClient.ts`: Interfaces with Loom API
- `src/videoAnalysis.ts`: Analyzes videos for debugging info
- Added MCP tools:
- `shortcut_get_story_loom_videos`: Extract Loom videos from a story
- `shortcut_analyze_loom_video`: Analyze a Loom video
- Test story: sc-31023 (contains Loom video ID: 0267d1f7019e4d79bf2abe944cac23c9)
### 4. Hot Reload Functionality
- Created reload mechanism for development:
- `start_mcp_with_reload.sh`: Wrapper with HUP signal handling
- `reload_mcp.sh`: Helper to send reload signal
- Updated `start_mcp.sh` to support `--with-reload` flag
- Allows rebuilding and restarting MCP without losing Claude session
## Key Technical Details
### Project Structure
- TypeScript project using ES modules
- Built with esbuild
- MCP server implementation using @modelcontextprotocol/sdk
- Package manager: pnpm (NOT npm)
### Configuration
- API token in `~/.shortcut_mcp/.env`
- Debug logs at `/tmp/shortcut-mcp-debug.log`
- Process PIDs: `/tmp/shortcut-mcp-wrapper.pid` and `/tmp/shortcut-mcp-server.pid`
### Current State
- All Loom integration code is implemented but needs testing
- Server can reloaded to activate new Loom tools
- Ready to analyze story sc-31023's Loom video
## Next Steps
1. Reload MCP server: `./reload_mcp.sh`
2. Test Loom video extraction with story sc-31023
3. Analyze the Loom video for debugging information
4. Enhance with visual analysis capabilities (OCR, key frame extraction)
## Important Commands
```bash
# Reload after code changes
./reload_mcp.sh
# Build project
pnpm run build
# Run tests
pnpm test
# Watch logs
tail -f /tmp/shortcut-mcp-debug.log
```
## Git Status at Start
- Current branch: main
- Modified files: CLAUDE.md, package.json, src/server.ts, etc.
- New files: README.md, src/shortcutClient.ts
- Recent commit: f8bdeb3 Bootstrap