Class McpServerConfig

java.lang.Object
com.github.copilot.sdk.json.McpServerConfig
Direct Known Subclasses:
McpHttpServerConfig, McpStdioServerConfig

public abstract class McpServerConfig extends Object
Abstract base class for MCP (Model Context Protocol) server configurations.

Use one of the concrete subclasses to configure MCP servers:

Since:
1.3.0
See Also:
  • Constructor Details

    • McpServerConfig

      public McpServerConfig()
  • Method Details

    • getTools

      public List<String> 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 null if not set
    • setTools

      public McpServerConfig setTools(List<String> tools)
      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, or null
      Returns:
      this config for method chaining
    • getTimeout

      public Integer getTimeout()
      Gets the optional timeout in milliseconds for tool calls to this server.
      Returns:
      the timeout in milliseconds, or null for the default
    • setTimeout

      public McpServerConfig setTimeout(Integer timeout)
      Sets an optional timeout in milliseconds for tool calls to this server.
      Parameters:
      timeout - the timeout in milliseconds, or null for the default
      Returns:
      this config for method chaining