Connecting to the DevOps Velocity MCP server by using GitHub Copilot in Visual Studio Code
You can connect to the HCL DevOps Velocity (Velocity) Model Context Protocol (MCP) server by using GitHub Copilot in Visual Studio (VS) Code to interact with Velocity and retrieve the necessary data and insights.
Before you begin
You must have completed the following tasks:
- Installed Velocity, configured Keycloak, and set up OIDC authentication in Velocity. See Prerequisites to connect with the MCP server in DevOps Velocity.
- Obtained the MCP Server URL. For example:
https://<velocity_hostname>/mcp - Ensured that you have installed VS Code and the GitHub Copilot extension.
Procedure
- Optional:
Open the terminal and enter the following command to allow the self-signed
certificates if you are using a self-signed certificate during the Velocity
installation.
export NODE_TLS_REJECT_UNAUTHORIZED=0 -
Enter the following command to open VS Code.
code . - Open the Command Palette by pressing the keys Ctrl+Shift+P or Cmd+Shift+P.
- Search and select MCP: Add Server.
-
Choose HTTP as the server type, when prompted for the transport
type.
The Velocity MCP Server uses HTTP-based transport.
-
Enter the MCP Server URL in the URL field.
VS Code automatically generates the required
mcp.jsonconfiguration. - Enter a name for the server. For example: Velocity MCP Server.
-
Select Workspace, when VS Code prompts you to choose where to save this
configuration.
-
-
Global – used for all VS Code workspaces
-
Workspace – used only in the current folder/project
Note: When Workspace is selected, a.vscodefolder is automatically created, and anmcp.jsonfile is generated within it.A samplemcp.jsonfile is as shown below:{ "servers": { "velocity-mcp-server": { "url": "<velocity_mcp_server_url>", "type": "http" } }, "inputs": [] } -
Property Description <velocity_mcp_server_url> Specifies the full Velocity MCP server URL. For example: https://<velocity_hostname>/mcp
-
Themcp.jsonfile is opened. -
-
Click Start for the added MCP server.
A prompt appears to authenticate via OAuth.
-
Click Allow.
The following prompt is displayed:
Do you want code to open the external website?
-
Click Open.
The OIDC login page is displayed.
-
Sign in using the Velocity OIDC user
credentials.
A consent screen is displayed requesting access to MCP tools, Velocity APIs (used internally for tool execution), and basic profile and role information.
-
Click Yes.
You are automatically redirected to VS Code or you can also close the browser and switch to VS Code.
-
Verify the connection.
The Velocity MCP Server must display Running as the status.Note: The MCP server times out after 30 minutes of inactivity. If no tool calls occur during this period, your session expires and you are required to re-authenticate.