MCP Server for AI Agents

Connect AI agents to your Tether project using the Model Context Protocol. The Tether MCP server runs at `mcp.tthr.io` and exposes your project's database, functions, and documentation as MCP tools and resources.

What is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI agents to external data sources and tools. By connecting an AI agent to the Tether MCP server, the agent can:

  • Query and modify data in your Tether database
  • Execute your deployed functions (queries, mutations, actions)
  • Browse your schema and table definitions
  • Access Tether documentation for context

Connecting your agent

Claude Desktop

Add this to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "tether": {
      "url": "https://mcp.tthr.io/mcp",
      "headers": {
        "x-tether-url": "https://tether-api.strands.gg",
        "x-tether-project-id": "your-project-id",
        "x-tether-api-key": "tthr_prod_your_key",
        "x-tether-environment": "production"
      }
    }
  }
}

Claude Code

claude mcp add tether --transport streamable-http \
  --url "https://mcp.tthr.io/mcp" \
  --header "x-tether-url: https://tether-api.strands.gg" \
  --header "x-tether-project-id: your-project-id" \
  --header "x-tether-api-key: tthr_prod_your_key" \
  --header "x-tether-environment: production"

Other MCP clients

The server uses the Streamable HTTP transport at https://mcp.tthr.io/mcp. Pass your project credentials via HTTP headers:

Header Description Required
x-tether-url Tether API URL Yes
x-tether-project-id Your project ID Yes
x-tether-api-key Secret API key (tthr_prod_ or tthr_dev_) Yes
x-tether-environment Environment name (defaults to production) No

Available tools

Schema & introspection

Tool Description
tether_list_tables List all tables with their column definitions
tether_get_table_schema Get the full schema for a specific table

Reading data

Tool Description
tether_query Execute a deployed query function
tether_find_many Read rows with filtering, sorting, and pagination
tether_find_by_id Get a single row by its primary key
tether_count Count rows with optional filtering

Writing data

Tool Description
tether_mutation Execute a deployed mutation function
tether_insert_row Insert a new row directly into a table
tether_update_row Update a row by its ID
tether_delete_row Delete a row by its ID

Functions

Tool Description
tether_list_functions List all deployed functions with their argument schemas
tether_exec Execute an action function

Operational

Tool Description
tether_list_logs View recent execution logs

Available resources

The MCP server exposes Tether documentation as resources that agents can read for context:

  • tether://docs/overview — Introduction to Tether
  • tether://docs/schema — Schema definition guide
  • tether://docs/database — Database API reference
  • tether://docs/functions — Functions guide
  • tether://docs/subscriptions — Realtime subscriptions
  • tether://docs/storage — File storage
  • tether://docs/sdk/vue — Vue/Nuxt SDK
  • tether://docs/sdk/react — React SDK
  • tether://docs/sdk/vanilla — Vanilla JavaScript SDK

Authentication

All tools require a secret API key (tthr_dev_ or tthr_prod_). Publishable keys are not supported — the MCP server is designed for server-to-server access where the AI agent has full project access.

You can find your API key in the Tether dashboard under Settings → API Keys.

Environment targeting

By default, tools operate against the production environment. To target a different environment (e.g. development, staging), set the x-tether-environment header or pass the environment parameter to each tool call.

Example workflows

Data exploration

An AI agent can explore your database by:

  1. Calling tether_list_tables to discover available tables
  2. Calling tether_get_table_schema to understand column types
  3. Using tether_find_many to browse data with filters
  4. Using tether_count for summary statistics

Executing business logic

For operations that go through your validation and access control:

  1. Call tether_list_functions to discover available queries and mutations
  2. Use tether_query to read data through your custom functions
  3. Use tether_mutation to modify data through your custom functions
  4. Use tether_exec for actions with side effects (emails, payments, etc.)

Debugging

When investigating issues:

  1. Call tether_list_logs to view recent execution logs
  2. Filter by function name to narrow down the problem
  3. Check error messages and execution durations

Self-hosting

The MCP server is included in the Tether repository and can be self-hosted:

cd apps/mcp
npm install
npm run build
npm start

Or with Docker:

docker build -t tether-mcp -f apps/mcp/Dockerfile .
docker run -p 3100:3100 tether-mcp

Set DOCS_DIR to point to your shared docs directory if it differs from the default.