domo-mcp-server

domo-mcp-server

2

Domo MCP Server is designed to facilitate interaction with the Domo API using the Model Context Protocol. It allows users to perform operations on Domo DataSets, such as querying, searching, and retrieving metadata, enhancing data management capabilities through natural language processing.

Domo MCP Server

A Model Context Protocol (MCP) server that connects to Domo API.

Tools

  • Run SQL queries on Domo DataSets
  • Search for DataSets by name
  • Get the metadata of Domo DataSets
  • Get the schema of Domo DataSets

Prerequisites

  • Python 3.11+ OR Docker
  • Visual Studio Code
  • Domo instance with:
    • Developer access token
    • Access to datasets to query

Setup

Local Python Setup

  1. Clone this repository
  2. Navigate to the cloned directory
  3. Install the required packages:
    pip install -r requirements.txt
    
  4. Add configuration to your VS Code settings:
    {
      "name": "Domo MCP Server",
      "type": "stdio",
      "command": "python",
      "args": ["-m", "domo_mcp"],
      "env": {
        "PYTHONPATH": "${workspaceFolder}",
        "DOMO_DEVELOPER_TOKEN": "<your_domo_developer_token>",
        "DOMO_HOST": "<instance-name.domo.com>"
      }
    }
    
  5. Ensure the server is running

Local Docker Setup

  1. Clone this repository
  2. Navigate to the cloned directory
  3. Build the Docker image:
     docker build -t domo-mcp-server .
    
  4. Add configuration to your VS Code settings:
       "domo-mcp": {
         "command": "docker",
         "args": [
           "run",
           "-i",
           "-e",
           "DOMO_DEVELOPER_TOKEN",
           "-e",
           "DOMO_HOST",
           "domo-mcp-server"
         ],
         "env": {
           "DOMO_DEVELOPER_TOKEN": "<domo_developer_token>",
           "DOMO_HOST": "<instance-name.domo.com>"
         }
       }
    

Obtaining a Domo Developer Token

Follow these steps to generate an access token.

Running the Server

Start the MCP server:

python domo.py

You can test the MCP server using the inspector by running

npx @modelcontextprotocol/inspector python3 domo.py

Available MCP Tools

The following MCP tools are available:

  1. get_dataset_metadata(dataset_id: str) - Get metadata for a DataSet
  2. get_dataset_schema(dataset_id: str) - Get the schema for a DataSet
  3. query_dataset(dataset_id: str, query: str) - Query a DataSet with SQL
  4. search_datasets(query: str) - Search for a DataSet by name to get its id
  5. list_roles() - List all roles in the Domo instance
  6. create_role(name: str, from_role_id: int, description: Optional[str]) - Create a new role in the Domo instance
  7. list_role_authorities(role_id: int) - List authorities for a specific role in the Domo instance

Example Usage with LLMs

When used with LLMs that support the MCP protocol, this server enables natural language interaction with your Domo environment:

  • "How many orders in my Example Sales dataset have critical priority?"
  • "Who owns the Customer Invoice dataset?"
  • "Show me the logs for the last 3 hours in my Activity Log dataset."

Troubleshooting

Connection Issues

  • Ensure your Domo host is correct and doesn't include https:// prefix
  • Verify your personal access token has the necessary permissions and hasn't expired
  • Run the included test script: python test_connection.py

Security Considerations

  • Your Domo developer token provides direct access to your instance
  • Secure your .env file and never commit it to version control
  • Run this server in a secure environment