Skip to main content
Glama
jihyun0410

codetest-mcp

by jihyun0410

codetest-mcp — 코드 기반 처리 전담 FastAPI 서비스

정의서:

LLM을 사용하여 판단하는 부분은 Agent, 코드 기반으로 단순 처리 및 판단을 진행하는 부분은 MCP 로 구분하여 Fast API를 통해 송/수신하는 방식으로 구현

이 서비스는 LLM 을 전혀 호출하지 않는다. 파서와 빌드 도구가 확정한 사실만 만들어 Agent 에게 돌려준다.

담당 기능 (전부 정의서 근거)

기능

정의서 근거

Git clone + AST 파싱 → 프로젝트 개요 DB 저장

[상세] 1

Git Diff + AST 로 변경된 코드 단위 식별

(2)

변경 영향도 / 메소드 추적

흐름 3

생성된 Test Code 에 @SpringBootTest 주입

(1)

Gradle + JaCoCo 로 Test Code 실행

[상세] 4

하지 않는 것: 변경 의도 해석, 중요도 판정, 테스트 코드 작성, 결과 적절성 판단 — 전부 Agent(LLM)의 몫이다.

Related MCP server: code-graph-mcp

API

메서드

경로

설명

GET

/api/v1/health

헬스체크 (인증 불필요)

POST

/api/v1/projects

프로젝트 등록 + 개요 수집(백그라운드)

DELETE

/api/v1/projects/{id}

프로젝트·그래프·작업 사본 삭제

GET

/api/v1/projects/{id}/overview

저장된 개요 조회

POST

/api/v1/analysis/changes

Diff + AST 변경 단위·영향도 식별

POST

/api/v1/tests/execute

@SpringBootTest 주입 + JaCoCo 실행

/api/v1/analysis/changes

// 요청
{ "project_id": "…", "diff": "<unified diff>", "sources": [{"path": "…", "content": "…"}] }

// 응답 — 확정된 사실만
{
  "changed_units":  [{"qualified_name": "com.example.demo.service.OrderService#calculateTotal(Order)",
                      "node_type": "Method", "start_line": 6, "end_line": 12, "entrypoint": false}],
  "impacted_units": [{"qualified_name": "…", "depth": 1, "via": "Calls"}],
  "risk": "MEDIUM", "risk_score": 30, "risk_reasons": ["직접 변경된 그래프 노드 1개 …"],
  "frameworks": ["Spring Boot"], "base_package": "com.example.demo",
  "graph_ready": true, "warnings": []
}

/api/v1/tests/execute

test_code@SpringBootTest 가 없으면 주입한 뒤 실행한다. 필요한 import 와 package 선언도 보강하고, src/test/java/<package>/<Class>.java 로 저장해 돌린다. 클라이언트가 보낸 sources(미커밋 변경분)를 작업 사본에 덮어쓴 뒤 실행하므로 개발자의 로컬 변경이 실제로 테스트된다. 실행이 끝나면 작업 사본을 원상 복구한다.

// 응답 — 판정 없이 사실만
{
  "exit_code": 0, "passed": 3, "failed": 0, "total": 3, "failures": [],
  "coverage": {"line_rate": 80.0, "branch_rate": 100.0, "line_covered": 16, "line_missed": 4},
  "jacoco_enabled": true, "springboot_applied": true,
  "applied": ["@SpringBootTest 주입 (class GeneratedOrderTest)", "import 보강: …"],
  "test_file_path": "src/test/java/com/example/demo/GeneratedOrderTest.java",
  "command": ["sh", "./gradlew", "test", "--tests", "…", "jacocoTestReport"]
}

실행

pip install -e .
uvicorn codetest_mcp.main:app --host 0.0.0.0 --port 8100
# 또는
python -m codetest_mcp

환경변수

변수

기본값

설명

CODETEST_MCP_PORT

8100

수신 포트

CODETEST_MCP_API_KEYS

(없음)

Agent 인증 키(CSV). 비우면 인증 비활성화

CODETEST_MCP_DATABASE_URL

sqlite:///./data/codetest_mcp.db

개요/그래프 저장소

CODETEST_MCP_WORKSPACE_DIR

./workspace

대상 저장소 clone 위치

CODETEST_MCP_GRADLE_COMMAND

gradle

gradlew 가 없을 때 쓸 실행 파일

CODETEST_MCP_TEST_TIMEOUT

900

gradle test 최대 실행 시간(초)

대상 프로젝트에 gradlew 가 있으면 우선 사용한다. JaCoCo 커버리지는 프로젝트 build.gradlejacoco 플러그인이 적용되어 있을 때만 수집된다.

테스트

python -m pytest tests/ -q

배포 위치

Agent 와 동일한 별도 관리 서버. Agent 가 FastAPI 로 호출한다. 대상 저장소를 clone 하고 Gradle 을 실행하므로 JDK 와 Gradle 이 필요하다.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server for static security analysis of Android source code

  • MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.

  • Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jihyun0410/codetest-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server