Overview
Oxy’s MCP server exposes your data resources as tools that can be called by AI assistants and other MCP clients. This enables seamless integration between your structured data operations and conversational AI interfaces.Starting the MCP Server
Oxy supports two transport options for the MCP server:SSE (Server-Sent Events)
To run the MCP SSE server use theoxy mcp sse command:
Stdio
Start the server with stdio transport:Configuring Resource Exposure
By default, Oxy exposes all agents and workflows in your project as MCP tools. You can customize which resources are exposed by adding anmcp section to your config.yml:
- Direct file paths:
agents/my-agent.agent.yml - Glob patterns:
agents/*.agent.yml,semantics/**/*.topic.yml - Multiple resource types in a single configuration
- When
mcp.toolsis defined: Only specified resources are exposed - When
mcp.toolsis omitted: All agents and workflows are exposed by default - Empty
mcp.toolslist: No tools are exposed
Resource Types
Agents
Agents are exposed as MCP tools that answer questions using context from your data. Tool naming:agent-{agent_name}
Input schema:
Workflows
Workflows are exposed as MCP tools with dynamic input schemas based on their variable definitions. Tool naming:workflow-{workflow_name}
Input schema: Dynamically generated from workflow variables
Example:
SQL Files
SQL files (.sql) can be exposed as executable tools.
Tool naming: sql-{filename_without_extension}
Input schema:
Semantic Topics
Semantic topics from your semantic layer can be exposed as structured query tools. Tool naming:semantic-{topic_name}
Input schema:
Advanced Features
Session Filters
Session filters enable row-level security and data filtering across all tool types. They are passed via the_meta parameter according to the MCP specification.
Example:
- Filters are validated against your project’s filter schema (defined in
config.yml) - Invalid filter keys or types return errors before execution
- Missing required filters cause validation errors
- Missing optional filters use schema defaults
- Filters apply to all data operations within the tool execution
Connection Overrides
Connection overrides allow runtime modification of database connection parameters for multi-tenant applications or dynamic routing. Example:Variables via Meta
Variables can be passed via_meta and are merged with tool arguments using a defined precedence order.
Merging order (later overrides earlier):
- Default values from tool definition
- Variables from tool arguments
- Variables from
_meta["variables"]