Skip to content

Add MCP server project exposing DAX formatting over stdio#22

Open
marcosqlbi wants to merge 1 commit intomasterfrom
claude/gallant-haslett-f376e3
Open

Add MCP server project exposing DAX formatting over stdio#22
marcosqlbi wants to merge 1 commit intomasterfrom
claude/gallant-haslett-f376e3

Conversation

@marcosqlbi
Copy link
Copy Markdown
Collaborator

Summary

  • New Dax.Formatter.McpServer project (net8.0) — a thin Model Context Protocol server over stdio that wraps DaxFormatterClient, so LLM clients (Claude Desktop, Claude Code, etc.) can format DAX via the existing daxformatter.com endpoints.
  • Exposes two tools: format_dax (single expression) and format_dax_batch (multiple expressions), both accepting optional formatting options (listSeparator, decimalSeparator, maxLineLength, skipSpaceAfterFunctionName) and server metadata (serverType, serverMode, serverEdition, serverLocation, serverVersion, databaseCompatibilityLevel, serverName, databaseName). Enum params accept string names and produce a descriptive error on invalid values.
  • Added the new project to src/Dax.Formatter.sln.

Test plan

  • dotnet build src/Dax.Formatter.McpServer/Dax.Formatter.McpServer.csproj -c Debug — 0 warnings / 0 errors.
  • JSON-RPC smoke test (initialize + tools/call format_dax) round-trips formatted DAX from the live daxformatter.com service.
  • Invalid enum value (serverType:"NotAType") surfaces as an MCP tool error with allowed values listed.
  • Wire up in an MCP client (Claude Desktop config) and exercise from a real chat session.

MCP client config

{
  "mcpServers": {
    "dax-formatter": {
      "command": "dotnet",
      "args": ["run", "--project", "<repo>/src/Dax.Formatter.McpServer", "-c", "Release", "--no-build"]
    }
  }
}

🤖 Generated with Claude Code

Introduces Dax.Formatter.McpServer, a thin Model Context Protocol
server that wraps DaxFormatterClient so LLM clients can format DAX
via the existing daxformatter.com endpoints. Exposes format_dax and
format_dax_batch tools with formatting and server metadata options.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant