Skip to main content

Connect Snowflake CoWork to the Knak MCP Server

Connect your Snowflake CoWork agent to the Knak Model Context Protocol (MCP) server. This lets your Snowflake agent access Knak through MCP.

Before You Begin

Make sure you have:

  • Access to your Snowflake account.

  • A Snowflake role with permission to use the required database.

  • Permission to create or use a schema.

  • Permission to create Application Programming Interface (API) integrations and external MCP servers.

  • Permission to create Snowflake Agents.

  • Access to Snowflake CoWork.

  • Access to your Knak account.

  • The Knak MCP server URL:

    • https://enterprise.knak.io/mcp/public

This feature is currently in Alpha Testing. Contact grace.lee@knak.com to request access.


Demo Video


Create the Knak MCP Server

Note: You must create the Knak MCP server with Snowflake Structured Query Language (SQL).

You cannot complete this part of the setup entirely from the Snowflake user interface (UI).

Create or Open an SQL File

  1. Open Snowflake.

  2. Select Projects.

  3. Select Workspaces.

  4. Open the workspace you want to use.

  5. Click Add New.

  6. Select SQL File.

    +Add New menu expanded with SQL file option visible.

Choose or Create Your Database and Schema

Choose the database and schema where you want to create the Knak MCP server.

You can use an existing schema. If the schema does not exist, create it directly in the same SQL script before you create the MCP server.

For example:

USE DATABASE KNAK_APP;  
CREATE SCHEMA IF NOT EXISTS MCP_TEST;
USE SCHEMA KNAK_APP.MCP_TEST;

Replace KNAK_APP with your database name. Replace MCP_TEST with the schema name you want to use.

You will use this database and schema again when you create your Snowflake Agent.

Make sure your Snowflake role has permission to use the database and create or use the schema.

Run the MCP Setup SQL

Use the following SQL to select your database, create your schema if needed, and create the Knak MCP server.

  1. Replace YOUR_DATABASE with your database name.

  2. Replace YOUR_SCHEMA with your schema name.

  3. Replace YOUR_ROLE with the Snowflake role that should have access to the MCP server.

  4. Confirm that your role has the required permissions.

  5. Add the following SQL to your SQL file:

    USE DATABASE KNAK_APP;
    CREATE SCHEMA IF NOT EXISTS MCP_TEST;
    USE SCHEMA KNAK_APP.MCP_TEST;

    SET KNAK_MCP_URL = 'https://enterprise.knak.io/mcp/public';

    CREATE API INTEGRATION KNAK_MCP_API_INTEGRATION1
    API_PROVIDER = external_mcp
    API_ALLOWED_PREFIXES = ($KNAK_MCP_URL)
    API_USER_AUTHENTICATION = (
    TYPE = OAUTH_DYNAMIC_CLIENT
    OAUTH_RESOURCE_URL=$KNAK_MCP_URL
    )
    ENABLED = TRUE;

    GRANT USAGE ON INTEGRATION KNAK_MCP_API_INTEGRATION TO ROLE KNAK_APP_USER;

    CREATE EXTERNAL MCP SERVER KNAK_APP.MCP_TEST.KNAK_MCP_SERVER
    WITH DISPLAY_NAME = 'Knak MCP Server'
    URL = 'https://enterprise.knak.io/mcp/public'
    API_INTEGRATION = KNAK_MCP_API_INTEGRATION;

    GRANT USAGE ON EXTERNAL MCP SERVER KNAK_MCP_SERVER TO ROLE KNAK_APP_USER;
  6. Click Run All.

Verify the MCP Server

Wait for the SQL statements to finish running.

Snowflake displays a confirmation message similar to:

MCP server KNAK_MCP_SERVER successfully created.

This confirms that your Knak MCP Server was created successfully.

Snowflake SQL worksheet showing the message "MCP server KNAK_MCP_SERVER successfully created."

Create a Snowflake Agent

Next, create the Snowflake Agent that you will use with the Knak MCP server.

  1. Select AI & ML in Snowflake.

  2. Select Agent Studio.

    Agent studio screen in Snowflake.
  3. Click Create Agent.

    Create agent button highlighted in the agent studio page.
  4. Select the database you used during the MCP setup.

  5. Select the schema you used during the MCP setup.

  6. Enter an object name for your Agent.

  7. Create the Agent.

    Create Agent screen with the database, schema, and object name fields.

Use a clear object name that helps you identify the Agent later.


Connect the Knak MCP Server in Snowflake CoWork

After you create your Agent and MCP server, connect Knak to Snowflake CoWork.

  1. Select AI & ML.

  2. Select Snowflake CoWork.

  3. Select Capabilities.

  4. Select MCP Connectors.

  5. Find Knak MCP Server.

  6. Click Connect.

    Connect button highlighted in the MCP connectors page in Snowflake.
  7. Complete the Knak authorization process when prompted.

Authorize Knak

Snowflake may open a Knak authorization screen.

  1. Sign in to Knak if prompted.

  2. Review the authorization request.

  3. Complete the authorization.

    Knak authorization screen
  4. Return to Snowflake CoWork.

  5. Confirm that the Knak MCP server shows as connected.

    Connected status after authorization

Note: If you are already signed in and authorized with Knak, Snowflake may skip some authorization steps.


Use the Knak MCP Server in a CoWork Chat

After authorization, make sure your Knak connector is available in your CoWork chat.

  1. Open a chat in Snowflake CoWork.

  2. Check that Knak MCP Server is selected as a connector.

  3. If you do not see it, click the + button in the prompt field.

  4. Select Connectors.

  5. Select Knak MCP Server.

You can now ask Snowflake CoWork questions that require information from your Knak account.

Test the Connection

Test the connection with a simple question about your Knak account.

For example: What brands are available in my Knak instance?

Snowflake CoWork sends the request through the Knak MCP server. It then uses the information available from your Knak account to answer your question.

If you receive information from your Knak account, your connection is working.


Troubleshooting

Knak MCP Server Does Not Appear

Make sure:

  • You created the MCP server successfully.

  • You selected the correct database and schema.

  • Your Snowflake role has permission to use the MCP server.

  • You completed the Knak authorization process.

Authorization Does Not Complete

Confirm that you have access to the Knak MCP Alpha Testing program.

Your connection will fail if MCP access has not been enabled for your Knak account.

The Connector Does Not Appear in Your Chat

Click the + button in the CoWork prompt field. Select Connectors, then select Knak MCP Server.


Need more help? Contact support via live chat using the chat bubble in the bottom right corner or email support@knak.com.

Did this answer your question?