Setup & Registration
The MCP server is bundled inside the Metatate Native App. Registration creates the canonical MCP server object, grants access to the app roles, and wires the tool layer to your governance tables. The same deployment also creates the core.agent_* wrapper layer used by Snowflake Intelligence custom tools.
Prerequisites
Before registering the MCP server, ensure:
- Metatate is installed -- The Native App (
METATATE_APP) must be installed and the backend service running. - APP_WAREHOUSE reference is configured -- The MCP server needs a warehouse to execute procedure-based tools (
authorize-use,validate-query-context,explain-why). Bind theAPP_WAREHOUSEreference in the Snowflake UI or via SQL:
ALTER APPLICATION METATATE_APP
SET REFERENCES = ('APP_WAREHOUSE' = '<your_warehouse>');
- At least one policy is deployed -- The governance tables must contain data. Deploy a policy through the Metatate UI or API before testing the MCP tools.
Registration
Automatic (Recommended)
The MCP server is automatically registered when you run the initialization procedure:
CALL METATATE_APP.v1.init();
init() calls register_mcp_server() internally after configuring schema objects and governance tables. It also runs automatically when the APP_WAREHOUSE reference is first configured.
Manual
If you need to re-register the MCP server (e.g., after a schema change or troubleshooting), call it directly:
CALL METATATE_APP.v1.register_mcp_server();
This is idempotent -- calling it multiple times is safe. It will drop and recreate the MCP server object if it already exists.
What Registration Creates
Registration creates the following objects in the core schema:
| Object | Type | Description |
|---|---|---|
core.metatate_mcp | MCP Server | Canonical Metatate machine interface |
core.discover_context | Function | Searches governed tables with optional filters |
core.get_decision_context | Function | Returns full governance context for a table |
core.inspect_data_meaning | Function | Returns column-level governance detail |
core.authorize_use | Procedure | Evaluates an authorization request against policies |
core.validate_query_context | Procedure | Analyzes SQL for governance compliance |
core.explain_why | Procedure | Retrieves audit trail for a past decision |
core.agent_* | Functions / Procedures | Snowflake Intelligence-friendly wrappers with scalar parameters |
Grants
Registration grants USAGE on the MCP server and USAGE/EXECUTE on the underlying functions and procedures to both app roles:
app_admin-- Full access to all toolsapp_user-- Full access to all tools (governance is data-driven, not role-gated at the tool level)
Verifying Registration
Check the MCP Server Exists
USE APPLICATION METATATE_APP;
SHOW MCP SERVERS IN SCHEMA CORE;
Expected output: one row for METATATE_MCP.
Check the Tools
SHOW FUNCTIONS IN SCHEMA METATATE_APP.CORE;
SHOW PROCEDURES IN SCHEMA METATATE_APP.CORE;
You should see the six tool objects listed in the table above.
Test a Tool Directly
The fastest way to verify the MCP server is working is to call a function directly:
-- Discover all governed tables (no filters)
SELECT METATATE_APP.CORE.DISCOVER_CONTEXT(
OBJECT_CONSTRUCT()
);
Expected: A JSON object with status: "success" and a data array containing your governed tables.
-- Get governance context for a specific table
SELECT METATATE_APP.CORE.GET_DECISION_CONTEXT(
OBJECT_CONSTRUCT('table_name', 'MY_DB.MY_SCHEMA.CUSTOMERS')
);
Test the Snowflake Intelligence wrapper pattern
You can validate the Snowflake Intelligence adapter layer directly in SQL before wiring it into an agent:
SELECT METATATE_APP.CORE.AGENT_GET_DECISION_CONTEXT('MY_DB.MY_SCHEMA.CUSTOMERS');
This should return the same JSON payload as the canonical GET_DECISION_CONTEXT tool.
In-App Testing
Metatate includes a Test Tools tab in the application UI. This provides a graphical interface to:
- Browse all six tools and their input schemas
- Fill in parameters with form fields
- Execute tools and view formatted JSON responses
- Compare canonical tool payloads with the Snowflake Intelligence wrapper behavior
This is the easiest way to explore the canonical MCP layer without writing SQL or configuring a Snowflake Intelligence agent first.
Wrapper regression script
To validate the full Snowflake Intelligence adapter layer against a deployed app, run:
snow sql -f scripts/test_snowflake_intelligence_tools.sql
That script seeds acceptance-style governance fixtures, executes all six core.agent_* wrappers, and cleans up the test data afterward.
Unregistering
To remove the MCP server (e.g., before uninstalling):
USE APPLICATION METATATE_APP;
DROP MCP SERVER IF EXISTS CORE.METATATE_MCP;
The underlying functions and procedures will remain. Re-run register_mcp_server() to recreate the server object.
Next Steps
- Tool Reference -- Detailed documentation for each canonical tool
- Snowflake Intelligence -- Build an Intelligence agent using the
core.agent_*wrappers