> 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.

# Connect your agent

Every client connects to the same remote MCP server with the same API key:

|                 |                                         |
| --------------- | --------------------------------------- |
| **Server URL**  | `https://app.defdex.io/mcp`             |
| **Transport**   | Streamable HTTP                         |
| **Auth header** | `Authorization: Bearer $DEFDEX_API_KEY` |

> **Note**
>
> The server URL is a setting for your MCP client, not a page to open in a browser.

## Before you start

#### Create a key

Sign in at [app.defdex.io](https://app.defdex.io/sign-up) and open
[API keys](https://app.defdex.io/developer/keys). Read-only is enough for research agents.
The key is shown once; copy it then.

#### Put it in your environment

```bash
export DEFDEX_API_KEY="YOUR_API_KEY"
```

Add the line to your shell profile (`~/.zshrc`, `~/.bashrc`) or a private `.env` file.
Keeping the key in the environment keeps it out of chat transcripts, shell history and
committed config.

#### Add DefDex to your tool

Pick your client below.

## Pick your client

#### [Claude Code](/agents/claude-code)

One command in your terminal.

#### [Claude Desktop](/agents/claude-desktop)

Add DefDex to the desktop app's config.

#### [Codex](/agents/codex)

CLI command or `config.toml`.

#### [Cursor](/agents/cursor)

`mcp.json`, global or per project.

#### [VS Code and Copilot](/agents/vscode)

Prompts for the key once and stores it securely.

#### [Other MCP clients](/agents/other-clients)

Windsurf, OpenCode and any Streamable HTTP client.

#### [Agent skill](/agents/skill)

Teach your agent how to use DefDex well.

## Set up with an agent

Paste this into your coding agent and it will install DefDex itself:

```text
Set up DefDex for me (docs: https://docs.defdex.io/llms.txt).
1. Check that DEFDEX_API_KEY is set in my environment. If it isn't, stop and ask me to
   create a key at https://app.defdex.io/developer/keys and set it myself. Never ask me
   to paste the key into this chat.
2. Add the DefDex MCP server to this tool: Streamable HTTP at https://app.defdex.io/mcp,
   sending "Authorization: Bearer $DEFDEX_API_KEY" from the environment.
3. Save the DefDex skill from https://defdex.io/skills/defdex/SKILL.md where this tool
   loads skills or project instructions.
4. Verify by calling list_datasets and get_credit_balance, then tell me what you can do.
```

## Try it

Once connected, ask:

```text
Use DefDex to list Anduril's largest Department of Defense awards, with links to the source records.
```

```text
Which companies take part in the Space Development Agency's Proliferated Warfighter Space Architecture? Use DefDex and cite sources.
```

```text
Check my DefDex credit balance.
```

## What your agent gets

The server advertises the tools your key allows. See [MCP tools](/agents/data-mcp) for inputs and examples.

| Tool                                                            | What it does                                                                         |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `list_datasets`                                                 | Discover published datasets and their fields (free)                                  |
| `search_records`                                                | Search a dataset with text, filters and sorting                                      |
| `get_record`                                                    | Read one record by `record_id`                                                       |
| `get_entity`                                                    | Resolve a company, agency, program, technology or system by slug, UUID or identifier |
| `get_related_records`                                           | Read an entity's programs, participants, awards and other relationships              |
| `search_awards`, `get_award`                                    | Search and read contract awards                                                      |
| `get_credit_balance`                                            | Remaining credits and reset date (free)                                              |
| `submit_correction`, `list_my_corrections`, `get_my_correction` | Propose fixes for human review (keys with correction access)                         |