Skip to content

Commit c9cc122

Browse files
Merge pull request #10 from heroku/small_readme_improvements
small fixes to README
2 parents d681689 + d7671b8 commit c9cc122

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
### **Set Required Environment Variables from Heroku CLI**
2727
Instead of manually setting each variable, use the Heroku CLI to pull the correct values.
2828

29-
```sh
29+
```bash
3030
export APP_NAME=<your-heroku-app-name>
3131
heroku create $APP_NAME
3232

@@ -39,37 +39,37 @@ heroku config:set STDIO_MODE_ONLY=<true/false> -a $APP_NAME
3939
*Note: we recommend setting `STDIO_MODE_ONLY` to `true` for security and code execution isolation security in non-dev environments.*
4040

4141
If you *only* want local & deployed `STDIO` capabilities (no `SSE server`), run:
42-
```
42+
```bash
4343
heroku ps:scale web=0 -a $APP_NAME
4444
```
4545
If you do want a deployed `SSE` server, run:
46-
```
46+
```bash
4747
heroku ps:scale web=1 -a $APP_NAME
4848
heroku config:set WEB_CONCURRENCY=1 -a $APP_NAME
4949
```
5050

5151
Optionally, put these config variables into a local .env file for local development:
52-
```
52+
```bash
5353
heroku config -a $APP_NAME --shell | tee .env > /dev/null
5454
```
5555

5656
Next, connect your app to your git repo:
57-
```
57+
```bash
5858
heroku git:remote -a $APP_NAME
5959
```
6060
And deploy!
61-
```
61+
```bash
6262
git push heroku main
6363
```
6464
View logs with:
65-
```
65+
```bash
6666
heroku logs --tail -a $APP_NAME
6767
```
6868

6969
## Local Testing
7070
### Local SSE
7171
One-time packages installation:
72-
```
72+
```bash
7373
virtualenv venv
7474
source venv/bin/activate
7575
pip install -r requirements.txt
@@ -86,7 +86,7 @@ uvicorn src.sse_server:app --reload
8686
Next, in a new pane, you can try running some queries against your server:
8787
#### Local SSE - Example Requests
8888
First run:
89-
```
89+
```bash
9090
export API_KEY=$(heroku config:get API_KEY -a $APP_NAME)
9191
```
9292

@@ -112,7 +112,7 @@ There are two ways to easily test out your MCP server in STDIO mode:
112112

113113
#### 1. Local STDIO - Example Python STDIO Client
114114
List tools:
115-
```
115+
```bash
116116
python example_clients/test_stdio.py mcp list_tools | jq
117117
```
118118

@@ -142,10 +142,6 @@ EOF
142142
*(Note that the server expects the client to send a shutdown request, so you can stop the connection with CTRL-C)*
143143

144144
## Remote Testing
145-
```bash
146-
export API_KEY=$(heroku config:get API_KEY -a $APP_NAME)
147-
export MCP_SERVER_URL=$(heroku info -s -a $APP_NAME | grep web_url | cut -d= -f2)
148-
```
149145

150146
### Remote SSE
151147
To test your remote `SSE` server, you'll need to make sure a web process is actually spun up. To save on costs, by default this repository doesn't spin up web dynos on creation, as many folks only want to use `STDIO` mode (local and one-off dyno) requests:
@@ -154,6 +150,13 @@ heroku ps:scale web=1 -a $APP_NAME
154150
```
155151
You only need to do this once, unless you spin back down to 0 web dynos to save on costs (`heroku ps:scale web=0 -a $APP_NAME`). To confirm currently running dynos, use `heroku ps -a $APP_NAME`.
156152

153+
Next, run:
154+
155+
```bash
156+
export API_KEY=$(heroku config:get API_KEY -a $APP_NAME)
157+
export MCP_SERVER_URL=$(heroku info -s -a $APP_NAME | grep web_url | cut -d= -f2)
158+
```
159+
157160
Next, you can run the same queries as shown in the [Local SSE - Example Requests](#local-sse---example-requests) testing section - because you've set `MCP_SERVER_URL`, the client will call out to your deployed server.
158161

159162
### Remote STDIO

0 commit comments

Comments
 (0)