# Connect an agent (MCP)

Connect Claude, ChatGPT, Codex, or another capable MCP client to search Danish
companies and people, inspect timelines and ownership, or run advanced SQL
queries against the entire Datapublica database.

## Before you start

- Authentication opens Datapublica in your browser.
- The MCP server URL is `https://mcp.datapublica.dk/mcp`.
- Queries run on [DuckDB](https://duckdb.org/docs/stable/sql/introduction), so use DuckDB SQL syntax and functions.

## Claude Cowork and Claude Desktop

Go to **Customize > Connectors**, select the **Add** button, then choose
**Add custom connector**. Enter `Datapublica` as the name, paste
`https://mcp.datapublica.dk/mcp` into **MCP server URL**, leave the other settings
unchanged, select **Add**, and complete authentication in your browser.

## ChatGPT

In **Settings > Security and login**, enable **Developer mode**. Open
**ChatGPT Plugins**, select the plus button, enter
`Datapublica` as the name and a description, then add `https://mcp.datapublica.dk/mcp` as
the public MCP server URL under **Connection**. Create the connection, review
the discovered tools, and complete authentication in your browser.

This requires a paid ChatGPT account. On Business and Enterprise workspaces, an
administrator may need to permit custom apps first.

## Claude Code

```bash
claude mcp add --transport http --scope user datapublica https://mcp.datapublica.dk/mcp
```

Open Claude Code, run `/mcp`, choose `datapublica`, and authenticate in your
browser. Confirm the connection with:

```bash
claude mcp list
```

## Codex Desktop

Open **Settings > Plugins**, then select **Add > Add MCP server**. Enter
`Datapublica` as the **Name**, set **Type** to **Streamable HTTP**, paste
`https://mcp.datapublica.dk/mcp` into **URL**, leave **Bearer token env var**, **Headers**,
and **Headers from environment variables** unchanged, select **Save**, and
complete authentication in your browser.

## Codex CLI

Add this server to `~/.codex/config.toml`:

```toml
[mcp_servers.datapublica]
url = "https://mcp.datapublica.dk/mcp"
tool_timeout_sec = 60
```

Then authenticate and confirm the connection:

```bash
codex mcp login datapublica
codex mcp list
```

## Try it

```prompt
Check the Datapublica profile of THE COFFEE COLLECTIVE A/S and summarize the financials.
```

```prompt
Use Datapublica to find the top 10 companies with the highest revenue in Roskilde, do web research about each of them, and make a slide deck presenting each company. Use one slide per company to present what it does and its key financials.
```

```prompt
Look up all my customers from customers.csv on Datapublica to check which industry code they are registered under, then query Datapublica to find other same-sized companies within the same industry.
```
