Multi-service MCP Server

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Provides access to GitHub's API for managing repositories, issues, and performing searches, allowing users to list repositories, get repository details, search repositories, get issues, and create new issues.

  • Enables interaction with GitLab's API to access projects, issues, and pipelines, with capabilities to list projects, get project details, search projects, manage issues, and retrieve pipeline information.

  • Provides geocoding, reverse geocoding, directions, and places search capabilities through the Google Maps API, allowing users to convert addresses to coordinates, find routes between locations, and search for places.

모델 컨텍스트 프로토콜(MCP) 서버

GitHub, GitLab, Google Maps, 메모리 저장소, Puppeteer 웹 자동화를 위한 도구를 제공하는 모델 컨텍스트 프로토콜 표준을 구현하는 모듈식 서버입니다.

건축학

MCP 서버는 각 도구가 별도의 모듈로 구현되는 모듈형 아키텍처로 구축됩니다. 이 서버는 요청을 적절한 도구로 라우팅하는 통합 게이트웨이를 제공합니다.

특징

  • MCP 게이트웨이 : MCP 표준을 따르는 모든 도구 요청에 대한 통합 엔드포인트
  • MCP 매니페스트 : 사용 가능한 모든 도구와 해당 기능을 설명하는 엔드포인트
  • 직접 도구 액세스 : 각 도구는 자체 API 엔드포인트를 통해 직접 액세스할 수 있습니다.
  • 모듈식 디자인 : 필요에 따라 도구를 쉽게 추가하거나 제거할 수 있습니다.

포함된 도구

  1. GitHub 도구 : GitHub 저장소, 이슈 및 검색과 상호 작용
  2. GitLab 도구 : GitLab 프로젝트, 이슈 및 파이프라인과 상호 작용
  3. Google 지도 도구 : 지오코딩, 길찾기 및 장소 검색
  4. 메모리 도구 : 데이터를 지속적으로 저장하고 검색합니다.
  5. 퍼펫티어 도구 : 스크린샷 찍기, PDF 생성, 웹사이트 콘텐츠 추출

시작하기

필수 조건

  • Python 3.8 이상
  • Node.js 14 이상
  • Red Hat 기반 Linux 배포판(RHEL, CentOS, Fedora) 또는 모든 Linux/macOS 시스템

설치

  1. 이 저장소를 복제하세요:지엑스피1
  2. Python 종속성 설치:
    pip install -r requirements.txt
  3. Node.js 종속성을 설치하세요.
    npm install
  4. 구성을 사용하여 .env 파일을 만듭니다.
    SECRET_KEY=your-secret-key DEBUG=False # GitHub configuration GITHUB_TOKEN=your-github-token # GitLab configuration GITLAB_TOKEN=your-gitlab-token # Google Maps configuration GMAPS_API_KEY=your-google-maps-api-key # Memory configuration MEMORY_DB_URI=sqlite:///memory.db # Puppeteer configuration PUPPETEER_HEADLESS=true CHROME_PATH=/usr/bin/chromium-browser
  5. 서버를 시작합니다:
    python app.py

컨테이너화된 배포

Docker나 Podman(Red Hat의 컨테이너 엔진)을 사용하여 서버를 실행할 수 있습니다.

도커 배포

Docker와 docker-compose가 이미 설치되어 있는 경우:

  1. Docker 이미지를 빌드합니다.
    docker build -t mcp-server .
  2. 컨테이너를 실행합니다.
    docker run -p 5000:5000 --env-file .env mcp-server
  3. 또는 docker-compose를 사용하세요.docker-compose.yml 파일을 만듭니다.
    version: '3' services: mcp-server: build: . ports: - "5000:5000" volumes: - ./data:/app/data env_file: - .env restart: unless-stopped
    그런 다음 실행하세요.
    docker-compose up -d

포드맨 배치

Podman을 사용하는 Red Hat 기반 시스템(RHEL, CentOS, Fedora)의 경우:

  1. 컨테이너 이미지를 빌드합니다.
    podman build -t mcp-server .
  2. 컨테이너를 실행합니다.
    podman run -p 5000:5000 --env-file .env mcp-server
  3. 영구 저장소가 필요한 경우:
    mkdir -p ./data podman run -p 5000:5000 --env-file .env -v ./data:/app/data:Z mcp-server
    참고: :Z 접미사는 SELinux 지원 시스템에서 중요합니다.
  4. Podman Compose 사용(설치된 경우):
    # Install podman-compose if needed pip install podman-compose # Use the same docker-compose.yml file as above podman-compose up -d

MCP 서버 사용

MCP 게이트웨이

MCP 게이트웨이는 MCP 표준을 사용하여 모든 도구에 액세스하기 위한 주요 엔드포인트입니다.

엔드포인트 : POST /mcp/gateway

요청 형식 :

{ "tool": "github", "action": "listRepos", "parameters": { "username": "octocat" } }

응답 형식 :

{ "tool": "github", "action": "listRepos", "status": "success", "result": [ { "id": 1296269, "name": "Hello-World", "full_name": "octocat/Hello-World", "owner": { "login": "octocat", "id": 1 }, ... } ] }

MCP 매니페스트

MCP 매니페스트는 사용 가능한 모든 도구와 그 기능을 설명합니다.

엔드포인트 : GET /mcp/manifest

응답 형식 :

{ "manifestVersion": "1.0", "tools": { "github": { "actions": { "listRepos": { "description": "List repositories for a user or organization", "parameters": { "username": { "type": "string", "description": "GitHub username or organization name" } }, "returns": { "type": "array", "description": "List of repository objects" } }, ... } }, ... } }

직접 도구 접근

각 도구는 자체 API 엔드포인트를 통해 직접 액세스할 수도 있습니다.

  • GitHub: /tool/github/...
  • GitLab: /tool/gitlab/...
  • Google 지도: /tool/gmaps/...
  • 메모리: /tool/memory/...
  • 인형 조종사: /tool/puppeteer/...

사용 가능한 엔드포인트에 대한 자세한 내용은 각 도구의 API 문서를 참조하세요.

도구 문서

GitHub 도구

GitHub 도구는 저장소, 이슈, 검색을 위한 GitHub API에 대한 액세스를 제공합니다.

동작 :

  • listRepos : 사용자 또는 조직의 저장소를 나열합니다.
  • getRepo : 특정 저장소에 대한 세부 정보를 가져옵니다.
  • searchRepos : 저장소 검색
  • getIssues : 저장소의 이슈를 가져옵니다
  • createIssue : 저장소에 새로운 이슈를 생성합니다.

GitLab 도구

GitLab 도구는 프로젝트, 이슈, 파이프라인에 대한 GitLab API에 대한 액세스를 제공합니다.

동작 :

  • listProjects : 인증된 사용자가 액세스할 수 있는 모든 프로젝트를 나열합니다.
  • getProject : 특정 프로젝트에 대한 세부 정보를 가져옵니다.
  • searchProjects : GitLab에서 프로젝트 검색
  • getIssues : 프로젝트의 이슈를 가져옵니다
  • createIssue : 프로젝트에서 새로운 이슈를 생성합니다.
  • getPipelines : 프로젝트의 파이프라인을 가져옵니다.

Google 지도 도구

Google Maps 도구는 지오코딩, 길찾기, 장소 검색을 위한 Google Maps API에 대한 액세스를 제공합니다.

동작 :

  • geocode : 주소를 지리적 좌표로 변환
  • reverseGeocode : 지리적 좌표를 주소로 변환
  • getDirections : 두 위치 사이의 길찾기
  • searchPlaces : Google Places API를 사용하여 장소 검색
  • getPlaceDetails : 특정 장소에 대한 세부 정보를 가져옵니다.

메모리 도구

메모리 도구는 데이터를 저장하고 검색하기 위한 영구적인 키-값 저장소를 제공합니다.

동작 :

  • get : 키로 메모리 항목을 가져옵니다.
  • set : 메모리 항목을 생성하거나 업데이트합니다.
  • delete : 키로 메모리 항목을 삭제합니다.
  • list : 선택적 필터링을 사용하여 모든 메모리 항목을 나열합니다.
  • search : 값으로 메모리 항목 검색

인형 조작 도구

Puppeteer 도구는 스크린샷 촬영, PDF 생성, 웹사이트에서 콘텐츠 추출 등의 웹 자동화 기능을 제공합니다.

동작 :

  • screenshot : 웹페이지의 스크린샷을 찍습니다
  • pdf : 웹페이지의 PDF 생성
  • extract : 웹 페이지에서 콘텐츠를 추출합니다

기여하다

여러분의 참여를 환영합니다! MCP 서버를 확장하는 방법은 다음과 같습니다.

새 도구 추가

  1. tools 디렉토리에 새 파일을 만듭니다(예: tools/newtool_tool.py .
  2. 기존 도구와 동일한 패턴을 따르는 작업으로 도구를 구현합니다.
  3. app.py 의 매니페스트에 도구를 추가합니다.
  4. tools/__init__.py 에 도구의 청사진을 등록합니다.

특허

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

감사의 말

-
security - not tested
A
license - permissive license
-
quality - not tested

통합 게이트웨이를 통해 GitHub, GitLab, Google Maps, 메모리 저장소 및 웹 자동화와 상호 작용하기 위한 도구를 제공하는 모델 컨텍스트 프로토콜 표준을 구현하는 모듈식 서버입니다.

  1. Architecture
    1. Features
      1. Included Tools
    2. Getting Started
      1. Prerequisites
      2. Installation
      3. Containerized Deployment
    3. Using the MCP Server
      1. MCP Gateway
      2. MCP Manifest
      3. Direct Tool Access
    4. Tool Documentation
      1. GitHub Tool
      2. GitLab Tool
      3. Google Maps Tool
      4. Memory Tool
      5. Puppeteer Tool
    5. Contributing
      1. Adding a New Tool
    6. License
      1. Acknowledgements
        ID: uanzup2jvu