Skip to content

Commit d6e29fb

Browse files
committed
docs: update example usage
1 parent 709eae1 commit d6e29fb

File tree

1 file changed

+68
-1
lines changed

1 file changed

+68
-1
lines changed

README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,73 @@ The llm.txt file is automatically generated from the CLI structure and kept up-t
174174

175175
### ⚡ Example Usage
176176

177+
#### Use case 1: expose a local stdio server over HTTP
178+
179+
1) Add the server to MCPM
180+
```bash
181+
mcpm new [MY_SERVER_NAME] --type stdio --command "[COMMAND]" --args "[ARG_1] [ARG_2] ..."
182+
```
183+
(Add `--force` arg to bypass the confirmation interaction)
184+
Verify it appears in your installed servers:
185+
```bash
186+
mcpm ls
187+
```
188+
You should see `[MY_SERVER_NAME]` in the list.
189+
190+
2) Serve it over HTTP
191+
```bash
192+
mcpm run [MY_SERVER_NAME] --http
193+
```
194+
MCPM prints the server URL, for example:
195+
```
196+
URL: http://127.0.0.1:6276/mcp/
197+
```
198+
199+
3) Expose it on your network (optional)
200+
```bash
201+
mcpm run [MY_SERVER_NAME] --http --host 0.0.0.0
202+
```
203+
Tip: add `--port <PORT>` to choose a different port.
204+
205+
206+
#### Use case 2: combine multiple servers and serve them as one profile
207+
208+
1) Add the servers to MCPM
209+
```bash
210+
# Stdio server
211+
mcpm new [SERVER_A] --type stdio --command "[COMMAND]" --args "[ARG_1] [ARG_2] ..." --force
212+
213+
# Remote HTTP/SSE server
214+
mcpm new [SERVER_B] --type remote --url "http://SERVER_ADDR/mcp/" --force
215+
```
216+
217+
2) Create a profile and add the servers
218+
Interactive:
219+
```bash
220+
mcpm profile create [PROFILE_NAME]
221+
mcpm profile edit [PROFILE_NAME]
222+
```
223+
MCPM lists installed servers; use arrows to navigate, space to select/deselect, type to search, and Enter to confirm.
224+
225+
Verify:
226+
```bash
227+
mcpm profile ls
228+
```
229+
You should see your profile with the selected servers.
230+
231+
3) Run the profile
232+
```bash
233+
# Stdio
234+
mcpm profile run [PROFILE_NAME]
235+
236+
# HTTP
237+
mcpm profile run [PROFILE_NAME] --http
238+
239+
# Optional: host and port
240+
mcpm profile run [PROFILE_NAME] --http --host 0.0.0.0 --port 8080
241+
```
242+
243+
177244
```bash
178245
# Server management
179246
mcpm new myserver --type stdio --command "python -m server" --force
@@ -354,4 +421,4 @@ MIT
354421

355422
## Star History
356423

357-
[![Star History Chart](https://api.star-history.com/svg?repos=pathintegral-institute/mcpm.sh&type=Date)](https://www.star-history.com/#pathintegral-institute/mcpm.sh&Date)
424+
[![Star History Chart](https://api.star-history.com/svg?repos=pathintegral-institute/mcpm.sh&type=Date)](https://www.star-history.com/#pathintegral-institute/mcpm.sh&Date)

0 commit comments

Comments
 (0)