Connect To Server
connect_to_serverEstablish a connection to an MCP server for testing, using file path, URL, or command. Allows only one active connection at a time.
Instructions
Connect to an MCP server for testing.
Establishes a connection to a target MCP server using the appropriate transport protocol (stdio for file paths, streamable-http for URLs, or explicit stdio via command parameter). Only one connection can be active at a time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the stdio subprocess. | |
| env | No | Environment variables for the stdio subprocess. | |
| url | Yes | Server URL (http://..., https://...) or file path for stdio transport | |
| args | No | Arguments for the stdio command (e.g. ['-y', 'some-package']). | |
| auth | No | Authentication config. Bearer token string, 'oauth', {'type': 'bearer', 'token': '...'}, or {'type': 'oauth', 'scopes': [...], 'client_id': '...', 'client_secret': '...'}. Credentials are never logged or stored. | |
| command | No | Explicit stdio command to run (e.g. 'python', 'node', 'npx'). When provided, connects via StdioTransport instead of auto-detection. | |
| headers | No | Optional HTTP headers for authenticated connections. Ignored for stdio. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||