Skip to content

Commit ae37e5e

Browse files
committedMar 11, 2025
update mcp doc with uvx
1 parent 7a8e7e0 commit ae37e5e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎advanced-features/mcp.mdx

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Chainlit supports two types of MCP connections:
2424

2525
> ⚠️ **Security Warning**: The stdio connection type spawns actual subprocesses on the Chainlit server. Only use this with trusted commands in controlled environments. Ensure proper validation of user inputs to prevent command injection vulnerabilities.
2626
27+
<Note>**Command Availability Warning**: When using the stdio connection type with commands like `npx` or `uvx`, these commands must be available on the Chainlit server where the application is running. The subprocess is executed on the server, not on the client machine.</Note>
28+
2729
## Setup
2830

2931
### 1. Register Connection Handlers
@@ -54,7 +56,7 @@ The client needs to provide the connection details through the Chainlit interfac
5456
- Connection name (unique identifier)
5557
- Client type (`sse` or `stdio`)
5658
- For SSE: URL endpoint
57-
- For stdio: Full command (e.g., `npx your-tool-package`)
59+
- For stdio: Full command (e.g., `npx your-tool-package` or `uvx your-tool-package`)
5860

5961
<Frame caption="Adding an MCP">
6062
<img src="/images/add-mcp.png" />
@@ -137,5 +139,4 @@ MCP connections are managed at the session level. Each WebSocket session can hav
137139

138140
1. The user explicitly disconnects
139141
2. The same connection name is reused (old connection is replaced)
140-
3. The WebSocket session ends
141-
142+
3. The WebSocket session ends

0 commit comments

Comments
 (0)