Integrations
Provides access to Gmail API, allowing the AI assistant (AVA) to read and manage emails through the Gmail service.
Integrates with Google services through OAuth authentication, enabling secure access to Google-based features for the virtual assistant.
Utilizes Google Cloud Platform for API access and authentication, supporting the virtual assistant's functionality through Google Cloud services.
모델 컨텍스트 프로토콜(MCP)
모든 출처는 https://github.com/ShawhinT/YouTube-Blog/ 입니다.
AI 에이전트 시리즈의 네 번째 예시입니다. 여기에서는 모든 AI 앱이 인공 가상 비서(AVA) 도구 세트에 접근할 수 있도록 고객 MCP 서버를 구축합니다.
모래밭
이 예제를 실행하는 방법
- 이 저장소를 복제하세요
- 아직 uv를 설치하지 않았다면 설치하세요
지엑스피1
- 개발 모드에서 서버 테스트
- AI 앱에 서버 구성을 추가합니다(예: Claude Desktop 또는 Cursor).
AVA 동작 사용자 지정
개인 정보 및 기본 설정 업데이트
- 프로젝트 디렉토리에서
prompts/ava.md
파일을 찾으세요. - 다음을 사용하여 파일을 사용자 정의하세요.
- 커뮤니케이션 선호도
- 작업 처리를 위한 구체적인 지침
- AVA에 대한 기타 관련 지침
환경 설정(.env)
- 프로젝트의 루트 디렉토리에 다음 변수를 사용하여
.env
파일을 만듭니다.
필수 환경 변수:
USER_EMAIL
: 이 애플리케이션에 사용할 Gmail 주소GOOGLE_CREDENTIALS_PATH
: Google OAuth 자격 증명 파일의 경로GOOGLE_TOKEN_PATH
: Google OAuth 토큰이 저장될 경로
Google OAuth 설정
1. 프로젝트 디렉토리 구조 생성
먼저, 필요한 디렉토리 구조를 만듭니다.
2. Google Cloud 프로젝트 설정
- Google Cloud Console 로 이동
- 새 프로젝트를 만들거나 기존 프로젝트를 선택하세요
- Gmail API 활성화:
- 탐색 메뉴에서 "API 및 서비스" > "라이브러리"로 이동하세요.
- "Gmail API"를 검색하세요
- "활성화"를 클릭하세요
3. OAuth 자격 증명 생성
- Google Cloud Console에서:
- "API 및 서비스" > "자격 증명"으로 이동하세요.
- "자격 증명 만들기" > "OAuth 클라이언트 ID"를 클릭하세요.
- 애플리케이션 유형으로 "데스크톱 애플리케이션"을 선택하세요
- 이름을 지정합니다(예: "AVA Gmail 클라이언트")
- "만들기"를 클릭하세요
- 자격 증명을 다운로드하세요:
- 생성 후 "JSON 다운로드"를 클릭하세요.
- 다운로드한 파일을
.config/ava-agent/
에credentials.json
으로 저장합니다. - 파일에는 클라이언트 ID와 클라이언트 비밀번호가 포함되어야 합니다.
4. OAuth 동의 화면 구성
- Google Cloud Console에서:
- "API 및 서비스" > "OAuth 동의 화면"으로 이동하세요.
- "외부" 사용자 유형을 선택하세요
- 필수 정보를 입력하세요:
- 앱 이름
- 사용자 지원 이메일
- 개발자 연락처 정보
- Gmail API 범위 추가:
https://www.googleapis.com/auth/gmail.modify
- 테스트 사용자로 이메일을 추가하세요
- 구성을 완료하세요
Google에 로그인
서버가 Gmail 계정에 접근하려면 먼저 권한을 부여해야 합니다. uv run oauth.py
실행하면 다음과 같은 작업이 수행됩니다.
token.json
이 있는지 확인하세요- 찾을 수 없는 경우 Google OAuth 인증 흐름이 시작됩니다.
- 브라우저에서 인증 과정을 안내합니다.
- Google 계정에 로그인하라는 메시지가 표시됩니다.
- 요청된 권한을 부여합니다
- 애플리케이션은 자동으로 토큰을 저장합니다.
- 토큰을 자동으로 생성하고 저장합니다.
보안 참고 사항
파일 보호
.env
파일이나token.json
버전 제어에 커밋하지 마십시오.- Google 자격 증명을 안전하게 유지하세요
.gitignore
에 다음을 추가하세요.Copy
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
AI 애플리케이션에 인공 가상 비서(AVA) 툴셋에 대한 액세스를 제공하여 자연어를 통한 Gmail 통합 및 작업 관리를 가능하게 하는 맞춤형 MCP 서버입니다.
Related MCP Servers
- -securityFlicense-qualityEnables users to manage Gmail accounts using AI agent-assisted operations via an MCP protocol, supporting email search, reading, deletion, and sending with a voice-powered interface.Last updated -25TypeScript
- AsecurityAlicenseAqualityAn MCP server that lets AI assistants interact with your Lunchmoney data, enabling natural language queries about transactions, budgets, and spending patterns.Last updated -438TypeScriptMIT License
- -securityFlicense-qualityAn MCP server that enables AI assistants to access and interact with Google Classroom data, allowing users to view courses, course details, and assignments through natural language commands.Last updated -5081JavaScript
- -securityFlicense-qualityAn MCP server that connects AI assistants to SearchAgora, enabling users to search for, discover, and purchase products across the web through natural language conversations.Last updated -Python