ropic commited on
Commit
95d2319
ยท
verified ยท
1 Parent(s): 3af4555

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +40 -3
entrypoint.sh CHANGED
@@ -1,4 +1,6 @@
1
  #!/bin/bash
 
 
2
  cat <<EOF > /app/config.json
3
  {
4
  "mcpServers": {
@@ -23,6 +25,18 @@ cat <<EOF > /app/config.json
23
  "TAVILY_API_KEY": "${TAVILY_API_KEY}"
24
  }
25
  },
 
 
 
 
 
 
 
 
 
 
 
 
26
  "github": {
27
  "command": "npx",
28
  "args": [
@@ -38,14 +52,37 @@ cat <<EOF > /app/config.json
38
  "args": [
39
  "-y",
40
  "@modelcontextprotocol/server-filesystem",
41
- "/home/mcp"
42
  ]
43
  },
44
  "edgeone-pages-mcp-server": {
45
  "command": "npx",
46
  "args": ["edgeone-pages-mcp"]
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
49
  }
50
  EOF
51
- exec mcpo --config /app/config.json
 
 
 
 
 
 
 
 
1
  #!/bin/bash
2
+
3
+ # Create config.json dynamically using environment variables
4
  cat <<EOF > /app/config.json
5
  {
6
  "mcpServers": {
 
25
  "TAVILY_API_KEY": "${TAVILY_API_KEY}"
26
  }
27
  },
28
+ // --- Baidu Map Service Removed ---
29
+ // "baidu-map": {
30
+ // "command": "npx",
31
+ // "args": [
32
+ // "-y",
33
+ // "@baidumap/mcp-server-baidu-map"
34
+ // ],
35
+ // "env": {
36
+ // "BAIDU_MAP_API_KEY": "${BAIDU_MAP_API_KEY}"
37
+ // }
38
+ // },
39
+ // --- End of Removed Section ---
40
  "github": {
41
  "command": "npx",
42
  "args": [
 
52
  "args": [
53
  "-y",
54
  "@modelcontextprotocol/server-filesystem",
55
+ "/home/mcp" # IMPORTANT: Filesystem access is limited to this directory inside the container
56
  ]
57
  },
58
  "edgeone-pages-mcp-server": {
59
  "command": "npx",
60
  "args": ["edgeone-pages-mcp"]
61
+ }, // <- ๆณจๆ„้€™่ฃก็š„้€—่™Ÿ๏ผŒๅ› ็‚บๅพŒ้ข้‚„ๆœ‰ๆœๅ‹™
62
+ "fetcher-mcp": {
63
+ "command": "npx",
64
+ "args": [
65
+ "-y",
66
+ "fetcher-mcp@0.2.6" // ไฝฟ็”จ็‰นๅฎš็‰ˆๆœฌ
67
+ ],
68
+ "env": {} // ้€šๅธธไธ้œ€่ฆ็Žฏๅขƒๅ˜้‡
69
+ }, // <- ๆณจๆ„้€™่ฃก็š„้€—่™Ÿ๏ผŒๅ› ็‚บๅพŒ้ข้‚„ๆœ‰ๆœๅ‹™
70
+ "g-search-mcp": {
71
+ "command": "npx",
72
+ "args": [
73
+ "-y",
74
+ "g-search-mcp"
75
+ ],
76
+ "env": {} // ้€šๅธธไธ้œ€่ฆ็Žฏๅขƒๅ˜้‡
77
+ } // <- ้€™ๆ˜ฏๆœ€ๅพŒไธ€ๅ€‹ๆœๅ‹™๏ผŒๅพŒ้ขๆฒ’ๆœ‰้€—่™Ÿ
78
  }
79
  }
80
  EOF
81
+
82
+ # Print the generated config for debugging (optional)
83
+ echo "Generated config.json:"
84
+ cat /app/config.json
85
+ echo "---"
86
+
87
+ # Execute mcpo with the generated config file
88
+ exec mcpo --config /app/config.json