DAX Formatter

The DAX Formatter MCP Server provides professional-grade DAX (Data Analysis Expressions) formatting capabilities.

It connects with the official DAX Formatter service by SQLBI and enables AI assistants and MCP clients to format DAX code.

Key Features

  • 🔧 Single DAX Expression Formatting: Clean up individual DAX expressions
  • 📚 Batch Processing: Format multiple DAX expressions in one request
  • 🎛️ Comprehensive Formatting Options: Control line length, spacing, and more
  • 🚨 Robust Error Handling: Get detailed error messages for troubleshooting
  • 🔄 Automatic Fallback: Switch to individual formatting if batch processing fails
  • 🏢 Database Context Support: Include anonymized database and server context

Use Cases

  • Data analysts refining complex DAX measures for Power BI reports
  • BI developers collaborating on large-scale data modeling projects
  • AI assistants helping users debug and optimize DAX queries
  • Automated code review systems checking DAX formatting consistency

How to Use It

1. Installation:

    • Download the latest release from the project’s GitHub page
    • Extract the archive to your preferred location
    • Note the path to the executable for configuration

    2. Configuration:

    For Claude Desktop:

      {
        "mcpServers": {
          "dax-formatter": {
            "command": "path/to/dax-formatter-mcp.exe",
            "args": []
          }
        }
      }

      For Continue IDE Extension:

      {
        "mcpServers": [
          {
            "name": "dax-formatter",
            "command": "path/to/dax-formatter-mcp.exe",
            "args": []
          }
        ]
      }

      3. Basic Usage:

        Format this DAX expression:
        CALCULATE(SUM(Sales[Amount]),FILTER(Products,Products[Category]="Electronics"))

        4. Multiple Expressions:

          Format these DAX measures:
          1. [Total Sales] := SUM(Sales[Amount])
          2. [Electronics Sales] := CALCULATE(SUM(Sales[Amount]),Products[Category]="Electronics")
          3. [Sales YTD] := TOTALYTD(SUM(Sales[Amount]),'Calendar'[Date])

          5. With Formatting Options:

            Format this DAX with short lines and specific separators:
            CALCULATE(SUM(Sales[Amount]),FILTER(Products,Products[Category]="Electronics"))
            Options:
            - Line length: ShortLine
            - List separator: ;
            - Decimal separator: ,

            6. Available Tools:

            • format_dax: Formats a single DAX expression
            • format_dax_multiple: Formats multiple DAX expressions in a single request

            7. Formatting Options:

            • maxLineLength: ShortLine, LongLine, VeryLongLine (default: LongLine)
            • skipSpaceAfterFunctionName: BestPractice, False (default: BestPractice)
            • listSeparator: Any character (default: ,)
            • decimalSeparator: Any character (default: .)
            • databaseName: String (optional)
            • serverName: String (optional)

            FAQs

            Q: Does the server store any DAX expressions?
            A: No, expressions are not stored locally. They are only sent to the official DAX Formatter service for processing.

            Q: How does the server handle sensitive information in DAX queries?
            A: Database and server names are anonymized by the DAX Formatter client to protect sensitive information.

            Latest MCP Servers

            CVE

            An MCP Server that connects Claude to 27 security tools for CVE triage, EPSS checks, KEV status, exploit lookup, and package scanning.

            WebMCP

            webmcp is an MCP server that connects MCP clients to web search, page fetching, and local LLM-based extraction. It’s ideal…

            Google Meta Ads GA4

            An MCP server that connects AI assistants to Google Ads, Meta Ads, and GA4 for reporting, edits, and cross-platform analysis.

            View More MCP Servers >>

            Featured MCP Servers

            Notion

            Notion's official MCP Server allows you to interact with Notion workspaces through the Notion API.

            Claude Peers

            An MCP server that enables Claude Code instances to discover each other and exchange messages instantly via a local broker daemon with SQLite persistence.

            Excalidraw

            Excalidraw's official MCP server that streams interactive hand-drawn diagrams to Claude, ChatGPT, and VS Code with smooth camera control and fullscreen editing.

            More Featured MCP Servers >>

            FAQs

            Q: What exactly is the Model Context Protocol (MCP)?

            A: MCP is an open standard, like a common language, that lets AI applications (clients) and external data sources or tools (servers) talk to each other. It helps AI models get the context (data, instructions, tools) they need from outside systems to give more accurate and relevant responses. Think of it as a universal adapter for AI connections.

            Q: How is MCP different from OpenAI's function calling or plugins?

            A: While OpenAI's tools allow models to use specific external functions, MCP is a broader, open standard. It covers not just tool use, but also providing structured data (Resources) and instruction templates (Prompts) as context. Being an open standard means it's not tied to one company's models or platform. OpenAI has even started adopting MCP in its Agents SDK.

            Q: Can I use MCP with frameworks like LangChain?

            A: Yes, MCP is designed to complement frameworks like LangChain or LlamaIndex. Instead of relying solely on custom connectors within these frameworks, you can use MCP as a standardized bridge to connect to various tools and data sources. There's potential for interoperability, like converting MCP tools into LangChain tools.

            Q: Why was MCP created? What problem does it solve?

            A: It was created because large language models often lack real-time information and connecting them to external data/tools required custom, complex integrations for each pair. MCP solves this by providing a standard way to connect, reducing development time, complexity, and cost, and enabling better interoperability between different AI models and tools.

            Q: Is MCP secure? What are the main risks?

            A: Security is a major consideration. While MCP includes principles like user consent and control, risks exist. These include potential server compromises leading to token theft, indirect prompt injection attacks, excessive permissions, context data leakage, session hijacking, and vulnerabilities in server implementations. Implementing robust security measures like OAuth 2.1, TLS, strict permissions, and monitoring is crucial.

            Q: Who is behind MCP?

            A: MCP was initially developed and open-sourced by Anthropic. However, it's an open standard with active contributions from the community, including companies like Microsoft and VMware Tanzu who maintain official SDKs.

            Get the latest & top AI tools sent directly to your email.

            Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!