-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
invalidThis doesn't seem rightThis doesn't seem right
Description
In the example, the MCP Client is responsible for starting the MCP server process like:
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
# Create server parameters for stdio connection
server_params = StdioServerParameters(
command="python", # Executable
args=["example_server.py"], # Optional command line arguments
env=None # Optional environment variables
)
async def run():
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
# Initialize the connection
await session.initialize()
...
Let's say I have the MCP server running already (i.e. uv run example_server.py
).
How can MCP clients connect to that server?
Thank you!
Spycsh, logan-markewich, simon-shi87 and nor0x
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem rightThis doesn't seem right