File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,11 @@ If the MCP server implements the HTTP with SSE transport, instantiate
185185[ ` MCPServerSse ` ] [ agents.mcp.server.MCPServerSse ] . Apart from the transport, the API is identical to the Streamable HTTP server.
186186
187187``` python
188+
189+ from agents import Agent, Runner
190+ from agents.model_settings import ModelSettings
191+ from mcp import MCPServerSse
192+
188193workspace_id = " demo-workspace"
189194
190195async with MCPServerSse(
@@ -212,6 +217,8 @@ proofs of concept or when the server only exposes a command line entry point.
212217
213218``` python
214219from pathlib import Path
220+ from agents import Agent, Runner
221+ from agents.mcp import MCPServerStdio
215222
216223current_dir = Path(__file__ ).parent
217224samples_dir = current_dir / " sample_files"
@@ -298,6 +305,8 @@ methods:
298305- ` get_prompt(name, arguments) ` fetches a concrete prompt, optionally with parameters.
299306
300307``` python
308+ from agents import Agent
309+
301310prompt_result = await server.get_prompt(
302311 " generate_code_review_instructions" ,
303312 {" focus" : " security vulnerabilities" , " language" : " python" },
You can’t perform that action at this time.
0 commit comments