Skip to main content
Glama

CodeSavant

MCP-코드사반트

CodeSavant는 현재 진행 중인 프로젝트입니다.

CodeSavant는 코드 조작, 실행 및 버전 제어 기능을 제공하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이를 통해 AI 비서가 변경 내역을 유지하면서 코드를 읽고, 쓰고, 실행할 수 있습니다.

특징

  • 라인별 작업으로 코드 파일을 읽고 씁니다.
  • 여러 프로그래밍 언어(Python, Node.js)로 코드 실행
  • 제어된 환경에서 셸 명령 실행
  • 버전 제어를 통해 코드 변경 사항을 추적하고 관리하세요
  • 코드 파일 내에서 검색
  • 이전 버전의 코드로 되돌리기

설치

  1. 저장소를 복제합니다.

지엑스피1

  1. 필요한 종속성을 설치하세요:
pip install -r requirements.txt
  1. Claude Desktop config.json에 서버 구성을 추가합니다.
{ "mcpServers": { "codesavant": { "command": "python", "args": ["path/to/codesavant.py"] } } }

디렉토리 구조

서버는 다음과 같은 디렉토리 구조를 생성하고 관리합니다.

workspaces/ ├── project1/ │ ├── .code_history.json │ └── [code files] ├── project2/ │ ├── .code_history.json │ └── [code files] └── ...

도구 참조

자세한 사용법

1. 코드 파일 읽기

코드 파일의 내용을 읽고, 선택적으로 특정 섹션을 검색합니다.

{ "project": "string", // Project name "path": "string", // Path to file relative to project workspace "search": "string" // (Optional) Text/pattern to search for in file }

응답:

{ "success": true, "timestamp": 1234567890, "data": { "content": "string", // File content "start_line": number, // (Only if search used) Starting line of found section "end_line": number // (Only if search used) Ending line of found section } }
2. 코드 파일 쓰기

코드 파일의 특정 줄을 작성하거나 업데이트합니다.

{ "project": "string", // Project name "path": "string", // Path to file relative to workspace "content": "string", // Content to write (just the lines being changed) "start_line": number, // Starting line number for the change "end_line": number // (Optional) Ending line number for the change }

응답:

{ "success": true, "timestamp": 1234567890, "data": { "diff": { "changes": [ // List of changes made [string, number, number, number, number] // (type, old_start, old_end, new_start, new_end) ], "timestamp": number // When the change was made } } }
3. 코드 기록을 가져오세요

코드 파일의 변경 내역을 가져옵니다.

{ "path": "string" // Path to file relative to workspace }

응답:

{ "success": true, "timestamp": 1234567890, "data": { "history": [ { "changes": [ // List of changes made [string, number, number, number, number] ], "timestamp": number } ] } }
4. 실행_코드_명령

코드 관련 셸 명령을 실행합니다.

{ "command": "string", // Shell command to execute "timeout": number // (Optional) Command timeout in seconds (default: 30) }

응답:

{ "success": true, "timestamp": 1234567890, "data": { "state": "success|error|timeout|cancelled", "output": "string", // Command output "error": "string", // Error message if any "runtime": number, // Execution time in seconds "exit_code": number // Command exit code } }
5. 실행 코드

지정된 언어로 코드를 실행합니다.

{ "code": "string", // Code to execute "language": "string", // Programming language ("python" or "node") "timeout": number // (Optional) Execution timeout in seconds (default: 30) }

응답:

{ "success": true, "timestamp": 1234567890, "data": { "state": "success|error|timeout|cancelled", "output": "string", // Code execution output "error": "string", // Error message if any "runtime": number, // Execution time in seconds "exit_code": number // Execution exit code } }
6. 버전으로 되돌리기

코드 파일을 특정 버전으로 되돌립니다.

{ "path": "string", // Path to file relative to workspace "timestamp": number // Timestamp of version to revert to }

응답:

{ "success": true, "timestamp": 1234567890, "data": { "diff": { "changes": [ // List of changes made [string, number, number, number, number] ], "timestamp": number // When the reversion was made } } }
7. 코드 파일 줄 읽기

코드 파일에서 특정 줄을 읽습니다.

{ "project": "string", // Project name "path": "string", // Path to file relative to project workspace "start_line": number, // Starting line number to read "end_line": number // (Optional) Ending line number to read }

응답:

{ "success": true, "timestamp": 1234567890, "data": { "content": "string" // Content of the specified lines } }

오류 처리

서버는 다음 형식으로 자세한 오류 응답을 제공합니다.

{ "success": false, "timestamp": 1234567890, "data": null, "error": "Error message" }

오류 유형은 다음과 같습니다.

  • CodeFileError : 파일 작업 오류
  • CodeValidationError : 코드 검증 오류
  • CodeExecutionError : 코드 실행 오류

언어 지원

현재 코드 실행에 지원되는 언어:

  • Python(시스템 Python 인터프리터 사용)
  • Node.js(node 명령 사용)

각 언어를 실행하면 작업 공간 디렉토리에 임시 파일이 생성되고 적절한 인터프리터로 실행됩니다.

기여하다

  1. 저장소를 포크하세요
  2. 기능 브랜치를 생성하세요
  3. 변경 사항을 커밋하세요
  4. 지점으로 밀어 넣기
  5. 새로운 풀 리퀘스트 만들기

특허

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

작가

토드 울븐 - ( https://github.com/tolven )

감사의 말

  • Anthropic의 MCP(Model Context Protocol)로 구축됨
  • Anthropic의 Claude와 함께 사용하도록 개발됨
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

코드 조작, 실행 및 버전 제어 기능을 제공합니다. AI 비서가 변경 내역을 유지하면서 코드를 읽고, 쓰고, 실행할 수 있도록 지원합니다.

  1. 특징
    1. 설치
      1. 디렉토리 구조
        1. 도구 참조
          1. 자세한 사용법
        2. 오류 처리
          1. 언어 지원
            1. 기여하다
              1. 특허
                1. 작가
                  1. 감사의 말

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      Allows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.
                      Last updated -
                      1
                      580
                      Python
                      MIT License
                      • Linux
                      • Apple
                    • -
                      security
                      A
                      license
                      -
                      quality
                      Serves as a guardian of development knowledge, providing AI assistants with curated access to latest documentation and best practices.
                      Last updated -
                      4
                      87
                      52
                      TypeScript
                      MIT License
                    • -
                      security
                      F
                      license
                      -
                      quality
                      Enables AI assistants to interact with Metabase databases and dashboards, allowing users to list and execute queries, access data visualizations, and interact with database resources through natural language.
                      Last updated -
                      25
                      JavaScript
                      • Apple
                    • A
                      security
                      A
                      license
                      A
                      quality
                      Provides tools for interacting with Targetprocess, a project management and agile planning platform, enabling AI assistants to search, create, and update project entities with proper validation.
                      Last updated -
                      5
                      4
                      TypeScript
                      MIT License

                    View all related MCP servers

                    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/twolven/mcp-codesavant'

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