2.9 KiB
2.9 KiB
MCP Stream Workflow - Development Context
Purpose: This directory is for developing the MCP server itself, not for using it.
Development vs. Usage Context
❌ DO NOT Use MCP Tools Here
This directory is where we build the stream-workflow MCP server. Do not use mcp__stream-workflow__* tools in this workspace - they're for projects that consume this MCP server.
✅ Development Workflow
# 1. Edit source files
vim src/tools/start-stream.ts
vim src/state-manager.ts
# 2. Build
pnpm build
# 3. Test
pnpm test
# 4. Verify
pnpm verify
# 5. Commit changes
git add . && git commit -m "feat: improve X"
# 6. Restart Claude Code session to reload MCP
# (MCP servers don't support hot reload)
Key Files
Source code:
src/server.ts- MCP server entry pointsrc/tools/*.ts- Tool implementationssrc/state-manager.ts- Stream state managementsrc/types.ts- TypeScript definitions
Configuration:
src/config.ts- Environment configurationpackage.json- Dependencies and scripts
Documentation:
README.md- User-facing documentationDEVELOPMENT.md- Developer guidedocs/*.md- Design documents
Testing:
tests/- Test suites (if present)
Common Development Tasks
Adding New Tool
- Create
src/tools/new-tool.ts - Implement handler function
- Export from
src/server.ts - Build and test
- Document in README.md
Updating Existing Tool
- Edit
src/tools/existing-tool.ts - Update types if needed (
src/types.ts) - Build and verify:
pnpm build && pnpm verify - Test with Claude Code (restart session)
Testing Changes
# Build
pnpm build
# Restart Claude Code to reload MCP
# Then test in a project that uses this MCP
Agent Cleanup Protocol
This directory is subject to agent cleanup rules.
Pollution to remove:
*_SUMMARY.md(e.g., BUILD_VERIFICATION_REPORT.md)*_REPORT.md(e.g., SCREENSHOT_CONFIG_UPDATE.md)*_COMPLETE.md(e.g., IMPLEMENTATION_COMPLETE.md)*_PLAN.md(archive valuable plans to.project/history/)*.bak,*.oldfiles
Keep:
README.md- User documentationDEVELOPMENT.md- Developer guidedocs/*.md- Design documents (if in dedicated docs/ folder)- Source code and tests
Archive valuable information to .project/history/YYYYMMDD_description.md if needed, then delete the pollution.
Current Development Focus
Version-aware stream numbering (v0.2.0):
- ✅ Implemented version-scoped IDs (e.g.,
stream-1500-auth) - ✅ Sub-stream support (e.g.,
stream-1500a-tests) - 🚧 IN PROGRESS: Improve uncommitted changes handling in start_stream
Atomic commit workflow (future):
- Design complete:
docs/ATOMIC_COMMIT_WORKFLOW.md - Hooks implemented:
hooks/post-commit,hooks/sync-dashboard.sh - Implementation: Not yet integrated into MCP tools
Last Updated
2025-12-11