Skip to content

Commit c1bb50e

Browse files
committed
[4/n] Add docs for MCP
Just adding docs. -
1 parent 84abe67 commit c1bb50e

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

mkdocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ nav:
2828
- results.md
2929
- streaming.md
3030
- tools.md
31+
- mcp.md
3132
- handoffs.md
3233
- tracing.md
3334
- context.md
@@ -60,6 +61,8 @@ nav:
6061
- ref/models/interface.md
6162
- ref/models/openai_chatcompletions.md
6263
- ref/models/openai_responses.md
64+
- ref/mcp/server.md
65+
- ref/mcp/util.md
6366
- Tracing:
6467
- ref/tracing/index.md
6568
- ref/tracing/create.md
@@ -107,6 +110,8 @@ plugins:
107110
show_signature_annotations: true
108111
# Makes the font sizes nicer
109112
heading_level: 3
113+
# Show inherited members
114+
inherited_members: true
110115

111116
extra:
112117
# Remove material generation message in footer

src/agents/mcp/server.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ def __init__(self, params: MCPServerStdioParams, cache_tools_list: bool = False)
175175
"""Create a new MCP server based on the stdio transport.
176176
177177
Args:
178-
params: The params that configure the server. This includes:
179-
- The command (e.g. `python` or `node`) that starts the server.
180-
- The args to pass to the server command (e.g. `foo.py` or `server.js`).
181-
- The environment variables to set for the server.
178+
params: The params that configure the server. This includes the command to run to
179+
start the server, the args to pass to the command, the environment variables to
180+
set for the server, the working directory to use when spawning the process, and
181+
the text encoding used when sending/receiving messages to the server.
182182
cache_tools_list: Whether to cache the tools list. If `True`, the tools list will be
183183
cached and only fetched from the server once. If `False`, the tools list will be
184184
fetched from the server on each call to `list_tools()`. The cache can be
@@ -235,11 +235,9 @@ def __init__(self, params: MCPServerSseParams, cache_tools_list: bool = False):
235235
"""Create a new MCP server based on the HTTP with SSE transport.
236236
237237
Args:
238-
params: The params that configure the server. This includes:
239-
- The URL of the server.
240-
- The headers to send to the server.
241-
- The timeout for the HTTP request.
242-
- The timeout for the SSE connection.
238+
params: The params that configure the server. This includes the URL of the server,
239+
the headers to send to the server, the timeout for the HTTP request, and the
240+
timeout for the SSE connection.
243241
244242
cache_tools_list: Whether to cache the tools list. If `True`, the tools list will be
245243
cached and only fetched from the server once. If `False`, the tools list will be

0 commit comments

Comments
 (0)