# Setting up tools

[Running Frags Locally](/content/docs/guides/frags-runtime-locally#configuration-files/index.html) describes what `tools.json` is — `mcpServers` and `collections`, and how `token.json` stores OAuth credentials. This guide is the other half: the concrete, repeatable steps for adding **one new connection** to your local setup before you ever reference it from a blueprint.

We'll walk through setting up an OAuth MCP server (Slack) end-to-end, then show the same steps for a collection (Postgres).

## Prerequisites

- The Frags CLI installed and `.env` configured — see [Running Frags Locally](/content/docs/guides/frags-runtime-locally/index.html).
- Credentials for whatever you're connecting: an MCP server URL (plus OAuth client id/secret if it requires auth), or a database connection string.

## Add an MCP server (worked example: Slack)

Open `tools.json` in your working directory (create it if it doesn't exist yet) and add an entry under `mcpServers`:

```json
{
  "mcpServers": {
    "slack": {
      "url": "https://<tenant>.platform.barndoor.ai/mcp/slack-user",
      "disabled": false,
      "client_id": "<client-id>",
      "client_secret": "<client-secret>"
    }
  }
}
```

Set `disabled: false`. Include `client_id`/`client_secret` if the server requires OAuth — most hosted MCP servers do; a few (like a local filesystem server) don't need either.

Trigger the authorization flow. The first time a blueprint calls this server, Frags walks you through OAuth and, once you approve it, stores the resulting tokens in `token.json` under a hash of the connection:

```json
{
  "items": {
    "1883918e…": {
      "host": "https://<tenant>.platform.barndoor.ai/mcp/slack-user",
      "client_id": "<oauth-client-id>",
      "access_token": "eyJ0eXAi…redacted",
      "refresh_token": "eyJhbG…redacted",
      "expiry": "2026-06-02T18:17:15-04:00"
    }
  }
}
```

## Add a collection (worked example: Postgres)

Collections are the built-in connector types — `fs`, `http`, `postgres` — declared under `collections` instead of `mcpServers`.

```json
{
  "collections": {
    "postgres": {
      "disabled": false,
      "params": {
        "postgres_url": "postgresql://<user>:<password>@<host>.neon.tech/neondb?sslmode=require&channel_binding=require"
      }
    }
  }
}
```

There's no OAuth step here — a collection authenticates with whatever you put in `params` directly (a connection string for `postgres`; nothing at all for `fs` or `http`).

## Using the connection in a blueprint

Everything above only makes a tool _reachable_. Pulling it into a blueprint is its own topic. See [Connect Frags to your data](/content/docs/guides/call-tools-from-a-plan/index.html).

## Next steps

- Full `tools.json` field reference: [Configuration files](/content/docs/guides/frags-runtime-locally#configuration-files/index.html) in Running Frags Locally.
- Wire the connection into a blueprint: [Connect Frags to your data](/content/docs/guides/call-tools-from-a-plan/index.html).
- Browse worked blueprints that already use these connections in the [blueprint marketplace](/content/blueprints/index.html).
