Skip to content

Commit 6569b20

Browse files
change readme and entrypoint
1 parent 5ebf487 commit 6569b20

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

Service/mcp/mcp-proxy/project/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ This is an MCP format conversion tool that can expose STDIO services in the form
66

77
This project is a tool used to convert MCP services at the STDIO level into SSE services, so that existing MCP STDIO programs can be developed and called on the public network.
88

9-
When you use this template for development, you need to write your own MCP service program and related dependencies in this template, and then modify the relevant startup commands in the entrypoint to start it.
9+
When you use this template for development, you need to write your own MCP service program and related dependencies in this template, After you have completed writing your code, modify the startup command in the entrypoint file by adding the stdio startup command for your project. For example:
10+
11+
```
12+
mcp-proxy --sse-port=8080 npx @modelcontextprotocol/server-puppeteer
13+
```
14+
15+
Then start the project.
1016

1117
The source code for this project comes from https://github.com/sparfenyuk/mcp-proxy.
1218

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
#!/bin/bash
22

3-
# 激活虚拟环境
3+
app_env=${1:-development}
4+
45
source /home/devbox/project/.venv/bin/activate
56

6-
# 添加当前目录到Python路径
77
export PYTHONPATH=$PYTHONPATH:/home/devbox/project
88

9-
# 检测环境
10-
if [ "$1" = "dev" ]; then
11-
echo "Development environment detected"
12-
echo "Running development environment commands..."
13-
# 开发环境命令
14-
cd /home/devbox/project && python -m project
9+
dev_commands() {
10+
echo "Running development environment commands..."
11+
cd /home/devbox/project && python -m project
12+
}
13+
14+
prod_commands() {
15+
echo "Running production environment commands..."
16+
cd /home/devbox/project && python -m project
17+
}
18+
19+
if [ "$app_env" = "production" ] || [ "$app_env" = "prod" ]; then
20+
echo "Production environment detected"
21+
prod_commands
1522
else
16-
echo "Production environment detected"
17-
echo "Running production environment commands..."
18-
# 生产环境命令
19-
cd /home/devbox/project && python -m project
23+
echo "Development environment detected"
24+
dev_commands
2025
fi
2126

22-
# 退出虚拟环境
2327
deactivate

0 commit comments

Comments
 (0)