ED

emanuelemeazzo/dax-formatter-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

33 stars 4 forks 质量 47 趋势 11

一个MCP服务器,用于使用带有AI代理的SQLBI DAX Formatter。

概览

一款模型上下文协议(MCP)服务器,为AI助手和其他MCP客户端提供DAX(数据分析表达式)格式化功能。该服务器与SQLBI官方DAX Formatter服务集成,提供专业级DAX代码格式化。 - : 采用专业标准格式化单个DAX表达式 - : 在单一高效请求中格式化多个DAX表达式 - 控制行长、间距、分隔符等 - : 强健的错误处理,包含详细的错误消息 - : 批量处理失败时自动回退到单独格式化 - : 支持数据库和服务器上下文(为隐私匿名) - .NET 8.0 运行时及以上版本 - 互联网连接(与 daxformatter.com 通信) - 兼容 MCP 客户端(Claude 桌面、Continue 或自定义 MCP 客户端) 1. 从发布页面下载最新版本 2.将归档解压到您偏好的位置 3.

概述(AI 翻译)

一款模型上下文协议(MCP)服务器,为AI助手和其他MCP客户端提供DAX(数据分析表达式)格式化功能。该服务器与SQLBI官方DAX Formatter服务集成,提供专业级DAX代码格式化。

🚀 特色

  • 单一DAX表达式格式化:采用专业标准格式化单个DAX表达式
  • 批处理:在单一高效请求中格式化多个DAX表达式
  • 全面的格式化选项:控制行长、间距、分隔符等
  • 错误处理:带有详细错误信息的稳健错误处理
  • 缓冲机制:批处理失败时自动回退到单独格式化
  • 数据库上下文:支持数据库和服务器上下文(为隐私匿名)

📋 先修条件

  • .NET 8.0 运行时及更高版本
  • 互联网连接(与 daxformatter.com 通信)
  • 兼容MCP客户端(Claude桌面、Continue或自定义MCP客户端)

🛠️ 安装

选项1:下载发布(推荐)

  1. 从发布页面下载最新发布
  2. 将归档解压到你偏好的位置

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

DAX Formatter MCP Server

A Model Context Protocol (MCP) server that provides DAX (Data Analysis Expressions) formatting capabilities to AI assistants and other MCP clients. This server integrates with the official DAX Formatter service by SQLBI to deliver professional-grade DAX code formatting.

🚀 Features

  • Single DAX Expression Formatting: Format individual DAX expressions with professional standards
  • Batch Processing: Format multiple DAX expressions in a single efficient request
  • Comprehensive Formatting Options: Control line length, spacing, separators, and more
  • Error Handling: Robust error handling with detailed error messages
  • Fallback Mechanisms: Automatic fallback to individual formatting if batch processing fails
  • Database Context: Support for database and server context (anonymized for privacy)

📋 Prerequisites

🛠️ Installation

  1. Download the latest release from the Releases page
  2. Extract the archive to your preferred location
  3. Note the path to the executable for configuration

Option 2: Build from Source

# Clone the repository
git clone https://github.com/EmanueleMeazzo/dax-formatter-mcp.git
cd dax-formatter-mcp

# Build the project
dotnet build --configuration Release

# The executable will be in bin/Release/net8.0/

⚙️ Configuration

Claude Desktop

Add the following to your Claude Desktop configuration file:

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json

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

Continue IDE Extension

Add to your Continue configuration:

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

Generic MCP Client

For any MCP client supporting the MCP 2024-11-05 protocol:

{
  "servers": [
    {
      "name": "dax-formatter",
      "transport": {
        "type": "stdio",
        "command": "path/to/dax-formatter-mcp.exe",
        "args": []
      }
    }
  ]
}

Using with .NET Runtime

If you prefer to use the DLL with the .NET runtime:

{
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

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