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 Tethertether://docs/schema— Schema definition guidetether://docs/database— Database API referencetether://docs/functions— Functions guidetether://docs/subscriptions— Realtime subscriptionstether://docs/storage— File storagetether://docs/sdk/vue— Vue/Nuxt SDKtether://docs/sdk/react— React SDKtether://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:
- Calling
tether_list_tablesto discover available tables - Calling
tether_get_table_schemato understand column types - Using
tether_find_manyto browse data with filters - Using
tether_countfor summary statistics
Executing business logic
For operations that go through your validation and access control:
- Call
tether_list_functionsto discover available queries and mutations - Use
tether_queryto read data through your custom functions - Use
tether_mutationto modify data through your custom functions - Use
tether_execfor actions with side effects (emails, payments, etc.)
Debugging
When investigating issues:
- Call
tether_list_logsto view recent execution logs - Filter by function name to narrow down the problem
- 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.