Skip to content

Commit e9581b0

Browse files
danieliserclaude
andcommitted
feat: add checksum-based MCP type validation and auto-regeneration
Implement automatic detection of MCP tool changes with FNV-1a hash-based checksum validation. Types now regenerate only when tools change, improving startup performance and ensuring type definitions stay synchronized. Features: - Checksum calculation for tool signatures (namespace + input schema) - Automatic regeneration when MCP tools change - Skip regeneration when tools unchanged (faster startup) - Configurable type distribution via CODEMODE_TYPE_COPY_PATH env var - Persistent checksum storage in generated/mcp.d.ts.checksum Changes: - Update @modelcontextprotocol/sdk 0.4.0 → 1.18.2 (protocol compatibility) - Add configurable CodeGenOptions.copyToPath parameter - Enhance agent instructions to read mcp://types/declarations resource - Improve MCP server connection logging and debugging BREAKING CHANGE: Server constructor updated for MCP SDK v1.18.2 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e098ad2 commit e9581b0

8 files changed

Lines changed: 4375 additions & 277 deletions

File tree

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Checksum-based validation for MCP tool type declarations
12+
- FNV-1a hash calculation of tool signatures (namespace + input schema)
13+
- Automatic detection of tool list changes on server initialization
14+
- Checksum persistence to `generated/mcp.d.ts.checksum`
15+
- Auto-regeneration of TypeScript declarations when tools change
16+
- Skip regeneration when tools unchanged (faster startup)
17+
- Configurable type declaration distribution
18+
- Optional `copyToPath` configuration for CodeGenService
19+
- Environment variable `CODEMODE_TYPE_COPY_PATH` (comma-separated paths)
20+
- Supports copying generated types to multiple destinations
21+
- Ensures type definitions available across project structure
22+
- Enhanced MCP configuration logging
23+
- Debug output for server discovery and configuration
24+
- Tool discovery progress indicators
25+
- Connection status and tool count reporting
26+
27+
### Changed
28+
- Updated `@modelcontextprotocol/sdk` from 0.4.0 to 1.18.2
29+
- Fixed protocol version compatibility issues
30+
- Updated Server constructor for new API
31+
- Enabled connection to MCP servers using 2025-06-18 protocol
32+
- Improved `execute_code` tool description
33+
- Added **IMPORTANT** directive for agents
34+
- Explicit instruction to read `mcp://types/declarations` resource
35+
- Ensures type-safe code generation with current tool definitions
36+
37+
### Fixed
38+
- MCP type declarations now automatically regenerate when new servers connect
39+
- Protocol version compatibility with newer MCP servers (2025-06-18 protocol)
40+
- TypeScript declarations stay synchronized with available MCP tools across all connected servers
41+
42+
## [0.1.0] - 2025-10-02
43+
44+
### Added
45+
- Initial release with MCP integration
46+
- Multi-runtime code execution (QuickJS, Bun, Deno, isolated-vm, E2B)
47+
- TypeScript declaration generation from MCP tool schemas
48+
- MCP Resources and Prompts support
49+
- Two-pass execution for async MCP tool calls in sync runtimes
50+
51+
[Unreleased]: https://github.com/danieliser/codemode-unified/compare/v0.1.0...HEAD
52+
[0.1.0]: https://github.com/danieliser/codemode-unified/releases/tag/v0.1.0

0 commit comments

Comments
 (0)