Skip to content

Commit edd40ec

Browse files
msanatansourcery-ai[bot]coderabbitai[bot]
authored
Publish to Docker Hub (#468)
* Add GitHub Actions workflow for Docker Hub publishing * Remove TestPyPI publishing from PyPI workflow Removes the publish-to-testpypi job from the GitHub Actions workflow to streamline the publishing process and only publish to production PyPI. * Update Server/DOCKER_OVERVIEW.md Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Update .github/workflows/publish-docker.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Align docker and pypi publishing so they update on new tags in the same way * Add caching to speed up pushes * Remove unnecessary permissions * Let's be super specific about the platform it should be Ubuntu's default but just in case --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 12e1b62 commit edd40ec

File tree

3 files changed

+141
-27
lines changed

3 files changed

+141
-27
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish Docker image 🐳
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
workflow_dispatch:
8+
jobs:
9+
push_to_registry:
10+
name: Push Docker image to Docker Hub
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out the repo
15+
uses: actions/checkout@v6
16+
17+
- name: Log in to Docker Hub
18+
uses: docker/login-action@v3
19+
with:
20+
username: ${{ secrets.DOCKER_USERNAME }}
21+
password: ${{ secrets.DOCKER_PASSWORD }}
22+
23+
- name: Extract metadata (tags, labels) for Docker
24+
id: meta
25+
uses: docker/metadata-action@v5
26+
with:
27+
images: ${{ secrets.DOCKER_USERNAME }}/mcp-for-unity-server
28+
tags: |
29+
type=semver,pattern={{version}}
30+
type=semver,pattern={{major}}.{{minor}}
31+
type=ref,event=branch
32+
type=sha
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Build and push Docker image
38+
uses: docker/build-push-action@v6
39+
with:
40+
context: .
41+
file: Server/Dockerfile
42+
platforms: linux/amd64
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
cache-from: type=gha
47+
cache-to: type=gha,mode=max

.github/workflows/publish-pypi.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
1+
name: Publish Python 🐍 distribution 📦 to PyPI
22

3-
on: push
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
workflow_dispatch:
48

59
jobs:
610
build:
@@ -32,7 +36,6 @@ jobs:
3236
publish-to-pypi:
3337
name: >-
3438
Publish Python 🐍 distribution 📦 to PyPI
35-
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
3639
needs:
3740
- build
3841
runs-on: ubuntu-latest
@@ -50,27 +53,3 @@ jobs:
5053
path: dist/
5154
- name: Publish distribution 📦 to PyPI
5255
uses: pypa/gh-action-pypi-publish@release/v1
53-
54-
publish-to-testpypi:
55-
name: Publish Python 🐍 distribution 📦 to TestPyPI
56-
needs:
57-
- build
58-
runs-on: ubuntu-latest
59-
60-
environment:
61-
name: testpypi
62-
url: https://test.pypi.org/p/mcpforunityserver
63-
64-
permissions:
65-
id-token: write # IMPORTANT: mandatory for trusted publishing
66-
67-
steps:
68-
- name: Download all the dists
69-
uses: actions/download-artifact@v7
70-
with:
71-
name: python-package-distributions
72-
path: dist/
73-
- name: Publish distribution 📦 to TestPyPI
74-
uses: pypa/gh-action-pypi-publish@release/v1
75-
with:
76-
repository-url: https://test.pypi.org/legacy/

Server/DOCKER_OVERVIEW.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# MCP for Unity Server (Docker Image)
2+
3+
[![MCP](https://badge.mcpx.dev?status=on 'MCP Enabled')](https://modelcontextprotocol.io/introduction)
4+
[![License](https://img.shields.io/badge/License-MIT-red.svg 'MIT License')](https://opensource.org/licenses/MIT)
5+
[![Discord](https://img.shields.io/badge/discord-join-red.svg?logo=discord&logoColor=white)](https://discord.gg/y4p8KfzrN4)
6+
7+
Model Context Protocol server for Unity Editor integration. Control Unity through natural language using AI assistants like Claude, Cursor, and more.
8+
9+
**Maintained by [Coplay](https://www.coplay.dev/?ref=unity-mcp)** - This project is not affiliated with Unity Technologies.
10+
11+
💬 **Join our community:** [Discord Server](https://discord.gg/y4p8KfzrN4)
12+
13+
**Required:** Install the [Unity MCP Plugin](https://github.com/CoplayDev/unity-mcp?tab=readme-ov-file#-step-1-install-the-unity-package) to connect Unity Editor with this MCP server.
14+
15+
---
16+
17+
## Quick Start
18+
19+
### 1. Pull the image
20+
21+
```bash
22+
docker pull msanatan/mcp-for-unity-server:latest
23+
```
24+
25+
### 2. Run the server
26+
27+
```bash
28+
docker run -p 8080:8080 msanatan/mcp-for-unity-server:latest
29+
```
30+
31+
This starts the MCP server on port 8080.
32+
33+
### 3. Configure your MCP Client
34+
35+
Add the following configuration to your MCP client (e.g., Claude Desktop config, Cursor settings):
36+
37+
```json
38+
{
39+
"mcpServers": {
40+
"UnityMCP": {
41+
"url": "http://localhost:8080/mcp"
42+
}
43+
}
44+
}
45+
```
46+
47+
---
48+
49+
## Configuration
50+
51+
The server connects to the Unity Editor automatically when both are running. No additional configuration is needed.
52+
53+
**Environment Variables:**
54+
55+
- `DISABLE_TELEMETRY=true` - Opt out of anonymous usage analytics
56+
- `LOG_LEVEL=DEBUG` - Enable detailed logging (default: INFO)
57+
58+
Example running with environment variables:
59+
60+
```bash
61+
docker run -p 8080:8080 -e LOG_LEVEL=DEBUG msanatan/mcp-for-unity-server:latest
62+
```
63+
64+
---
65+
66+
## Example Prompts
67+
68+
Once connected, try these commands in your AI assistant:
69+
70+
- "Create a 3D player controller with WASD movement"
71+
- "Add a rotating cube to the scene with a red material"
72+
- "Create a simple platformer level with obstacles"
73+
- "Generate a shader that creates a holographic effect"
74+
- "List all GameObjects in the current scene"
75+
76+
---
77+
78+
## Documentation
79+
80+
For complete documentation, troubleshooting, and advanced usage, please visit the GitHub repository:
81+
82+
📖 **[Full Documentation](https://github.com/CoplayDev/unity-mcp#readme)**
83+
84+
---
85+
86+
## License
87+
88+
MIT License - See [LICENSE](https://github.com/CoplayDev/unity-mcp/blob/main/LICENSE)

0 commit comments

Comments
 (0)