Skip to main content
Glama
mettamatt

Code Reasoning MCP Server

코드 추론 MCP 서버

클로드가 체계적이고 단계별 사고를 통해 복잡한 프로그래밍 작업을 해결하는 능력을 향상시키는 MCP(모델 컨텍스트 프로토콜) 서버입니다.

npm 버전 라이센스: MIT 씨아이

빠른 설치

  1. 다음을 편집하여 Claude Desktop을 구성하세요.

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • 리눅스: ~/.config/Claude/claude_desktop_config.json

    지엑스피1

  2. VS Code 구성:

{
  "mcp": {
    "servers": {
      "code-reasoning": {
        "command": "npx",
        "args": ["-y", "@mettamatt/code-reasoning"]
      }
    }
  }
}

Related MCP server: Sequential Thinking MCP Server

용법

  1. 이 MCP를 트리거하려면 채팅 메시지에 다음을 추가하세요.

    Use sequential thinking to reason about this.
  2. 코드 추론을 트리거하는 즉시 사용 가능한 프롬프트를 사용하세요.

코드 추론 프롬프트

  • Claude Desktop 채팅 창에서 "+" 아이콘을 클릭하거나 Claude Code에서 /help 입력하여 특정 명령을 확인하세요.

  • 사용 가능한 도구에서 "코드 추론에서 추가"를 선택하세요.

  • 프롬프트 템플릿을 선택하고 필요한 정보를 입력하세요.

  • 채팅 메시지에 프롬프트를 추가하려면 양식을 제출하고 리턴을 누르세요.

프롬프트 템플릿 사용에 대한 자세한 내용은 프롬프트 가이드를 참조하세요.

명령줄 옵션

  • --debug : 자세한 로깅을 활성화합니다.

  • --help 또는 -h : 도움말 정보 표시

주요 특징

  • 프로그래밍 초점 : 코딩 작업 및 문제 해결에 최적화됨

  • 구조화된 사고 : 복잡한 문제를 관리 가능한 단계로 분해

  • 사고 분기 : 여러 솔루션 경로를 병렬로 탐색

  • 생각 수정 : 이해가 향상됨에 따라 이전 추론을 다듬습니다.

  • 안전 한계 : 루프를 방지하기 위해 20단계를 수행한 후 자동으로 중지됩니다.

  • 바로 사용 가능한 프롬프트 : 일반적인 개발 작업을 위한 미리 정의된 템플릿

선적 서류 비치

자세한 문서는 docs 디렉토리에서 확인할 수 있습니다.

프로젝트 구조

├── index.ts                  # Entry point
├── src/                      # Implementation source files
└── test/                     # Testing framework

신속한 평가

코드 추론 MCP 서버에는 클로드의 코드 추론 프롬프트를 따르는 능력을 평가하는 즉각적인 평가 시스템이 포함되어 있습니다. 이 시스템을 통해 다음이 가능합니다.

  • 시나리오 문제에 대한 다양한 프롬프트 변형 테스트

  • 매개변수 형식 준수 확인

  • 솔루션 품질 평가

신속한 평가 시스템을 사용하려면 다음을 실행하세요.

npm run eval

신속한 비교 및 개발

코드 리즈닝 서버에 최적화된 프롬프트를 개발하는 데 상당한 노력을 기울였습니다. 현재 구현에서는 HYBRID_DESIGN 프롬프트를 사용하고 있으며, 이 프롬프트는 평가 과정에서 최종적으로 선정되었습니다.

우리는 4가지 다른 프롬프트 디자인을 비교했습니다.

프롬프트 디자인

설명

잇달아 일어나는

원래의 순차적 사고 촉진 디자인

기본

이전에 서버에서 사용했던 기준 프롬프트

코드 추론 0_30

코드별 추론에 초점을 맞춘 실험적 변형

하이브리드 디자인

다른 접근 방식의 가장 좋은 요소를 통합한 세련된 디자인

7가지 다양한 프로그래밍 시나리오에 대한 평가 결과, HYBRID_DESIGN이 다른 프롬프트보다 우수한 것으로 나타났습니다.

대본

하이브리드 디자인

코드 추론 0_30

기본

잇달아 일어나는

알고리즘 선택

87%

82%

88%

82%

버그 식별

87%

91%

88%

92%

다단계 구현

83%

67%

79%

82%

시스템 설계 분석

82%

87%

78%

82%

코드 디버깅 작업

92%

87%

92%

92%

컴파일러 최적화

83%

78%

67%

73%

캐시 전략

86%

88%

82%

87%

평균

86%

83%

82%

84%

HYBRID_DESIGN 프롬프트는 가장 높은 평균 솔루션 품질(86%)과 모든 시나리오에서 가장 일관된 성능을 보였으며, 80% 미만의 점수는 없었습니다. 또한 가장 많은 생각을 생성했습니다. src/server.ts 파일은 이 최적의 프롬프트 디자인을 사용하도록 업데이트되었습니다.

개인적으로, 가장 큰 개선점은 프롬프트 끝에 "✍️ 각 생각을 "내가 놓친 것이나 다시 고려해야 할 것은 무엇인가?"라고 질문하면서 마무리하는 것이라고 생각합니다.

신속한 평가 시스템에 대한 자세한 내용은 테스트 프레임워크를 참조하세요.

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 라이선스 파일을 참조하세요.

Available Tools

1 tool
code-reasoningA

🧠 Code Reasoning Tool (using sequential thinking)

Purpose → break complex problems into self-auditing, exploratory thought steps that can branch, revise, or back-track until a single, well-supported answer emerges.


WHEN TO CALL

• Multi-step planning, design, debugging, or open-ended analysis
• Whenever further private reasoning or hypothesis testing is required before replying to the user


ENCOURAGED PRACTICES

🔍 Question aggressively – ask "What am I missing?" after each step
🔄 Revise freely – mark is_revision=true even late in the chain
🌿 Branch often – explore plausible alternatives in parallel; you can merge or discard branches later
↩️ Back-track – if a path looks wrong, start a new branch from an earlier thought
Admit uncertainty – explicitly note unknowns and schedule extra thoughts to resolve them


MUST DO

✅ Put every private reasoning step in thought
✅ Keep thought_number correct; update total_thoughts when scope changes
✅ Use is_revision & branch_from_thought/branch_id precisely
✅ Set next_thought_needed=false only when all open questions are resolved
✅ Abort and summarise if thought_number > 20


DO NOT

⛔️ Reveal the content of thought to the end-user
⛔️ Continue thinking once next_thought_needed=false
⛔️ Assume thoughts must proceed strictly linearly – branching is first-class


PARAMETER CHEAT-SHEET

thought (string) – current reasoning step
next_thought_needed (boolean) – request further thinking?
thought_number (int ≥ 1) – 1-based counter
total_thoughts (int ≥ 1) – mutable estimate
is_revision, revises_thought (int) – mark corrections
branch_from_thought, branch_id – manage alternative paths
needs_more_thoughts (boolean) – optional hint that more thoughts may follow

All JSON keys must use lower_snake_case.


EXAMPLE ✔️

{
  "thought": "List solution candidates and pick the most promising",
  "thought_number": 1,
  "total_thoughts": 4,
  "next_thought_needed": true
}

EXAMPLE ✔️ (branching late)

{
  "thought": "Alternative approach: treat it as a graph-search problem",
  "thought_number": 6,
  "total_thoughts": 8,
  "branch_from_thought": 3,
  "branch_id": "B1",
  "next_thought_needed": true
}
ParametersJSON Schema
NameRequiredDescriptionDefault
branch_from_thoughtNoBranching point thought number
branch_idNoIdentifier for the current branch
is_revisionNoWhether this is a revision of a previous thought
needs_more_thoughtsNoOptional hint that more thoughts may follow
next_thought_neededYesWhether another thought step is needed
revises_thoughtNoWhich thought is being revised
thoughtYesYour current reasoning step
thought_numberYesCurrent thought number (1-based)
total_thoughtsYesEstimated total thoughts needed (can be adjusted)

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure and excels at this. It provides extensive behavioral guidance including 'ENCOURAGED PRACTICES' (questioning, revising, branching, backtracking, admitting uncertainty), 'MUST DO' rules (put every step in thought, keep counters correct, use branching/revision flags precisely, set next_thought_needed=false only when resolved, abort after 20 thoughts), and 'DO NOT' prohibitions (don't reveal thoughts to user, don't continue after next_thought_needed=false, don't assume linear thinking). This comprehensively describes how the tool should be used.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Purpose, WHEN TO CALL, ENCOURAGED PRACTICES, MUST DO, DO NOT, PARAMETER CHEAT-SHEET, EXAMPLES) that make it easy to navigate. While comprehensive, it maintains focus with each section serving a clear purpose. Some sections could be slightly more concise, but overall the structure enhances readability and information retrieval.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (9 parameters, no annotations, no output schema), the description provides exceptional contextual completeness. It covers purpose, usage guidelines, behavioral patterns, parameter semantics, and practical examples. The description fully compensates for the lack of annotations and output schema by providing comprehensive guidance on how to use this complex reasoning tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds significant value through the 'PARAMETER CHEAT-SHEET' section that provides practical guidance on parameter usage beyond the schema's basic descriptions. It explains the relationships between parameters (e.g., how is_revision and revises_thought work together, how branching parameters relate) and includes important implementation notes like 'All JSON keys must use lower_snake_case.' The examples further illustrate parameter usage in context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'break complex problems into self-auditing, exploratory thought steps that can branch, revise, or back-track until a single, well-supported answer emerges.' This is specific (verb+resource+methodology) and distinguishes it from any potential alternatives. The 'Purpose →' section provides a concise, accurate summary of what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'WHEN TO CALL' section explicitly lists scenarios for using this tool: 'Multi-step planning, design, debugging, or open-ended analysis' and 'Whenever further private reasoning or hypothesis testing is required before replying to the user.' It provides clear guidance on when this tool should be invoked versus when to respond directly to the user.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedcode-reasoning

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The single tool has a clearly defined purpose for code reasoning and problem-solving, so agents cannot misselect between multiple options.

Naming Consistency5/5

Since there is only one tool named 'code-reasoning', naming consistency is inherently perfect. There are no other tools to compare against, so no inconsistencies can exist in the tool set.

Tool Count2/5

A single tool for a 'Code Reasoning MCP Server' feels too minimal for the apparent scope. While the tool is feature-rich internally, the server's purpose suggests it should offer multiple specialized reasoning tools (e.g., for debugging, design, analysis) rather than one monolithic tool, making the count inappropriate.

Completeness2/5

The server claims to handle 'code reasoning' but provides only one general-purpose tool. This creates significant gaps: there are no specialized tools for different reasoning tasks (e.g., debugging vs. design), no tools for input/output handling, and no way to manage reasoning sessions independently, leading to potential agent failures in complex workflows.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers