Skip to main content

Overview

This guide provides configuration instructions for connecting various Model Context Protocol clients to the Timbr MCP Server.

IMPORTANT

The Timbr MCP Server is deployed as part of the Timbr API Service. Ensure it is deployed in your environment before using it.

Authentication

You can connect to the MCP server using your Timbr token (x-api-key) or OAuth which needs to be pre-configured in your Timbr API Service

Setting up OAuth with MCP Server

Please follow this guide to set-up OAuth for the MCP server.

Supported Clients

The following clients have been tested with the Timbr MCP Server:

Server Information

PropertyValue
Server Nametimbr
TransportHTTP (Streamable HTTP)
Base URLhttps://<your-timbr-server>/timbr/api/mcp/
Health Checkhttps://<your-timbr-server>/timbr/api/mcp/health

Authentication

All connections require an API key passed via the x-api-key header:

HeaderDescriptionRequired
x-api-keyTimbr API token (prefix tk_)Yes
x-agentTarget agent nameNo (if default configured or ontology specified)
x-ontologyTarget ontology nameNo (if agent specified or default configured)

Available Tools

AI Query Tools

These tools use an LLM to translate natural language into SQL queries.

ToolDescriptionKey Parameters
query_dataExecute natural language queries, return data rowsprompt, max_limit, concepts_list
ask_questionGet natural language answers from your dataprompt, note, show_result_set
generate_sqlGenerate SQL from natural language without executionprompt, db_is_case_sensitive
identify_conceptFind the most relevant concept for a questionprompt, include_tags

Metadata & Exploration Tools

These tools provide direct access to knowledge graph metadata and SQL execution without requiring an LLM.

ToolDescriptionKey Parameters
execute_sqlExecute a raw Timbr SQL query on a knowledge graphquery, ontology, datasource, max_results
list_ontologiesList all available knowledge graphsmax_results
list_agentsList all available pre-configured agentsmax_results
list_datasourcesList datasources (all, or filtered by knowledge graph)ontology, max_results
describe_knowledge_graphGet structural metadata: concepts, properties, relationships, views, mappings, datasources, and jobsontology, include, max_results
Typical AI Agent Workflow

An AI agent can chain these tools together for effective data exploration:

  1. list_ontologies - discover available knowledge graphs
  2. describe_knowledge_graph - explore the schema (properties, relationships, views)
  3. generate_sql or query_data - query the data using natural language
  4. execute_sql - run or refine generated SQL directly

describe_knowledge_graph Sections

The include parameter controls which metadata sections are returned. If omitted, the default sections are: ontology, properties, relationships, views.

SectionDescriptionSQL Equivalent
ontologyKnowledge graph overviewSHOW ONTOLOGY
propertiesAll concept propertiesSELECT * FROM timbr.SYS_PROPERTIES
relationshipsConcept relationshipsSELECT * FROM timbr.SYS_CONCEPT_RELATIONSHIPS
viewsAvailable views (non-cube)SELECT * FROM timbr.SYS_VIEWS
mappingsSource mappingsSELECT * FROM timbr.SYS_MAPPINGS
datasourcesAvailable datasourcesSHOW DATASOURCES
jobsScheduled jobsSELECT * FROM timbr.SYS_JOBS

max_results Limit

All metadata and exploration tools accept an optional max_results parameter. This value is capped at the server's configured ROW_LIMIT (default: 3000). If max_results exceeds ROW_LIMIT, the server limit is used instead.

Common Configuration Options

Environment Variables

These can be set on the Timbr server to configure default behavior:

VariableDescriptionDefault
MCP_DEFAULT_ONTOLOGYDefault ontology when not specifiedNone
MCP_CORS_ORIGINSAllowed CORS origins*
MCP_DEBUGEnable debug loggingfalse
ROW_LIMITMaximum rows returned by metadata/exploration tools3000

Tool-Specific Parameters

When calling AI query tools, you can pass these optional parameters:

ParameterApplicable ToolsDescription
ontologyAll AI query toolsOverride default ontology
verboseAll AI query toolsReturn full metadata (default: false)
concepts_listAll AI query toolsLimit to specific concepts
views_listquery_data, ask_question, generate_sqlLimit to specific views
include_tagsAll except generate_sqlFilter by tags
max_limitquery_data, ask_questionMax rows to return (default: 500)
noteask_questionAdditional context for the LLM

General Configuration

For any MCP-compatible client, use the following configuration template:

{
"mcpServers": {
"timbr": {
"transport": "http",
"url": "https://<your-timbr-server>/timbr/api/mcp/",
"headers": {
"x-api-key": "<your-api-key>",
"x-agent": "<agent-name>"
}
}
}
}

SSE Transport (Alternative)

In this example we use x-ontology which can also be used instead of x-agent

{
"mcpServers": {
"timbr": {
"transport": "sse",
"url": "https://<your-timbr-server>/timbr/api/mcp/sse",
"headers": {
"x-api-key": "<your-api-key>",
"x-ontology": "<your-ontology>"
}
}
}
}

Testing with curl

Verify your connection:

# Health check (no auth required)
curl https://<your-timbr-server>/timbr/api/mcp/health

# Initialize connection
curl -X POST https://<your-timbr-server>/timbr/api/mcp/ \
-H "Content-Type: application/json" \
-H "x-api-key: tk_your_api_key" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {}
}
}'

# List available tools
curl -X POST https://<your-timbr-server>/timbr/api/mcp/ \
-H "Content-Type: application/json" \
-H "x-api-key: tk_your_api_key" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
}'

# Execute a query
curl -X POST https://<your-timbr-server>/timbr/api/mcp/ \
-H "Content-Type: application/json" \
-H "x-api-key: tk_your_api_key" \
-H "x-ontology: my_ontology" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "query_data",
"arguments": {
"prompt": "Show all customers",
"max_limit": 10
}
}
}'

Client-Specific Notes

Microsoft Copilot Studio

Copilot Studio has specific requirements and limitations when connecting to MCP servers:

  • Streamable HTTP only - SSE transport is not supported (deprecated after August 2025)
  • OAuth with DCR - requires MCP_OAUTH_DCR_ENABLED to be true (it is by default) with MCP_OAUTH_CLIENT_ID and MCP_OAUTH_CLIENT_SECRET configured on the server
  • Tool inputs - Copilot Studio does not expose individual MCP tool inputSchema parameters in the UI. To set defaults like x-agent or x-ontology, edit the connector in Power Apps after creation
  • Schema limitations - tools with $ref type inputs are filtered out; exclusiveMinimum must be a boolean, not an integer

For detailed setup instructions, see the Copilot Studio section in the OAuth guide.

Troubleshooting

Connection Issues

IssueSolution
Connection refusedVerify server URL and that Timbr API is running
401 UnauthorizedCheck API key is correct and starts with tk_
403 ForbiddenVerify API key has access to the specified ontology
Ontology not foundSet x-ontology header or MCP_DEFAULT_ONTOLOGY on server

Common Errors

ErrorCauseSolution
"LLM type is required"Server LLM not configuredConfigure LLM settings on Timbr server
"Invalid JSON-RPC"Malformed requestCheck request body format