Skip to content

Commit 1d80d87

Browse files
authored
Merge pull request #5 from UiPath/fix/samples
samples: simple mcp
2 parents 3cfac50 + ca8a277 commit 1d80d87

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# UiPath MCP Python SDK
22

3+
[![PyPI downloads](https://img.shields.io/pypi/dm/uipath-mcp.svg)](https://pypi.org/project/uipath-mcp/)
4+
[![PyPI - Version](https://img.shields.io/pypi/v/uipath-mcp)](https://img.shields.io/pypi/v/uipath-mcp)
5+
[![Python versions](https://img.shields.io/pypi/pyversions/uipath-mcp.svg)](https://pypi.org/project/uipath-mcp/)
6+
37
A Python SDK that enables hosting local MCP servers on UiPath Platform.
48

59
## Installation
@@ -25,10 +29,18 @@ UIPATH_URL=https://cloud.uipath.com/ACCOUNT_NAME/TENANT_NAME
2529
UIPATH_ACCESS_TOKEN=YOUR_TOKEN_HERE
2630
```
2731

28-
## Basic Usage
29-
30-
```python
31-
32+
### Servers Definition
33+
34+
```json
35+
{
36+
"servers": {
37+
"my-python-server": {
38+
"type": "stdio",
39+
"command": "python",
40+
"args": ["server.py"]
41+
},
42+
}
43+
}
3244
```
3345

3446
## Command Line Interface (CLI)
@@ -46,15 +58,15 @@ This command opens a browser for authentication and creates/updates your `.env`
4658
### Initialize a Project
4759

4860
```bash
49-
uipath init [ENTRYPOINT]
61+
uipath init [SERVER]
5062
```
5163

52-
Creates a `uipath.json` configuration file for your project. If the entrypoint is not provided, it will try to find a single Python file in the current directory.
64+
Creates a `uipath.json` configuration file for your project. If [SERVER] is not provided, it will create an entrypoint for each MCP server defined in the `mcp.json` file.
5365

5466
### Debug a Project
5567

5668
```bash
57-
uipath run ENTRYPOINT [INPUT]
69+
uipath run [SERVER]
5870
```
5971

6072
Starts the local MCP Server
@@ -89,6 +101,7 @@ Publishes the most recently created package to your UiPath Orchestrator.
89101

90102
To properly use the CLI for packaging and publishing, your project should include:
91103
- A `pyproject.toml` file with project metadata
104+
- A `mcp.json` file with servers metadata
92105
- A `uipath.json` file (generated by `uipath init`)
93106
- Any Python files needed for your automation
94107

samples/mcp-server/mcp.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
"command": "python",
66
"args": ["server.py"]
77
},
8-
"my-python-server2": {
9-
"type": "stdio",
10-
"command": "python",
11-
"args": ["server2.py"]
12-
},
138
"fetch": {
149
"type": "stdio",
1510
"command": "uvx",

samples/mcp-server/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ description = "Demo MCP Server"
55
authors = [{ name = "John Doe" }]
66
dependencies = [
77
"mcp>=1.6.0",
8+
"uipath-mcp>=0.0.1",
89
]
910
requires-python = ">=3.10"

samples/mcp-server/mcp_server.py renamed to samples/mcp-server/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ def get_greeting(name: str) -> str:
1616

1717

1818
if __name__ == "__main__":
19-
mcp.run(transport="sse")
19+
mcp.run()

0 commit comments

Comments
 (0)