From da709e86d7a39d171215deaf6119c7fad0ebe709 Mon Sep 17 00:00:00 2001 From: starbased-co Date: Mon, 21 Jul 2025 11:36:18 -0700 Subject: [PATCH] feat: Add claude.zsh wrapper for Neovim MCP --- scripts/claude.zsh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 scripts/claude.zsh 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" <