mcpo / entrypoint.sh
deeme's picture
Upload entrypoint.sh
829621d verified
#!/bin/bash
cat <<EOF > /app/config.json
{
"mcpServers": {
"github": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
}
},
"linux-do": {
"command": "npx",
"args": [
"-y",
"@pleasure1234/linux-do-mcp"
],
"env": {
"LINUX_DO_USERNAME": "deem",
"LINUX_DO_API_KEY": "${LINUX_DO}"
}
},
"amap-maps": {
"command": "npx",
"args": ["-y","@amap/amap-maps-mcp-server"],
"env": {
"AMAP_MAPS_API_KEY": "${AMAP_MAPS}"
}
},
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/home/mcp"
]
},
"fetcher-mcp": {
"command": "npx",
"args": [
"-y",
"fetcher-mcp@0.2.6"
],
"env": {}
},
"g-search-mcp": {
"command": "npx",
"args": [
"-y",
"g-search-mcp"
],
"env": {}
},
"time": {
"command": "uvx",
"args": [
"mcp-server-time",
"--local-timezone=Asia/Shanghai"
]
},
"fetcher": {
"command": "npx",
"args": [
"-y",
"fetcher-mcp"
]
},
"context7": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp@latest"
]
},
"fetch": {
"command": "uvx",
"args": [
"mcp-server-fetch"
]
}
}
}
EOF
# Print the generated config for debugging (optional but recommended)
echo "Generated config.json:"
cat /app/config.json
echo "---"
# Execute mcpo with the generated config file
exec mcpo --config /app/config.json