Skip to content

Commit 24ae1e7

Browse files
authored
Merge pull request #80 from UiPath/fix/docs_binary
docs: add how to pack binary
2 parents 5e89eab + ad6aaf8 commit 24ae1e7

File tree

1 file changed

+145
-0
lines changed

1 file changed

+145
-0
lines changed

docs/how_to_pack_binary.md

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# How to pack and publish the official GitHub MCP Server
2+
3+
This guide walks you through manually packaging and publishing the GitHub MCP server to UiPath Orchestrator. An [example GitHub Actions workflow](/.github/workflows/build-github-mcp-server.yml) is provided to automate these steps.
4+
5+
## Prerequisites
6+
7+
- UiPath Cloud account
8+
- UiPath PAT (personal access token)
9+
- `go` (version 1.21+)
10+
- `python` (version 3.10+)
11+
- `uv` package manager (`pip install uv`)
12+
13+
## Steps
14+
15+
### 1. Clone and Build the GitHub MCP Server
16+
17+
```bash
18+
# Clone the repository
19+
git clone https://github.com/github/github-mcp-server.git
20+
cd github-mcp-server
21+
22+
# Build the server
23+
cd cmd/github-mcp-server
24+
go build
25+
```
26+
27+
### 2. Create Package Directory
28+
29+
```bash
30+
# Create a temp directory for packaging
31+
mkdir -p ~/mcp-package
32+
cp github-mcp-server ~/mcp-package/
33+
chmod +x ~/mcp-package/github-mcp-server
34+
cd ~/mcp-package
35+
```
36+
37+
### 3. Create Configuration Files
38+
39+
Create `mcp.json`:
40+
41+
```bash
42+
cat > mcp.json << EOF
43+
{
44+
"servers": {
45+
"github": {
46+
"command": "/bin/sh",
47+
"args": ["-c", "chmod +x github-mcp-server && ./github-mcp-server stdio"],
48+
"env": {
49+
"GITHUB_PERSONAL_ACCESS_TOKEN": "x"
50+
}
51+
}
52+
}
53+
}
54+
EOF
55+
```
56+
57+
Create `pyproject.toml`:
58+
59+
```bash
60+
cat > pyproject.toml << EOF
61+
[project]
62+
name = "mcp-github-server"
63+
version = "0.0.1"
64+
description = "Official GitHub MCP Server"
65+
authors = [{ name = "John Doe" }]
66+
dependencies = [
67+
"uipath-mcp>=0.0.74",
68+
]
69+
requires-python = ">=3.10"
70+
EOF
71+
```
72+
73+
Create `.env` file:
74+
75+
```bash
76+
cat > .env << EOF
77+
UIPATH_ACCESS_TOKEN=your_access_token_here
78+
UIPATH_URL=https://cloud.uipath.com/account/tenant
79+
EOF
80+
```
81+
82+
### 4. Set Up Python Environment
83+
84+
```bash
85+
# Create and activate virtual environment
86+
uv venv -p 3.10 .venv
87+
source .venv/bin/activate
88+
89+
# Install dependencies
90+
uv sync
91+
```
92+
93+
### 5. Initialize UiPath Package
94+
95+
```bash
96+
# Initialize UiPath project
97+
uipath init
98+
```
99+
100+
This creates a `uipath.json` file.
101+
102+
### 6. Edit uipath.json to Include the Executable
103+
104+
Open `uipath.json` in a text editor:
105+
106+
```bash
107+
nano uipath.json
108+
```
109+
110+
Add a `settings` section with `filesIncluded`:
111+
112+
```json
113+
{
114+
"settings": {
115+
"filesIncluded": ["github-mcp-server"]
116+
},
117+
"entrypoints": []
118+
}
119+
```
120+
121+
Save and exit.
122+
123+
### 7. Package for UiPath
124+
125+
```bash
126+
# Create the package
127+
uipath pack
128+
```
129+
130+
This creates a `.nupkg` file in the `.uipath` directory.
131+
132+
### 8. Upload to UiPath Orchestrator
133+
134+
Upload the `.nupkg` file to your UiPath Orchestrator instance through the web interface, API or using the `uipath publish` CLI command.
135+
136+
## Automating with GitHub Actions
137+
138+
To automate this process:
139+
140+
1. Copy the [example workflow](/.github/workflows/build-github-mcp-server.yml) to `.github/workflows/` in your repository
141+
2. Go to GitHub Actions tab and run the workflow
142+
3. Provide the version when prompted
143+
4. Download the artifact after completion
144+
145+
The workflow handles all the manual steps automatically, including the crucial modification of `uipath.json` to include the executable in the package.

0 commit comments

Comments
 (0)