# Changelog

All notable changes to ChukMCPServer are documented here.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.23.0] - 2026-02

### Added
- **Module splitting**: `protocol/` package (extracted SessionManager, SSEEventBuffer, TaskManager), `cli/` package (extracted templates), `cloud/exports.py` (extracted cloud handlers), `component_registry.py`, `startup.py`
- **Zero mypy errors** across all 86 source files
- **Thread safety**: `threading.Lock` on `_global_artifact_store` in `artifacts_context.py`
- **Tasks auto-wire**: Tool calls automatically create/update task entries queryable via `tasks/list`
- **Pre-initialize enforcement**: `strict_init=True` rejects requests with invalid session IDs
- **Concurrency tests**: 7 tests for parallel tool execution, context isolation, race conditions
- **Integration tests**: 14 end-to-end tests covering full MCP session lifecycle

### Changed
- **Error sanitization**: Framework errors return generic messages; tool/resource/prompt errors include `type(e).__name__: {e}` for MCP client diagnostics
- **orjson type safety**: All `.decode()` calls use typed intermediate variables
- **GCF adapter**: Replaced stdlib `json` with `orjson`, reuse event loops instead of per-request creation, sanitized error responses
- **Shutdown consolidation**: Single `asyncio.run(_shutdown_all())` replaces multiple separate calls
- **PyYAML guard**: Lazy import with helpful `ImportError` when PyYAML is not installed
- **Cloud exports**: Functions use lazy `import chuk_mcp_server` for test patch compatibility
- Complete MkDocs documentation site
- Google Drive OAuth provider

### Performance
- **ping**: 1,027,771 ops/s (0.9 us avg latency)
- **tools/list**: 377,270 ops/s (2.6 us avg latency)
- **tools/call**: 76-83K ops/s (12-13 us avg latency)
- **resources/list**: 558,191 ops/s (1.7 us avg latency)
- **resources/read**: 483,749 ops/s (2.0 us avg latency)
- **to_mcp_bytes (cached)**: 26,588,970 ops/s
- **to_mcp_format (cached)**: 1,442,083 ops/s

### Fixed
- `type: ignore[untyped-decorator]` for server decorator methods
- Bare `except` in GCF adapter now logs the error

## [Unreleased]

### Planned
- Advanced configuration examples

## [1.0.0] - 2024-XX-XX

### Added
- Initial stable release
- STDIO transport support
- HTTP transport with Starlette
- OAuth 2.1 middleware with PKCE
- SmartConfig auto-detection system
- Cloud platform support (AWS, GCP, Azure, Edge)
- Type-safe tool/resource handlers
- Automatic schema generation
- Pre-cached schemas for performance
- Global decorator API (@tool, @resource, @prompt)
- Class-based API (ChukMCPServer)
- Zero-configuration deployment
- Docker support
- Comprehensive test suite (2335+ tests, 96% coverage)

### Performance
- 39,000+ RPS with simple tools
- uvloop event loop integration
- orjson serialization
- Optimized worker count detection
- Connection pooling support

### Documentation
- Complete API reference
- Getting started guide
- OAuth integration guide
- Deployment guides (HTTP, Docker, Cloud)
- Example servers (Calculator, Weather, Database)
- Performance benchmarks
- Contributing guide

## [0.9.0] - 2024-XX-XX

### Added
- Beta release
- Core MCP protocol implementation
- HTTP transport
- Basic tool/resource decorators
- SmartConfig system
- Cloud detection

### Changed
- Migrated from FastAPI to Starlette for performance
- Switched to uvloop event loop
- Improved type system

## [0.8.0] - 2024-XX-XX

### Added
- Alpha release
- Proof of concept
- Basic HTTP server
- Tool registration

## Version History

### Major Versions

- **v1.0**: Stable release with full OAuth support
- **v0.9**: Beta with cloud platform support
- **v0.8**: Alpha proof of concept

### Breaking Changes

#### v1.0.0
- None (first stable release)

#### v0.9.0
- Changed from FastAPI to Starlette (transparent to users)
- Removed deprecated `run_http()` method (use `run(transport="http")`)

## Migration Guides

### Upgrading to v1.0

From v0.9:

```python
# Before (v0.9)
mcp.run_http(host="0.0.0.0", port=8000)

# After (v1.0)
mcp.run(transport="http", host="0.0.0.0", port=8000)
# or simply
mcp.run()  # Auto-detects HTTP mode
```

## Deprecation Notices

### v1.0
- None

### Future Deprecations
- None planned

## Security Advisories

No security issues reported.

## Performance Improvements

### v1.0.0
- +25% throughput with uvloop
- +30% faster JSON with orjson
- +50% faster schema validation with pre-caching

### v0.9.0
- +15% throughput with Starlette migration
- +20% faster startup with lazy imports

## Acknowledgments

### Contributors
- Original contributors

### Special Thanks
- Anthropic team for MCP protocol
- Starlette team for excellent ASGI framework
- uvloop team for performance improvements

## Links

- [PyPI](https://pypi.org/project/chuk-mcp-server/)
- [GitHub](https://github.com/chrishayuk/chuk-mcp-server)
- [Documentation](https://chrishayuk.github.io/chuk-mcp-server/)
- [Issues](https://github.com/chrishayuk/chuk-mcp-server/issues)

## Support

- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and community support
- Discord: Real-time chat and help

---

**Note**: This changelog is automatically updated for each release.
