# Contributing to mcpkill
Thank you for your interest! All contributions are welcome.
## Setup
```bash
git clone https://github.com/rustkit-ai/mcpkill
cd mcpkill
cargo build
cargo test
```
Rust stable is required. Install via [rustup](https://rustup.rs).
## Before opening a PR
```bash
cargo fmt # format
cargo clippy # lint (must be warning-free)
cargo test # all tests must pass
cargo bench --no-run # benchmarks must compile
```
## Project structure
```
src/
main.rs CLI entry point + subcommand routing
proxy.rs stdio bidirectional pipe + signal handling
filter.rs orchestration: cache hit/miss + top-K selection
cache.rs SQLite semantic cache (store, search, evict, stats)
embedder.rs fastembed wrapper (all-MiniLM-L6-v2)
chunker.rs smart text chunking (markdown / JSON / paragraphs)
similarity.rs cosine similarity
token.rs token count estimator
config.rs ~/.mcpkill.toml loader
stats.rs stats formatting (table + JSON)
tests/
integration.rs cache + chunker pipeline (no embedder needed)
benches/
bench.rs criterion benchmarks
```
## Adding a schema migration
1. Write the SQL in `cache.rs` → `MIGRATIONS` slice
2. Bump the version number (new tuple entry)
3. Update `SCHEMA_VERSION` constant
4. Add a test in `tests/integration.rs` if the change affects observable behaviour
## Releasing
1. Update `Cargo.toml` version
2. Add an entry in `CHANGELOG.md`
3. `git tag v0.x.0 && git push --tags`
4. `cargo publish`
## License
By contributing you agree your changes are licensed under MIT.