daiwei114 commited on
Commit
662386e
·
verified ·
1 Parent(s): 5aaceea

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +33 -0
  2. entrypoint.sh +42 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ RUN useradd -ms /bin/bash mcp
4
+
5
+ WORKDIR /app
6
+
7
+ RUN apt-get update && \
8
+ apt-get install -y curl unzip && \
9
+ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
10
+ apt-get install -y nodejs && \
11
+ apt-get clean && rm -rf /var/lib/apt/lists/*
12
+
13
+ COPY entrypoint.sh /app/
14
+ RUN chmod +x /app/entrypoint.sh
15
+
16
+ USER mcp
17
+ RUN curl -fsSL https://bun.sh/install | bash
18
+
19
+ ENV BUN_INSTALL="/home/mcp/.bun"
20
+ ENV PATH="${BUN_INSTALL}/bin:${PATH}"
21
+
22
+ USER root
23
+ RUN pip install --no-cache-dir mcpo uv
24
+
25
+ RUN mkdir -p /app/.cache/uv && chown -R mcp:mcp /app
26
+
27
+ ENV XDG_CACHE_HOME="/app/.cache"
28
+
29
+ USER mcp
30
+
31
+ EXPOSE 8000
32
+
33
+ ENTRYPOINT ["/app/entrypoint.sh"]
entrypoint.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ cat <<EOF > /app/config.json
4
+ {
5
+ "mcpServers": {
6
+ "tavily-mcp": {
7
+ "command": "npx",
8
+ "args": [
9
+ "-y",
10
11
+ ],
12
+ "env": {
13
+ "TAVILY_API_KEY": "${TAVILY_API_KEY}"
14
+ }
15
+ },
16
+ "github": {
17
+ "command": "npx",
18
+ "args": [
19
+ "-y",
20
+ "@modelcontextprotocol/server-github"
21
+ ],
22
+ "env": {
23
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
24
+ }
25
+ },
26
+ "filesystem": {
27
+ "command": "npx",
28
+ "args": [
29
+ "-y",
30
+ "@modelcontextprotocol/server-filesystem",
31
+ "/home/mcp"
32
+ ]
33
+ },
34
+ "edgeone-pages-mcp-server": {
35
+ "command": "npx",
36
+ "args": ["edgeone-pages-mcp"]
37
+ }
38
+ }
39
+ }
40
+ EOF
41
+
42
+ exec mcpo --config /app/config.json