Skip to main content

Editors & Clients

VS Code and Copilot

VS Code can use Verdictan in two independent ways, and you can set up either or both:

  • Model requests. Add your gateway as a Custom Endpoint model in Copilot Chat. Chat requests to that model then pass your policies and are recorded.
  • MCP tools. Let Copilot's agent search Verdictan History or check policies. This does not change which model Copilot uses.

Inline suggestions and other GitHub-hosted features keep their own path to GitHub.

Before you start​

  • For model requests: a gateway on 127.0.0.1:41002 with at least one provider target. See Gateway Setup for IDEs.
  • For MCP: an agent with a publication that has a resolved public hostname.
  • A client API token for VS Code. See API Tokens for IDEs.
  • VS Code with the GitHub Copilot extension.

Configure a Custom Endpoint model​

  1. Run Chat: Manage Language Models from the Command Palette.
  2. Select Add Models → Custom Endpoint, name the group Verdictan, and enter your application token as the API key.
  3. Choose Chat Completions. VS Code opens chatLanguageModels.json.
  4. Keep the generated secret reference. Set your model ID, and set url to the full route, http://127.0.0.1:41002/v1/chat/completions. Match the limits and capabilities to the upstream model.
  5. Save, and pick the model in the chat model picker.

For a published gateway, use your agent's base URL instead of the local address. See VS Code custom endpoint models for the file format.

Start with Chat Completions; the Responses and Messages types also work if your provider supports them. Don't put the gateway in VS Code's http.proxy setting.

Configure VS Code MCP tools​

  1. Create .vscode/mcp.json, or add this server to it. VS Code uses a servers key (Cursor uses mcpServers). The password input keeps the token out of the file:

    .vscode/mcp.json
    {
      "inputs": [
        {
          "type": "promptString",
          "id": "verdictan-token",
          "description": "Verdictan MCP client token",
          "password": true
        }
      ],
      "servers": {
        "verdictan": {
          "type": "http",
          "url": "https://<published-hostname>/mcp",
          "headers": {
            "Authorization": "Bearer ${input:verdictan-token}"
          }
        }
      }
    }
  2. Run MCP: List Servers and start verdictan.

  3. Enter the client API token when VS Code asks for it.

See the VS Code MCP guide for trust and organization settings.

Verify​

  1. MCP: in MCP: List Servers, check that verdictan lists tools. Ask Copilot to use history_search for the last ten minutes without changing anything, and read the result.

  2. Model requests: with the custom model selected, send Reply with Hello. Do not use tools or change files. and check for a reply.

  3. In a terminal, read the recent decision events:

    verdictan events tail --since 10m --event-type decision --json
  4. Check that a matching event appears. Delivery can take a few seconds, so run the command again if it is not there yet.

A working MCP tool proves tool access only. A decision event proves chat goes through the gateway. Inline suggestions never produce events.

Troubleshooting​

SymptomCauseFix
The MCP server does not startThe URL points to 127.0.0.1:41002 or an unpublished hostname. A local listener returns 404 with mcp_publication_required.Use the agent's published hostname.
401 from the MCP serverThe input was empty or is not a vdt_ tokenIn MCP: List Servers, restart the server and enter the token again.
Copilot Chat shows a connection errorhttp.proxy or a proxy variable points at the gateway, or the URL does not match the API typeRemove the proxy setting and use the full route for the API type you chose.
401 in Copilot ChatThe API key is the gateway runtime token or a provider keyEnter the client API token.
Chat events appear, but no inline suggestionsInline suggestions use GitHub servicesExpected. Only the custom chat model goes through the gateway.

For endpoint and event problems, see IDE Integration Troubleshooting.

Next steps​