Connect VS Code

3 minute read

Configure VS Code to connect to the CloudBees Unify MCP Server so you can work with CloudBees Unify conversationally from your editor. For an overview of the CloudBees Unify MCP Server, refer to Understanding the CloudBees Unify MCP Server.

Prerequisites

Complete the following before you begin:

  • Install VS Code 1.99 or later (MCP support is built in).

  • Have an active CloudBees Unify account.

  • Have a web browser available for OAuth authentication.

Add the CloudBees Unify MCP Server

Add the CloudBees Unify MCP Server using either a workspace configuration file or your global user settings.

Option 1: Workspace configuration file

Use a .vscode/mcp.json file to scope the CloudBees Unify MCP Server to the current project.

  1. In the root of your project, create or open .vscode/mcp.json.

  2. Add the CloudBees Unify MCP Server configuration:

    { "servers": { "unify-mcp-server": { "type": "http", "url": "https://mcp.cloudbees.io/v1/mcp", "oauth": { "clientId": "public-mcp-client" } } } }

    If you already have other servers configured, add the unify-mcp-server entry to the existing servers object.

  3. Save the file.

public-mcp-client is the shared OAuth client ID for the CloudBees Unify MCP Server. Use this exact value. You do not need to register your own.

Option 2: Global user settings

Use VS Code’s settings.json to make the CloudBees Unify MCP Server available across all workspaces.

  1. Open the Command Palette: Ctrl+Shift+P (or Cmd+Shift+P on macOS).

  2. Select Preferences: Open User Settings (JSON).

  3. Add the CloudBees Unify MCP Server configuration to settings.json:

    { "mcp": { "servers": { "unify-mcp-server": { "type": "http", "url": "https://mcp.cloudbees.io/v1/mcp", "oauth": { "clientId": "public-mcp-client" } } } } }

    If you already have other servers configured, add the unify-mcp-server entry to the existing mcp.servers object.

  4. Save the file.

public-mcp-client is the shared OAuth client ID for the CloudBees Unify MCP Server. Use this exact value. You do not need to register your own.

Filter toolsets (optional)

By default, the CloudBees Unify MCP Server exposes a set of read-only discovery tools. To control which tools VS Code can access, add a headers field to the unify-mcp-server configuration block before starting the server.

Scope the connection to specific toolsets:

"headers": { "X-MCP-Toolsets": "workflows,application-security" }

Restrict all exposed tools to read-only:

"headers": { "X-MCP-Toolsets": "workflows,application-security", "X-MCP-Readonly": "true" }

Opt in to all available tools:

"headers": { "X-MCP-Toolsets": "all" }

Valid toolset names: default, all, organization-administration, access-management, applications-components, workflows, feature-management, application-security, reports-analytics, policy-engine.

For more information, refer to Secure your MCP connection.

Authenticate with CloudBees Unify

After adding the server, authenticate with CloudBees Unify:

  1. In VS Code, open the MCP panel.

  2. Find unify-mcp-server in the list.

  3. Select Start next to unify-mcp-server.

  4. A new browser window opens showing the CloudBees Unify sign-in page:

    1. Sign in using Google, GitHub, or your SSO provider.

    2. Select your Root Organization from the list.

    3. The browser shows "Authentication successful."

    4. Return to VS Code.

  5. VS Code confirms the connection.

If you’re already signed in to CloudBees Unify in your browser, you may only need to select your Root Organization. Only organizations you have access to are listed.

Verify the connection

Test the connection by asking Copilot Chat (VS Code’s AI chat) a question that requires CloudBees Unify:

List my CloudBees Unify components.

Copilot Chat should call the CloudBees Unify MCP Server and return your component list.

Manage the connection

After connecting to the CloudBees Unify MCP Server, you can stop, reauthenticate, or remove the server configuration as needed.

Stop the CloudBees Unify MCP Server

If you need to stop the server:

  1. In VS Code, open the MCP panel.

  2. Find unify-mcp-server.

  3. Select Stop.

Your configuration remains in place; you can restart the server at any time.

Reauthenticate the CloudBees Unify MCP Server

If your authentication expires or you need to switch organizations:

  1. In VS Code, open the MCP panel.

  2. Find unify-mcp-server.

  3. Select Stop, then choose Start.

  4. Complete the OAuth flow in your browser.

  5. Select the desired organization.

Remove the CloudBees Unify MCP Server

To completely remove the CloudBees Unify MCP Server:

  • If you used the workspace configuration, open .vscode/mcp.json and delete the unify-mcp-server entry from the servers object.

  • If you used global user settings, open your settings.json file (refer to Option 2: Global user settings) and delete the unify-mcp-server entry from the mcp.servers object.

Save the file after removing the entry.

Troubleshooting

If you encounter connection or authentication issues, refer to Troubleshoot common issues with the CloudBees Unify MCP Server.