diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f4edf2b --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +default: build + +.PHONY: build +build: + @cargo build --release + +.PHONY: test +test: + @cargo test + +.PHONY: sanity +sanity: + @cargo fmt --all --check + @cargo clippy --all-targets --all-features -- -D warnings + +.PHONY: format +format: + @cargo fmt --all diff --git a/README.md b/README.md index 94fdedd..48d8a58 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ cd mcp_linux_ssh 2. Build the project: ```bash -cargo build --release +make build ``` The compiled binary will be available at `target/release/mcp_linux_ssh`. @@ -570,9 +570,14 @@ To modify or extend this server: 1. Edit the source code in `src/lib.rs` 2. Add new tools by implementing functions with the `#[tool]` attribute -3. Rebuild with `cargo build --release` +3. Rebuild with `make build` 4. Restart your MCP client to pick up changes +### Testing + +Run tests with `make sanity test`. +Any formatting errors found by the sanity tests can be corrected with `make format`. + ### Logging The server automatically logs all tool calls to `~/.local/state/mcp_linux_ssh/tool_calls.jsonl` (following XDG Base Directory specification) for debugging and audit purposes. Logs are rotated daily.