Skip to content

Commit 8d781fc

Browse files
Publish mcp guide (#63)
* draft * publish mcp guide
1 parent 77c786c commit 8d781fc

3 files changed

Lines changed: 564 additions & 9 deletions

File tree

docs/docs/guide/connecting-to-an-mcp-server.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Let's examine the complete code and break it down line by line:
2626

2727
### Environment Configuration
2828

29-
Configure your code to read `OPENAI_API_KEY` from your environment, as well as `OPENAI_MODEL` and `OPENAI_SYSTEM_MESSAGE`. You can modify the default values if you prefer not to set environment variables, although it is recommended to set `OPENAI_API_KEY` as an environment variable for security.
29+
Configure your code to read `OPENAI_API_KEY` from your environment. You can modify the default values if you prefer not to set environment variables, although it is recommended to set `OPENAI_API_KEY` as an environment variable for security.
3030

3131
```bash
3232
export OPENAI_API_KEY="sk-proj-*****"
@@ -410,16 +410,18 @@ Runnig this code with
410410
You'll see that the logs on your MCP server have been triggered by the call.
411411
412412
413-
<div class="logs"><pre>
413+
<div class="bash">
414+
<pre>
415+
```
414416
...
415-
stock-mcp-server-1 | INFO: 192.168.48.1:39408 - "POST /mcp/ HTTP/1.1" 202 Accepted
416-
stock-mcp-server-1 | INFO: 192.168.48.1:39422 - "GET /mcp/ HTTP/1.1" 200 OK
417-
stock-mcp-server-1 | INFO: 192.168.48.1:39434 - "POST /mcp/ HTTP/1.1" 200 OK
418-
<code><span style="color:#FF4689">stock-mcp-server-1 | 2025-07-19 12:01:42.826 | INFO | __main__:company_overview:70 - Started Company Overview Tool for Request ID: 1
419-
</span> </code>
420-
stock-mcp-server-1 | INFO: 192.168.48.1:39450 - "POST /mcp/ HTTP/1.1" 200 OK
421-
stock-mcp-server-1 | INFO: 192.168.48.1:39456 - "DELETE /mcp/ HTTP/1.1" 200 OK
417+
INFO: 192.168.48.1:39408 - "POST /mcp/ HTTP/1.1" 202 Accepted
418+
INFO: 192.168.48.1:39422 - "GET /mcp/ HTTP/1.1" 200 OK
419+
INFO: 192.168.48.1:39434 - "POST /mcp/ HTTP/1.1" 200 OK
420+
INFO __main__:company_overview:70 - Started Company Overview Tool for Request ID: 1
421+
INFO: 192.168.48.1:39450 - "POST /mcp/ HTTP/1.1" 200 OK
422+
INFO: 192.168.48.1:39456 - "DELETE /mcp/ HTTP/1.1" 200 OK
422423
...
424+
```
423425
</pre>
424426
</div>
425427

0 commit comments

Comments
 (0)