Connect VS Code
The steps below demonstrate how to connect to the DoiT MCP server using Visual Studio Code. VS Code loads MCP servers from an mcp.json file and exposes them to GitHub Copilot Chat when MCP is enabled for your setup.
Required permissionsβ
-
To connect and access DoiT Cloud Intelligence via the MCP server, your user must be assigned the Billing Profiles Admin permission.
-
The DoiT MCP server tools map to the DoiT Cloud Intelligence API. Your DoiT API key authenticates requests. In addition, each DoiT API operation enforces its own permissions.
Prerequisitesβ
-
A DoiT API key to set in
mcp.json. In addition, VS Code can prompt once and store secrets using input variables instead of putting the API key directly in JSON. See Input variables. -
A recent version of Visual Studio Code with GitHub Copilot and MCP support for chat. For background, see Add and manage MCP servers in VS Code and the MCP configuration reference.
-
Node.js is on your
PATHsonpxcan run@doitintl/doit-mcp-server.
Connection typeβ
VS Code connects to DoiT MCP using a local stdio connection. VS Code launches the published package (@doitintl/doit-mcp-server) on your machine using standard input/output (stdio) using npx. Ensure Node.js is on your PATH.
Configure the DoiT MCP serverβ
-
In VS Code, open the Command Palette (β§βP on macOS, Ctrl+Shift+P on Windows or Linux).
-
Run MCP: Open Workspace Folder MCP Configuration to create or edit
.vscode/mcp.jsonin the current workspace, or run MCP: Open User Configuration if you want the server available in all workspaces. -
In the
mcp.jsonfile, add an entry for DoiT MCP server using standard input/output (stdio) and the published package@doitintl/doit-mcp-server.{
"servers": {
"doitMcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@doitintl/doit-mcp-server@latest"],
"env": {
"DOIT_API_KEY": "<your-doit-api-key>"
}
}
}
} -
Replace
<your-doit-api-key>with your DoiT API key. -
Save
mcp.json. If VS Code prompts you to trust or start the server, confirm so the process can launch. -
Confirm the DoiT MCP server is listed and started by running MCP: List Servers from the Command Palette.
You can now use Copilot Chat (or other VS Code AI features that consume MCP tools in your build) to ask questions or make requests related to DoiT Cloud Intelligence data.
VS Code can prompt once and store secrets using input variables instead of putting the API key directly in JSON. For example, define an inputs entry with type, id, description, and "password": true, then set "DOIT_API_KEY": "${input:your-id}" in env. See Input variables.