> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.defdex.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.defdex.io/_mcp/server.

# DefDex in VS Code and Copilot

## 1. Add DefDex

Create `.vscode/mcp.json` in your project (or run **MCP: Add Server** from the command palette):

**`.vscode/mcp.json`**

```json title=".vscode/mcp.json"
{
  "inputs": [
    { "type": "promptString", "id": "defdex-key", "description": "DefDex API key", "password": true }
  ],
  "servers": {
    "defdex": {
      "type": "http",
      "url": "https://app.defdex.io/mcp",
      "headers": { "Authorization": "Bearer ${input:defdex-key}" }
    }
  }
}
```

The first time the server starts, VS Code asks for the key and keeps it in its secret
storage. The file holds no secret, so it's safe to commit.

## 2. Verify

Open Copilot Chat in **Agent** mode and select the tools icon. DefDex's tools are listed
under `defdex`.

## 3. Try it

```text
Use DefDex: which DoD offices awarded the most to Shield AI, and for what?
```