Gitee

by normal-coder
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Enables AI to interact with Gitee repositories, including creating/managing repositories, branches, files, issues, and pull requests. Supports operations like pushing code, creating issues, managing PRs, and performing user-related actions on Gitee's platform.

Gitee MCP 서버

MCP를 통해 AI가 Gitee 저장소/이슈/풀 리퀘스트를 운영하도록 하세요.


지원되는 AI 작업

범주MCP 도구설명
저장소 작업create_repositoryGitee 저장소 만들기
fork_repositoryGitee 저장소 포크하기
지점 운영create_branchGitee 저장소에 새 브랜치 만들기
list_branchesGitee 저장소의 브랜치 나열
get_branchGitee 저장소의 특정 브랜치에 대한 세부 정보 가져오기
파일 작업get_file_contentsGitee 저장소의 파일이나 디렉토리 내용 가져오기
create_or_update_fileGitee 저장소에서 파일을 만들거나 업데이트합니다.
push_files여러 파일을 Gitee 저장소에 푸시합니다.
이슈 운영create_issueGitee 저장소에서 이슈 생성
list_issuesGitee 저장소의 문제 나열
get_issueGitee 저장소에서 특정 이슈에 대한 세부 정보 가져오기
update_issueGitee 저장소에서 이슈 업데이트
add_issue_commentGitee 저장소의 이슈에 주석 추가
풀 리퀘스트 작업create_pull_requestGitee 저장소에 풀 리퀘스트 만들기
list_pull_requestsGitee 저장소에 풀 리퀘스트 나열
get_pull_requestGitee 저장소에서 특정 풀 리퀘스트의 세부 정보 가져오기
update_pull_requestGitee 저장소에서 풀 리퀘스트 업데이트
merge_pull_requestGitee 저장소에서 풀 리퀘스트 병합
사용자 작업get_userGitee 사용자 정보 가져오기
get_current_user인증된 Gitee 사용자 정보 가져오기

용법

Smithery를 통해 설치

Smithery를 통해 Claude Desktop에 Gitee MCP Server를 자동으로 설치하려면:

지엑스피1

구성

  • GITEE_API_BASE_URL : 선택 사항, Gitee OpenAPI 엔드포인트, 기본값은 https://gitee.com/api/v5 입니다.
  • GITEE_PERSONAL_ACCESS_TOKEN : 필수, Gitee 계정 개인 액세스 토큰(PAT), Gitee 계정 설정 개인 액세스 토큰 에서 얻을 수 있습니다.
  • DEBUG : 선택 사항이며 디버그 로깅을 활성화하려면 true 로 설정합니다. 기본값은 비활성화입니다.

NPX를 통해 MCP 서버 실행

{ "mcpServers": { "Gitee": { "command": "npx", "args": [ "-y", "gitee-mcp-server" ], "env": { "GITEE_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>" } } } }

Docker 컨테이너를 통해 MCP 서버 실행

  1. Docker 이미지 가져오기
# Get from DockerHub docker pull normalcoder/gitee-mcp-server # Build locally docker build -t normalcoder/gitee-mcp-server .
  1. MCP 서버 구성
{ "mcpServers": { "Gitee": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITEE_PERSONAL_ACCESS_TOKEN", "normalcoder/gitee-mcp-server" ], "env": { "GITEE_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>" } } } }

개발 가이드

종속성 설치

npm install

짓다

npm run build

빌드가 성공적으로 완료되면 /dist 실행 가능한 MCP 서버가 포함됩니다.

서버 실행

npm start

MCP 서버는 stdio에서 실행되므로 MCP 클라이언트에서 하위 프로세스로 사용될 수 있습니다.

Docker 이미지 빌드

Docker를 사용하여 서버를 실행할 수도 있습니다.

docker build -t normalcoder/gitee-mcp-server .

Docker로 MCP 서버 실행:

docker run -e GITEE_PERSONAL_ACCESS_TOKEN=<YOUR_TOKEN> normalcoder/gitee-mcp-server

MCP 서버 디버그

디버깅을 위해 @modelcontextprotocol/inspector 사용할 수 있습니다.

환경 변수에 대한 루트 디렉토리에 .env 파일을 만듭니다.

GITEE_API_BASE_URL=https://gitee.com/api/v5 GITEE_PERSONAL_ACCESS_TOKEN=<YOUR_TOKEN>

디버그 도구를 실행하여 서비스와 웹 디버그 인터페이스를 시작합니다.

npx @modelcontextprotocol/inspector npm run start --env-file=.env

이 프로젝트에는 디버그 정보를 인쇄하기 위한 debug() 함수가 포함되어 있습니다. 사용법은 다음과 같습니다.

import { debug } from './common/utils.js'; debug('Message to log'); debug('Message with data:', { key: 'value' });

디버그 로그는 DEBUG 환경 변수가 true 로 설정된 경우에만 인쇄됩니다.

종속성

  • @modelcontextprotocol/sdk : 서버 구현을 위한 MCP SDK
  • universal-user-agent : 사용자 에이전트 문자열을 생성합니다.
  • zod : 스키마 검증용
  • zod-to-json-schema : Zod 스키마를 JSON 스키마로 변환합니다.

특허

MIT 라이선스에 따라 라이선스가 부여되었습니다. MIT 라이선스의 조건에 따라 소프트웨어를 자유롭게 사용, 수정 및 배포할 수 있습니다. 자세한 내용은 프로젝트 저장소의 LICENSE 파일을 참조하십시오.

관련 링크

ID: cck9xigm1d