diff --git a/scripts/claude.zsh b/scripts/claude.zsh new file mode 100755 index 0000000..47635d3 --- /dev/null +++ b/scripts/claude.zsh @@ -0,0 +1,39 @@ +#!/usr/bin/env zsh +# Claude wrapper that adds Neovim MCP server when inside Neovim + +# Run claude normally if $NVIM is not set +if [[ -z "$NVIM" ]]; then + command claude "$@" + return +fi + +# If $NVIM is set, create a temporary MCP config +local tmp_config=$(mktemp /tmp/claude-mcp."${NVIM:t}".XXX.json) + +# Write the MCP config with the Neovim server +cat >"$tmp_config" <