Package com.github.copilot.sdk.json
Class McpServerConfig
java.lang.Object
com.github.copilot.sdk.json.McpServerConfig
- Direct Known Subclasses:
McpHttpServerConfig,McpStdioServerConfig
Abstract base class for MCP (Model Context Protocol) server configurations.
Use one of the concrete subclasses to configure MCP servers:
McpStdioServerConfig— for local/stdio-based MCP serversMcpHttpServerConfig— for remote HTTP/SSE-based MCP servers
- Since:
- 1.3.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the optional timeout in milliseconds for tool calls to this server.getTools()Gets the list of tools to include from this server.setTimeout(Integer timeout) Sets an optional timeout in milliseconds for tool calls to this server.Sets the list of tools to include from this server.
-
Constructor Details
-
McpServerConfig
public McpServerConfig()
-
-
Method Details
-
getTools
Gets the list of tools to include from this server.An empty list means none; use
"*"to include all tools.- Returns:
- the list of tool names, or
nullif not set
-
setTools
Sets the list of tools to include from this server.An empty list means none; use
"*"to include all tools.- Parameters:
tools- the list of tool names, ornull- Returns:
- this config for method chaining
-
getTimeout
Gets the optional timeout in milliseconds for tool calls to this server.- Returns:
- the timeout in milliseconds, or
nullfor the default
-
setTimeout
Sets an optional timeout in milliseconds for tool calls to this server.- Parameters:
timeout- the timeout in milliseconds, ornullfor the default- Returns:
- this config for method chaining
-