This article describes a third step of Connecting to Snowflake MCP Server. Set up and run the MCP Server locally on the same machine where the application is running or remotely on a separate server or cloud platform.
Prerequisites:
- Server space to run the MCP Server. Minimal specifications: 256MB RAM and 1 vCPU.
- Data, copied from Snowflake account.
Set Up the MCP Server
After choosing the platform:
1. Clone this repository:
git clone git@github.com:metricinsights/snowflake-cortex-mcp-server.git
2. Copy [config.example.py](https://github.com/metricinsights/snowflake-cortex-mcp-server/blob/main/config.example.py) to config.py folder and fill in the Snowflake account values.
Those values were gathered in Snowflake account.
3. Run the service via docker:
docker-compose up -d
Config Example
In this example three Agents are created: "CUSTOMER_SUPPORT", "INVENTORY", and "RETAIL_SALES". In your case those can be different in number and names.
_defaults = Config(
account="TTXXXXX.us-east-2.aws",
database="SNOWFLAKE_INTELLIGENCE",
schema="AGENTS",
token="<TOKEN>",
)
agent_configs = {
"CUSTOMER_SUPPORT": Config(agent="CUSTOMER_SUPPORT", defaults=_defaults),
"INVENTORY": Config(agent="INVENTORY", defaults=_defaults),
"RETAIL_SALES": Config(agent="RETAIL_SALES", defaults=_defaults), }
NOTE: In the config example the Token is hardcoded into the server configuration. To prevent security risks, it is recommended to protect the server with a firewall.