mcp-server-google-calendar

mcp-server-google-calendar

3.1

If you are the rightful owner of mcp-server-google-calendar and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

MCP ๊ธฐ๋ฐ˜์˜ Google Calendar ํ†ตํ•ฉ ์„œ๋ฒ„๋กœ, Claude Desktop๊ณผ ๊ฐ™์€ MCP ํด๋ผ์ด์–ธํŠธ์—์„œ Google Calendar์— ์ผ์ •์„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

MCP Google Calendar Server

MCP(Model Context Protocol) ๊ธฐ๋ฐ˜์˜ Google Calendar ํ†ตํ•ฉ ์„œ๋ฒ„์ž…๋‹ˆ๋‹ค. Claude Desktop๊ณผ ๊ฐ™์€ MCP ํด๋ผ์ด์–ธํŠธ์—์„œ Google Calendar์— ์ผ์ •์„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ๋Šฅ

  • Google OAuth 2.0 ์ธ์ฆ
  • Google Calendar ์ผ์ • ์ถ”๊ฐ€
  • Google Calendar ์ผ์ • ์กฐํšŒ (๊ธฐ๊ฐ„๋ณ„ ์กฐํšŒ ์ง€์›)
  • ์˜ค๋Š˜ ๋‚ ์งœ ์กฐํšŒ
  • ํ•œ๊ตญ ์‹œ๊ฐ„๋Œ€(KST) ์ง€์›
  • ์ƒ์„ธํ•œ ์—๋Ÿฌ ์ฒ˜๋ฆฌ ๋ฐ ๋กœ๊น…

์„ค์น˜ ๋ฐฉ๋ฒ•

  1. ์ €์žฅ์†Œ ํด๋ก 
git clone [repository-url]
cd mcp-server-google-calendar
  1. ์˜์กด์„ฑ ์„ค์น˜
npm install
  1. ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ • .env ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๊ณ  ๋‹ค์Œ ๋‚ด์šฉ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค:
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret

Google Cloud Console ์„ค์ •

  1. Google Cloud Console์—์„œ ์ƒˆ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
  2. Google Calendar API๋ฅผ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค.
  3. OAuth 2.0 ํด๋ผ์ด์–ธํŠธ ID๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค:
    • ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์œ ํ˜•: "๋ฐ์Šคํฌํ†ฑ ์•ฑ"
    • ์ƒ์„ฑ๋œ ํด๋ผ์ด์–ธํŠธ ID์™€ ์‹œํฌ๋ฆฟ์„ .env ํŒŒ์ผ์— ์„ค์ •

Claude Desktop ์—ฐ๋™ ์„ค์ •

  1. Claude Desktop ์„ค์น˜

    • Claude Desktop ๋‹ค์šด๋กœ๋“œ
    • MCP ๊ธฐ๋Šฅ์€ ์›น ๋ฒ„์ „์ด ์•„๋‹Œ ๋ฐ์Šคํฌํ†ฑ ์•ฑ์—์„œ๋งŒ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
  2. MCP ์„œ๋ฒ„ ์„ค์ •

    • ~/Library/Application Support/Claude/claude_desktop_config.json ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๊ณ  ๋‹ค์Œ ๋‚ด์šฉ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค:
    {
      "mcp-server-google-calendar": {
        "command": "/usr/local/bin/node",
        "args": ["/{์ ˆ๋Œ€๊ฒฝ๋กœ}/mcp-server-google-calendar/dist/main.js"],
        "env": {
          "GOOGLE_CLIENT_ID": "your_client_id",
          "GOOGLE_CLIENT_SECRET": "your_client_secret",
          "NODE_ENV": "production"
        }
      }
    }
    

    ์„ค์ • ํ•ญ๋ชฉ ์„ค๋ช…:

    • command: Node.js ์‹คํ–‰ ํŒŒ์ผ์˜ ์ ˆ๋Œ€ ๊ฒฝ๋กœ
    • args: ์‹คํ–‰ํ•  JavaScript ํŒŒ์ผ์˜ ์ ˆ๋Œ€ ๊ฒฝ๋กœ (TypeScript ๋นŒ๋“œ ํ›„ ์ƒ์„ฑ๋˜๋Š” ํŒŒ์ผ)
    • cwd: ํ”„๋กœ์ ํŠธ์˜ ์ž‘์—… ๋””๋ ‰ํ† ๋ฆฌ ์ ˆ๋Œ€ ๊ฒฝ๋กœ
    • env: ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •
      • GOOGLE_CLIENT_ID: Google Cloud Console์—์„œ ์ƒ์„ฑํ•œ ํด๋ผ์ด์–ธํŠธ ID
      • GOOGLE_CLIENT_SECRET: Google Cloud Console์—์„œ ์ƒ์„ฑํ•œ ํด๋ผ์ด์–ธํŠธ ์‹œํฌ๋ฆฟ
      • NODE_ENV: ์‹คํ–‰ ํ™˜๊ฒฝ ์„ค์ •

    ์ฃผ์˜: ์œ„ ์˜ˆ์‹œ๋Š” ํ˜„์žฌ ์„ค์น˜๋œ ๊ฒฝ๋กœ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ํ™˜๊ฒฝ์—์„œ๋Š” ํ•ด๋‹น ํ™˜๊ฒฝ์˜ ์ ˆ๋Œ€ ๊ฒฝ๋กœ๋กœ ์ˆ˜์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

  3. ๋นŒ๋“œ ๋ฐ ์ค€๋น„

    # TypeScript ์ปดํŒŒ์ผ
    npm run build
    
    # Node.js ์‹คํ–‰ ํŒŒ์ผ ์œ„์น˜ ํ™•์ธ
    which node
    
  4. Claude Desktop ์žฌ์‹œ์ž‘

    • ์„ค์ • ์ ์šฉ์„ ์œ„ํ•ด Claude Desktop์„ ์žฌ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.
    • ์ƒํƒœ ์•„์ด์ฝ˜์„ ํด๋ฆญํ•˜์—ฌ ์„œ๋ฒ„ ์—ฐ๊ฒฐ ์ƒํƒœ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    • ์—ฐ๊ฒฐ ๋ฌธ์ œ ๋ฐœ์ƒ ์‹œ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋„๊ตฌ

googleAuthLogin

Google Calendar API ์ธ์ฆ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

// Claude์—์„œ ์‚ฌ์šฉ ์˜ˆ์‹œ
tool("googleAuthLogin");

addCalendarEvent

Google Calendar์— ์ƒˆ๋กœ์šด ์ผ์ •์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

// Claude์—์„œ ์‚ฌ์šฉ ์˜ˆ์‹œ
tool("addCalendarEvent", {
  title: "ํšŒ์˜",
  startTime: "2024-03-20 15:00", // YYYY-MM-DD HH:mm ํ˜•์‹
  duration: "60", // ๋ถ„ ๋‹จ์œ„
});

listCalendarEvents

ํŠน์ • ๊ธฐ๊ฐ„์˜ Google Calendar ์ผ์ •์„ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.

// Claude์—์„œ ์‚ฌ์šฉ ์˜ˆ์‹œ
tool("listCalendarEvents", {
  period: "2024-03-20~2024-03-27", // YYYY-MM-DD~YYYY-MM-DD ํ˜•์‹
});

getTodayDate

์˜ค๋Š˜ ๋‚ ์งœ๋ฅผ YYYY-MM-DD ํ˜•์‹์œผ๋กœ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

// Claude์—์„œ ์‚ฌ์šฉ ์˜ˆ์‹œ
tool("getTodayDate");

๋””๋ฒ„๊น…

๋กœ๊ทธ ํ™•์ธ

# ์‹ค์‹œ๊ฐ„ ๋กœ๊ทธ ํ™•์ธ
tail -n 20 -F ~/Library/Logs/Claude/mcp*.log

๊ฐœ๋ฐœ์ž ๋„๊ตฌ ํ™œ์„ฑํ™”

  1. ๊ฐœ๋ฐœ์ž ์„ค์ • ํŒŒ์ผ ์ƒ์„ฑ:
echo '{"allowDevTools": true}' > ~/Library/Application\ Support/Claude/developer_settings.json
  1. ๊ฐœ๋ฐœ์ž ๋„๊ตฌ ์—ด๊ธฐ: Command-Option-Shift-i

์—๋Ÿฌ ์ฒ˜๋ฆฌ

์„œ๋ฒ„๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ƒํ™ฉ์—์„œ ์ ์ ˆํ•œ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค:

  • Google ์ธ์ฆ์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ
  • ์ž˜๋ชป๋œ ์‹œ๊ฐ„ ํ˜•์‹์ด ์ž…๋ ฅ๋œ ๊ฒฝ์šฐ
  • ํ•„์ˆ˜ ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ๋ˆ„๋ฝ๋œ ๊ฒฝ์šฐ
  • Google Calendar API ํ˜ธ์ถœ ์‹คํŒจ ์‹œ

๋กœ๊น…

์„œ๋ฒ„๋Š” Pino ๋กœ๊ฑฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์Œ ์ •๋ณด๋ฅผ ๊ธฐ๋กํ•ฉ๋‹ˆ๋‹ค:

  • ์„œ๋ฒ„ ์‹œ์ž‘/์ข…๋ฃŒ
  • ๋„๊ตฌ ํ˜ธ์ถœ ๋ฐ ์‘๋‹ต
  • ์ธ์ฆ ํ”„๋กœ์„ธ์Šค
  • ์—๋Ÿฌ ๋ฐ ์˜ˆ์™ธ ์ƒํ™ฉ

๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ •

  1. TypeScript ์ปดํŒŒ์ผ
npm run build
  1. ๊ฐœ๋ฐœ ๋ชจ๋“œ ์‹คํ–‰ (์ž๋™ ์žฌ์‹œ์ž‘)
npm run dev
  1. ๋ฆฐํŠธ ๊ฒ€์‚ฌ
npm run lint

๋ฌธ์ œ ํ•ด๊ฒฐ

  1. ์„œ๋ฒ„ ์—ฐ๊ฒฐ ๋ฌธ์ œ

    • Claude Desktop ๋กœ๊ทธ ํ™•์ธ
    • ์„œ๋ฒ„ ํ”„๋กœ์„ธ์Šค ์‹คํ–‰ ์ƒํƒœ ํ™•์ธ
    • ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ • ํ™•์ธ
    • ์ ˆ๋Œ€ ๊ฒฝ๋กœ ์‚ฌ์šฉ ์—ฌ๋ถ€ ํ™•์ธ
  2. ์ธ์ฆ ๋ฌธ์ œ

    • Google Cloud Console์—์„œ API ํ™œ์„ฑํ™” ์ƒํƒœ ํ™•์ธ
    • ํด๋ผ์ด์–ธํŠธ ID์™€ ์‹œํฌ๋ฆฟ ์žฌํ™•์ธ
    • OAuth ๋™์˜ ํ™”๋ฉด ์„ค์ • ํ™•์ธ

๋ผ์ด์„ ์Šค

MIT License