Skip to navigation
Connect your agentDefDex in Claude Code

DefDex in Claude Code

Add the DefDex MCP server with one command.

1. Set your key

Create a key at app.defdex.io/developer/keys, then:

export DEFDEX_API_KEY="YOUR_API_KEY"

2. Add DefDex

claude mcp add --transport http defdex https://app.defdex.io/mcp \
--header "Authorization: Bearer $DEFDEX_API_KEY"

Use double quotes so your shell expands $DEFDEX_API_KEY. The name and URL come before --header. This saves the server for you only, outside your repository.

Share with your team

To add DefDex to a repository without committing a key, create .mcp.json at the project root. Claude Code fills ${DEFDEX_API_KEY} from each teammate’s environment:

.mcp.json
{
"mcpServers": {
"defdex": {
"type": "http",
"url": "https://app.defdex.io/mcp",
"headers": { "Authorization": "Bearer ${DEFDEX_API_KEY}" }
}
}
}

Don’t run claude mcp add --scope project with $DEFDEX_API_KEY: the shell expands it and the key would land in the committed file.

3. Verify

Start Claude Code and run /mcp. defdex should show as connected with tools such as search_records, get_entity and get_credit_balance. From your terminal, claude mcp list shows the same.

4. Try it

Use DefDex to find the programs the Space Development Agency runs and which companies hold awards on them.
Look up Palantir in DefDex and summarize its obligated DoD awards by fiscal year. Keep obligated and ceiling amounts separate.

Optional: add the skill

The DefDex skill teaches Claude when to reach for DefDex and how to keep dollar labels straight:

mkdir -p ~/.claude/skills/defdex
curl -fsSL https://defdex.io/skills/defdex/SKILL.md -o ~/.claude/skills/defdex/SKILL.md

Start a new session so Claude Code loads it.

Troubleshooting

  • 401 Unauthorized. The key wasn’t sent or was revoked. Check echo ${DEFDEX_API_KEY:0:8} prints a prefix, then remove and re-add the server: claude mcp remove defdex.
  • Two defdex servers. Remove one with claude mcp remove defdex --scope <scope> and start a new session.
  • 402 Payment Required. Your credits for this cycle are used up. See Credits and limits.
  • 429 Too Many Requests. Wait for the Retry-After seconds; all of your keys share one per-minute limit.

Never paste your key into the conversation.