You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`@mcp-ui/client`**: A Typescript package with UI components for easy rendering of interactive UI. It includes a React component (`<UIResourceRenderer />`) and a standard Web Component (`<ui-resource-renderer>`).
15
15
-**`@mcp-ui/server`**: A Typescript package with helper functions (like `createUIResource`) for server-side logic to easily construct `UIResource` objects.
16
16
-**`mcp_ui_server`**: A Ruby gem with helper methods (like `create_ui_resource`) for server-side logic in Ruby applications.
17
+
-**`mcp-ui-server`**: A Python package with helper methods (like `create_UIResource`) for server-side logic in Python applications.
The `mcp-ui-server` package provides utilities to generate UI resources (`UIResource`) on your MCP server. It allows you to define UI snippets on the server-side, which can then be seamlessly and securely rendered on the client.
4
+
5
+
For a complete example, see the [`python-server-demo`](https://github.com/idosal/mcp-ui/tree/main/examples/python-server-demo).
The primary function for creating UI snippets. It takes a dictionary of options to define the URI, content (direct HTML or external URL), and encoding method (text or blob).
11
+
12
+
## Purpose
13
+
14
+
-**Ease of Use**: Simplifies the creation of valid `UIResource` objects.
15
+
-**Validation**: Includes basic validation (e.g., URI prefixes matching content type).
16
+
-**Encoding**: Handles Base64 encoding when `encoding: 'blob'` is specified.
17
+
-**MCP Integration**: Proper integration with the MCP Python SDK using `EmbeddedResource`.
18
+
19
+
## Installation
20
+
21
+
Install the package using pip or your preferred package manager:
22
+
23
+
```bash
24
+
pip install mcp-ui-server
25
+
```
26
+
27
+
Or with uv:
28
+
29
+
```bash
30
+
uv add mcp-ui-server
31
+
```
32
+
33
+
## Building
34
+
35
+
This package is built using Python's standard build tools and distributed via PyPI. It includes full type annotations and is compatible with Python 3.10+.
36
+
37
+
To build the package from source:
38
+
39
+
```bash
40
+
uv build
41
+
```
42
+
43
+
See the [Server SDK Usage & Examples](./usage-examples.md) page for practical examples.
0 commit comments