Repository navigation
Expand file tree
/
Copy pathsetup_mcp.sh
More file actions
executable file
·91 lines (80 loc) · 2.33 KB
/
Copy pathsetup_mcp.sh
File metadata and controls
executable file
·91 lines (80 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
# Setup script for Aden Hive Framework MCP Server
# This script installs the framework and configures the MCP server
set -e # Exit on error
echo "=== Aden Hive Framework MCP Server Setup ==="
echo ""
# Color codes for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
echo -e "${YELLOW}Step 1: Installing framework package...${NC}"
pip install -e . || {
echo -e "${RED}Failed to install framework package${NC}"
exit 1
}
echo -e "${GREEN}✓ Framework package installed${NC}"
echo ""
echo -e "${YELLOW}Step 2: Installing MCP dependencies...${NC}"
pip install mcp fastmcp || {
echo -e "${RED}Failed to install MCP dependencies${NC}"
exit 1
}
echo -e "${GREEN}✓ MCP dependencies installed${NC}"
echo ""
echo -e "${YELLOW}Step 3: Verifying MCP server configuration...${NC}"
if [ -f ".mcp.json" ]; then
echo -e "${GREEN}✓ MCP configuration found at .mcp.json${NC}"
echo "Configuration:"
cat .mcp.json
else
echo -e "${RED}✗ No .mcp.json found${NC}"
echo "Creating default MCP configuration..."
cat > .mcp.json <<EOF
{
"mcpServers": {
"agent-builder": {
"command": "python",
"args": ["-m", "framework.mcp.agent_builder_server"],
"cwd": "$SCRIPT_DIR"
}
}
}
EOF
echo -e "${GREEN}✓ Created .mcp.json${NC}"
fi
echo ""
echo -e "${YELLOW}Step 4: Testing MCP server...${NC}"
python -c "from framework.mcp import agent_builder_server; print('✓ MCP server module loads successfully')" || {
echo -e "${RED}Failed to import MCP server module${NC}"
exit 1
}
echo -e "${GREEN}✓ MCP server module verified${NC}"
echo ""
echo -e "${GREEN}=== Setup Complete ===${NC}"
echo ""
echo "The MCP server is now ready to use!"
echo ""
echo "To start the MCP server manually:"
echo " python -m framework.mcp.agent_builder_server"
echo ""
echo "MCP Configuration location:"
echo " $SCRIPT_DIR/.mcp.json"
echo ""
echo "To use with Claude Desktop or other MCP clients,"
echo "add the following to your MCP client configuration:"
echo ""
echo "{
\"mcpServers\": {
\"agent-builder\": {
\"command\": \"python\",
\"args\": [\"-m\", \"framework.mcp.agent_builder_server\"],
\"cwd\": \"$SCRIPT_DIR\"
}
}
}"
echo ""