From 3a23c975134066eb3b271cc960f3eee9c258c73b Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Sat, 21 Feb 2026 07:15:20 +0100 Subject: [PATCH] install mcp server for claude --- claude/install-mcp.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 claude/install-mcp.sh diff --git a/claude/install-mcp.sh b/claude/install-mcp.sh new file mode 100755 index 0000000..fcabe72 --- /dev/null +++ b/claude/install-mcp.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Target .mcp.json file in project root +MCP_FILE=".mcp.json" + +# MCP configuration for anvilmcp +MCP_CONFIG='{ + "mcpServers": { + "anvilmcp": { + "type": "stdio", + "command": "anvilmcp", + "args": [], + "env": {} + } + } +}' + +if ! command -v jq &> /dev/null; then + echo "Error: jq is required but not installed. Please install jq first." >&2 + exit 1 +fi + +if [ -f "$MCP_FILE" ]; then + # Merge with existing .mcp.json + jq -s '.[0] * .[1]' "$MCP_FILE" <(echo "$MCP_CONFIG") > "$MCP_FILE.tmp" + mv "$MCP_FILE.tmp" ~/"$MCP_FILE" +else + # Create new .mcp.json file + echo "$MCP_CONFIG" | jq '.' > ~/"$MCP_FILE" +fi + +echo "AnviLLM MCP server configured in $MCP_FILE" +echo "" +echo "The server provides these tools:" +echo " - read_inbox : Read messages from agent's inbox" +echo " - send_message : Send messages to other agents or user" +echo " - list_sessions : List all active sessions" +echo " - set_state : Set agent state (idle, running, etc.)" +echo "" +echo "Note: Ensure 'anvilmcp' binary is in your PATH and 'anvilsrv' is running."