Skip to content

Commit 115ddda

Browse files
authored
Merge pull request #13 from GitHubSecurityLab/use_remote_github_mcp
Change github mcp to use remote server and stop exposing socket in docker
2 parents 6105364 + f82c69b commit 115ddda

File tree

4 files changed

+7
-24
lines changed

4 files changed

+7
-24
lines changed

README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,21 @@ MY_TASKFLOWS=~/my_taskflows MY_DATA=~/codeql_databases CODEQL_DBS_BASE_PATH=/app
115115

116116
For more advanced scenarios like e.g. making custom MCP server code available, you can alter the run script to mount your custom code into the image and configure your toolboxes to use said code accordingly.
117117

118-
Example: a custom MCP server deployment via Docker image:
119-
120118
```sh
121119
export MY_MCP_SERVERS="$PWD"/mcp_servers
122120
export MY_TOOLBOXES="$PWD"/toolboxes
123121
export MY_PERSONALITIES="$PWD"/personalities
124122
export MY_TASKFLOWS="$PWD"/taskflows
125123
export MY_PROMPTS="$PWD"/prompts
124+
export MY_DATA="$PWD"/data
126125

127126
if [ ! -f ".env" ]; then
128127
touch ".env"
129128
fi
130129

131130
docker run \
132-
--volume /var/run/docker.sock:/var/run/docker.sock \
133131
--volume "$PWD"/logs:/app/logs \
134-
--mount type=bind,src="$PWD"/env,dst=/app/.env,ro \
132+
--mount type=bind,src="$PWD"/.env,dst=/app/.env,ro \
135133
${MY_DATA:+--mount type=bind,src=$MY_DATA,dst=/app/my_data} \
136134
${MY_MCP_SERVERS:+--mount type=bind,src=$MY_MCP_SERVERS,dst=/app/my_mcp_servers,ro} \
137135
${MY_TASKFLOWS:+--mount type=bind,src=$MY_TASKFLOWS,dst=/app/taskflows/my_taskflows,ro} \
@@ -141,19 +139,6 @@ docker run \
141139
"ghcr.io/githubsecuritylab/seclab-taskflow-agent" "$@"
142140
```
143141

144-
Our default run script makes the Docker socket available to the image, which contains the Docker cli, so 3rd party Docker based stdio MCP servers also function as normal.
145-
146-
Example: a toolbox configuration using the official GitHub MCP Server via Docker:
147-
148-
```yaml
149-
server_params:
150-
kind: stdio
151-
command: docker
152-
args: ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"]
153-
env:
154-
GITHUB_PERSONAL_ACCESS_TOKEN: "{{ env GITHUB_PERSONAL_ACCESS_TOKEN }}"
155-
```
156-
157142
## Personalities
158143

159144
Core characteristics for a single Agent. Configured through YAML files in `personalities/`.

docker/run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ if [ ! -f ".env" ]; then
55
fi
66
docker run -i \
77
--platform linux/amd64 \
8-
--volume /var/run/docker.sock:/var/run/docker.sock \
98
--volume "$PWD/"logs:/app/logs \
109
--mount type=bind,src="$PWD/".env,dst=/app/.env,ro \
1110
${MY_DATA:+--mount type=bind,src=$MY_DATA,dst=/app/my_data} \

taskflows/examples/example_large_list_result_iter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ taskflow:
1717
must_complete: true
1818
repeat_prompt: true
1919
agents:
20-
- echo
20+
- assistant
2121
user_prompt: |
2222
Echo this: The title is {{ RESULT_title }} and the url is {{ RESULT_url }}.

toolboxes/github_official.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ seclab-taskflow-agent:
33
version: 1
44

55
server_params:
6-
kind: stdio
7-
command: docker
8-
args: ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"]
9-
env:
10-
GITHUB_PERSONAL_ACCESS_TOKEN: "{{ env GITHUB_PERSONAL_ACCESS_TOKEN }}"
6+
kind: streamable
7+
url: https://api.githubcopilot.com/mcp/
8+
headers:
9+
Authorization: "{{ env GITHUB_AUTH_HEADER }}"

0 commit comments

Comments
 (0)