Skip to main content

MCP server

The Snowplow CLI includes a local Model Context Protocol (MCP) server that enables natural language interaction with AI assistants for creating, validating, and managing your Snowplow tracking plans. This allows you to:

  • Create and validate data structures through conversation
  • Analyze tracking requirements and suggest implementations
  • Validate data products and source applications
Read more

For a step-by-step guide to using the Snowplow MCP server, see the MCP tutorial.

The MCP server allows AI assistants to interact with the Snowplow CLI using the snowplow-cli mcp command.

Install the MCP server#

The MCP server is included with Snowplow CLI. Start by installing the CLI and authenticating to your Snowplow account.

To connect your AI client to the MCP server, provide a configuration object. The exact structure depends which client you are using, and whether you're connecting to the Snowplow CLI installed locally or via npx. For example:

Add the following to your Claude Desktop configuration file, found at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

For direct Snowplow CLI connection:

json
{
"mcpServers": {
"snowplow-cli": {
"command": "snowplow-cli",
"args": ["mcp"]
}
}
}

Using npx:

json
{
"mcpServers": {
"snowplow-cli": {
"command": "npx",
"args": ["-y", "@snowplow/snowplow-cli", "mcp"]
}
}
}
Filesystem access

Claude Desktop requires additional filesystem access to create and modify files.

After adding the configuration, restart the client. The Snowplow CLI MCP tools should be available for use.

Provided tools#

The Snowplow CLI MCP server provides these tools to your AI assistant:

  • get_context: to call at the start of each conversation, this tool retrieves the underlying Snowplow rules that define how Snowplow components should be structured
  • get_uuid: generates valid v4 UUIDs that are required by many Snowplow components
  • validate_data_structures: the assistant will use this validation tool after creating or modifying any data structure.
  • validate_data_products: the assistant will use this validation tool after creating or modifying any data product or source application file

The get_context tool is the only one you might need to call manually.

Using the tools#

To get AI support with your Snowplow tracking plans, start a new conversation and ask the assistant to call get_context. It might call this tool automatically if it realises it needs the Snowplow knowledge.

You can then ask it for help. It has access to your existing data structures, data products, or source application definitions. The assistant will automatically validate any file changes using the included validation tools.

Use the standard Snowplow CLI commands to publish your changes to Console when ready, using the standard Snowplow CLI commands such as snowplow-cli ds publish.

Publish separately

The MCP server creates and validates files on your local filesystem only.

On this page

Want to see a custom demo?

Our technical experts are here to help.