BRAINIAC Source Code Structure & Correctness Checks

Paid Source Code Structure & Correctness Checks API via x402. Unpaid tool calls return 402.

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
98%
命名品質
50%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

發現項目(4)

  • LOWTool 'code_maintainability-index' doesn't follow camelCase/snake_case在 code_maintainability-index 中
  • LOWTool 'code_change-coupling-analyze' doesn't follow camelCase/snake_case在 code_change-coupling-analyze 中
  • LOWTool 'code_concurrency-hazard-detect' doesn't follow camelCase/snake_case在 code_concurrency-hazard-detect 中
  • LOWTool 'code_error-propagation-audit' doesn't follow camelCase/snake_case在 code_error-propagation-audit 中

根據工具定義與協定合規性的自動化分析。

上下文成本

~2,559Token(工具定義)
~6.0 KB典型回應大小
中等的注意力影響(128k 上下文的 2.00%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "code": {
      "url": "https://www.brainiac.software/mcp/code"
    }
  }
}

遠端端點

https://www.brainiac.software/mcp/codestreamable-http

它能做什麼

工具清單

工具(4)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢code_maintainability-index(language, source, ast)

Build a structural AST from a caller-supplied JavaScript, TypeScript, Python, or Go snippet, or from a caller-supplied AST, and score cyclomatic complexity, cognitive load, nesting depth, and duplicated function Docs: https://www.brainiac.software/api/code/maintainability-index Keywords: before you merge or rely on the supplied code, language, source, ast, maintainability score, maintainability_score, cognitive load index, cognitive_load_index, technical debt estimate hours, technical_debt_estimate_hours, audit receipt, audit_receipt, Index source maintainability, maintainability index.

輸入結構描述

{
  "type": "object",
  "properties": {
    "language": {
      "description": "language, string, one of javascript, typescript, python, go. Optional.",
      "type": "string",
      "enum": [
        "javascript",
        "typescript",
        "python",
        "go"
      ]
    },
    "source": {
      "description": "source, string, length 1 to 100000. Optional.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100000
    },
    "ast": {
      "description": "ast, object. Optional.",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_-]{0,39}$",
          "description": "type, string. Required."
        },
        "name": {
          "description": "name, string, length 1 to 80. Optional.",
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "children": {
          "description": "children, array. Optional.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,39}$",
                "description": "type, string. Required."
              },
              "name": {
                "description": "name, string, length 1 to 80. Optional.",
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "children": {
                "description": "children, array. Optional.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": {},
                  "description": "item. Value."
                }
              }
            },
            "required": [
              "type"
            ],
            "description": "item, object. Required."
          }
        }
      },
      "required": [
        "type"
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "maintainability_score": {
      "type": "number",
      "description": "maintainability_score. Number."
    },
    "cognitive_load_index": {
      "type": "number",
      "description": "cognitive_load_index. Number."
    },
    "technical_debt_estimate_hours": {
      "type": "number",
      "description": "technical_debt_estimate_hours. Number."
    },
    "audit_receipt": {
      "type": "string",
      "description": "audit_receipt. String."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢code_change-coupling-analyze(files, module_edges, change_sets, proposed_paths)

Identify files outside a proposed change set that are coupled through supplied module edges, import paths, or historical co-change sets. Docs: https://www.brainiac.software/api/code/change-coupling-analyze Keywords: before you merge or rely on the supplied code, files, proposed paths, module edges, change sets, findings, summary, explanations, Analyze change coupling, change coupling analyze.

輸入結構描述

{
  "type": "object",
  "properties": {
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 260,
            "description": "path, string, length 1 to 260. Required."
          },
          "language": {
            "description": "language, string, one of javascript, typescript, python, go, other. Optional.",
            "type": "string",
            "enum": [
              "javascript",
              "typescript",
              "python",
              "go",
              "other"
            ]
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100000,
            "description": "source, string, length 1 to 100000. Required."
          }
        },
        "required": [
          "path",
          "source"
        ],
        "description": "item, object. Required."
      },
      "description": "files, array. Required."
    },
    "module_edges": {
      "description": "module edges, array. Optional.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "from_path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 260,
            "description": "from path, string, length 1 to 260. Required."
          },
          "to_path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 260,
            "description": "to path, string, length 1 to 260. Required."
          },
          "kind": {
            "description": "kind, string, one of import, call, data, other. Optional.",
            "type": "string",
            "enum": [
              "import",
              "call",
              "data",
              "other"
            ]
          }
        },
        "required": [
          "from_path",
          "to_path"
        ],
        "description": "item, object. Required."
      }
    },
    "change_sets": {
      "description": "change sets, array. Optional.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "id, string, length 1 to 120. Required."
          },
          "paths": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 260,
              "description": "item, string, length 1 to 260. Required."
            },
            "description": "paths, array. Required."
          }
        },
        "required": [
          "id",
          "paths"
        ],
        "description": "item, object. Required."
      }
    },
    "proposed_paths": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 260,
        "description": "item, string, length 1 to 260. Required."
      },
      "description": "proposed paths, array. Required."
    }
  },
  "required": [
    "files",
    "proposed_paths"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "code. String."
          },
          "severity": {
            "type": "string",
            "description": "severity. String."
          },
          "changed_path": {
            "type": "string",
            "description": "changed_path. String."
          },
          "coupled_path": {
            "type": "string",
            "description": "coupled_path. String."
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "item. String."
            },
            "description": "evidence. Array."
          },
          "remediation": {
            "type": "string",
            "description": "remediation. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "findings. Array."
    },
    "summary": {
      "type": "object",
      "properties": {
        "proposed_paths": {
          "type": "number",
          "description": "proposed_paths. Number."
        },
        "findings": {
          "type": "number",
          "description": "findings. Number."
        }
      },
      "additionalProperties": {},
      "description": "summary. Object."
    },
    "explanations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "explanations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢code_concurrency-hazard-detect(files)

Flag potential race and shared-state hazards in caller-supplied source using deterministic pattern matches for async/concurrency markers, shared globals, and TOCTOU-shaped spans. Docs: https://www.brainiac.software/api/code/concurrency-hazard-detect Keywords: before you merge or rely on the supplied code, files, findings, summary, explanations, Detect concurrency hazards, concurrency hazard detect, Source Code Structure & Correctness Checks.

輸入結構描述

{
  "type": "object",
  "properties": {
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 260,
            "description": "path, string, length 1 to 260. Required."
          },
          "language": {
            "description": "language, string, one of javascript, typescript, python, go, other. Optional.",
            "type": "string",
            "enum": [
              "javascript",
              "typescript",
              "python",
              "go",
              "other"
            ]
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100000,
            "description": "source, string, length 1 to 100000. Required."
          }
        },
        "required": [
          "path",
          "source"
        ],
        "description": "item, object. Required."
      },
      "description": "files, array. Required."
    }
  },
  "required": [
    "files"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "code. String."
          },
          "severity": {
            "type": "string",
            "description": "severity. String."
          },
          "path": {
            "type": "string",
            "description": "path. String."
          },
          "line": {
            "type": "number",
            "description": "line. Number."
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "item. String."
            },
            "description": "evidence. Array."
          },
          "remediation": {
            "type": "string",
            "description": "remediation. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "findings. Array."
    },
    "summary": {
      "type": "object",
      "properties": {
        "files": {
          "type": "number",
          "description": "files. Number."
        },
        "findings": {
          "type": "number",
          "description": "findings. Number."
        }
      },
      "additionalProperties": {},
      "description": "summary. Object."
    },
    "explanations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "explanations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢code_error-propagation-audit(files)

Find empty catches, swallowed promise rejections, logged-without-rethrow spans, and throw sites without local handlers in caller-supplied source. Docs: https://www.brainiac.software/api/code/error-propagation-audit Keywords: before you merge or rely on the supplied code, files, findings, summary, explanations, Audit error propagation, error propagation audit, Source Code Structure & Correctness Checks.

輸入結構描述

{
  "type": "object",
  "properties": {
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 260,
            "description": "path, string, length 1 to 260. Required."
          },
          "language": {
            "description": "language, string, one of javascript, typescript, python, go, other. Optional.",
            "type": "string",
            "enum": [
              "javascript",
              "typescript",
              "python",
              "go",
              "other"
            ]
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100000,
            "description": "source, string, length 1 to 100000. Required."
          }
        },
        "required": [
          "path",
          "source"
        ],
        "description": "item, object. Required."
      },
      "description": "files, array. Required."
    }
  },
  "required": [
    "files"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "code. String."
          },
          "severity": {
            "type": "string",
            "description": "severity. String."
          },
          "path": {
            "type": "string",
            "description": "path. String."
          },
          "line": {
            "type": "number",
            "description": "line. Number."
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "item. String."
            },
            "description": "evidence. Array."
          },
          "remediation": {
            "type": "string",
            "description": "remediation. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "findings. Array."
    },
    "summary": {
      "type": "object",
      "properties": {
        "files": {
          "type": "number",
          "description": "files. Number."
        },
        "findings": {
          "type": "number",
          "description": "findings. Number."
        }
      },
      "additionalProperties": {},
      "description": "summary. Object."
    },
    "explanations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "explanations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本4 個工具