Add Kiro CLI MCP server configuration
- MCP server config for anvilmcp (read_inbox, send_message, list_sessions, set_state) - Install script that merges config into ~/.kiro/settings/cli.json - README documenting installation and requirements - Follows same pattern as Claude hooks installation
This commit is contained in:
parent
f6a3de17ae
commit
0b1659e9fc
|
|
@ -0,0 +1,37 @@
|
|||
# Kiro CLI Integration
|
||||
|
||||
This directory contains configuration for integrating AnviLLM with Kiro CLI.
|
||||
|
||||
## Installation
|
||||
|
||||
### MCP Server
|
||||
|
||||
Install the AnviLLM MCP server to enable agent communication tools:
|
||||
|
||||
```bash
|
||||
./kiro-cli/install-mcp.sh
|
||||
```
|
||||
|
||||
This configures the `anvilmcp` MCP server in `~/.kiro/settings/cli.json`, providing tools:
|
||||
- `read_inbox` - Read messages from agent's inbox
|
||||
- `send_message` - Send messages to other agents or user
|
||||
- `list_sessions` - List all active sessions
|
||||
- `set_state` - Set agent state (idle, running, etc.)
|
||||
|
||||
### Agent Configuration
|
||||
|
||||
The agent configuration is in `./kiro-cli/agent/anvillm-agent.json` and includes hooks that:
|
||||
- Set agent state to `running` when prompts are submitted
|
||||
- Set agent state to `idle` when stopped
|
||||
|
||||
To use this agent configuration, copy it to your Kiro agents directory:
|
||||
|
||||
```bash
|
||||
cp ./kiro-cli/agent/anvillm-agent.json ~/.kiro/agents/
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- `anvilmcp` binary must be in PATH (built from `cmd/anvilmcp`)
|
||||
- `anvilsrv` daemon must be running
|
||||
- `jq` for installation scripts
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
SETTINGS_FILE="$HOME/.kiro/settings/cli.json"
|
||||
MCP_CONFIG='{
|
||||
"mcpServers": {
|
||||
"anvilmcp": {
|
||||
"command": "anvilmcp",
|
||||
"args": []
|
||||
}
|
||||
}
|
||||
}'
|
||||
|
||||
if ! command -v jq &> /dev/null; then
|
||||
echo "Error: jq is required but not installed. Please install jq first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$HOME/.kiro/settings"
|
||||
|
||||
if [ -f "$SETTINGS_FILE" ]; then
|
||||
# Merge with existing settings
|
||||
jq -s '.[0] * .[1]' "$SETTINGS_FILE" <(echo "$MCP_CONFIG") > "$SETTINGS_FILE.tmp"
|
||||
mv "$SETTINGS_FILE.tmp" "$SETTINGS_FILE"
|
||||
else
|
||||
# Create new settings file
|
||||
echo "$MCP_CONFIG" | jq '.' > "$SETTINGS_FILE"
|
||||
fi
|
||||
|
||||
echo "AnviLLM MCP server configured in $SETTINGS_FILE"
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"mcpServers": {
|
||||
"anvilmcp": {
|
||||
"command": "anvilmcp",
|
||||
"args": []
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue