Setting up tools | Diaphora Docs | Diaphora
Setting up tools
Running Frags Locally 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
.envconfigured — see Running Frags Locally. - 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:
{
"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:
{
"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.
{
"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.
Next steps
- Full
tools.jsonfield reference: Configuration files in Running Frags Locally. - Wire the connection into a blueprint: Connect Frags to your data.
- Browse worked blueprints that already use these connections in the blueprint marketplace.