codefmt

Format/lint JS, Python, HubL for automation platforms. Tools: format_code, format_json, ask_codefmt

我该使用它吗

质量与安全性

A
描述质量
100%
模式完整度
100%
命名质量
93%
投毒风险
100%
权限匹配度
100%
协议合规性
100%

基于对工具定义和协议合规性的自动分析。

上下文开销

~516token 数(工具定义)
~1.0 KB典型响应大小
对注意力的影响极小(占 128k 上下文窗口的 0.40%)

这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。

安装

一键安装

将以下内容添加到你的 `claude_desktop_config.json` 文件中:

{
  "mcpServers": {
    "codefmt": {
      "url": "https://codefmt.dev/api/mcp"
    }
  }
}

远程端点

https://codefmt.dev/api/mcpstreamable-http

它能做什么

工具清单

工具(3)

🟢 只读🟡 写入🔴 删除⚪ 未知
🟢format_code(code, platform, language)

Format and lint JavaScript, Python, or HubL code for Zapier, n8n, Pipedream, Make, or HubSpot. Wraps the source in each platform's runtime shell before formatting so top-level await, bare return, and injected globals don't break the formatter. Returns formatted code plus lint diagnostics.

输入模式

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Source code to format (≤50KB)."
    },
    "platform": {
      "type": "string",
      "enum": [
        "zapier",
        "n8n",
        "pipedream",
        "make",
        "hubspot",
        "hubl"
      ],
      "description": "Target automation platform."
    },
    "language": {
      "type": "string",
      "enum": [
        "javascript",
        "python"
      ],
      "description": "Defaults to javascript. zapier, n8n, pipedream, make, and hubspot support python; hubl does not."
    }
  },
  "required": [
    "code",
    "platform"
  ],
  "additionalProperties": false
}
🟢ask_codefmt(query)

Ask a natural-language question about codefmt: formatting and linting JavaScript, Python, and HubL for automation platforms (Zapier, n8n, Pipedream, Make, HubSpot). Returns a grounded answer drawn from codefmt's own content with cited source URLs and a confidence score (0-1, how much of the question the answer covers, weighted toward its rarer terms); off-topic or too-weakly-matched questions are refused rather than guessed.

输入模式

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "The natural-language question about codefmt."
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}
🟢format_json(json, indent, sort_keys)

Format (pretty-print or minify) a JSON document, optionally sorting object keys. Number literals are preserved exactly (64-bit IDs safe); parse errors report the exact line and column.

输入模式

{
  "type": "object",
  "properties": {
    "json": {
      "type": "string",
      "description": "The JSON text to format."
    },
    "indent": {
      "type": "string",
      "enum": [
        "2",
        "4",
        "tab",
        "minify"
      ],
      "description": "Indentation: '2' or '4' spaces, 'tab', or 'minify'. Defaults to '2'."
    },
    "sort_keys": {
      "type": "boolean",
      "description": "Sort object keys alphabetically. Defaults to false."
    }
  },
  "required": [
    "json"
  ],
  "additionalProperties": false
}

社区

评价此服务器

证据

最近观测

已验证未记录版本3 个工具
已验证未记录版本3 个工具