Labsco
inspirit941 logo

Kakao Bot MCP Server

โ˜… 17

from inspirit941

Connects an AI agent to a Kakao Official Account using the Kakao Developers API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeNeeds API keys

Kakao Bot MCP Server

<!-- TOC --> <!-- /TOC -->

Model Context Protocol (MCP) server implementation that integrates the Kakao Developers API to connect an AI Agent to the Kakao Official Account.

MCP Server ๊ตฌํ˜„์ฒด๋กœ, ์นด์นด์˜ค Developers API๋ฅผ AI Agent์— ํ†ตํ•ฉํ•˜๋Š” ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค.

<br>

[!NOTE] This repository is NOT officially provided or maintained by Kakao. <br> It may not include complete functionality or comprehensive support. <br> ์นด์นด์˜ค์˜ ๊ฒฝ์šฐ ๋Œ€๋ถ€๋ถ„์˜ API๊ฐ€ ์‚ฌ์—…์ž๋“ฑ๋ก์ด ํฌํ•จ๋œ ๋น„์ฆˆ๋‹ˆ์Šค ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋‹จ์œ„๋กœ ๊ถŒํ•œ์„ ๊ด€๋ฆฌํ•˜๊ณ  ์žˆ์œผ๋ฏ€๋กœ, <br> ๊ฐœ์ธ์ด ์‚ฌ์šฉํ•˜๊ธฐ์—” ์ œํ•œ์ ์ž…๋‹ˆ๋‹ค.

<br>

์ฐธ๊ณ ๋ฌธ์„œ: https://developers.kakao.com/docs/latest/ko/kakaotalk-message/rest-api


์˜ˆ์‹œ

<img src="https://gitlab.com/-/project/69172217/uploads/89b84962ae9233c26bddd6318f60f97a/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA_2025-05-03_%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE_2.36.09.png" alt="์Šคํฌ๋ฆฐ์ƒท_2025-05-03_์˜คํ›„_2.36.09" width="550"> <br>

claude desktop์œผ๋กœ MCP tool ์‹คํ–‰

<img src="https://gitlab.com/-/project/69172217/uploads/e27b0f53e2776e6371fd2f5a0745299a/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA_2025-05-03_%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE_2.37.25.png" alt="์Šคํฌ๋ฆฐ์ƒท_2025-05-03_์˜คํ›„_2.37.25" width="330"> <br>

'๋‚˜์—๊ฒŒ ๋ฉ”์‹œ์ง€ ์ „๋‹ฌ' ๊ฒฐ๊ณผ

Tools

All tools require the __email_address__ input to identify the user's credentials.

<details> <summary><h3>Kakao TalkMessage API</h3></summary>
  1. send_text_template_to_me

    • Description: Sends a Kakao Talk text message to me.
    • Inputs:
      • __email_address__ (string, required): The email address associated with the Kakao account.
      • text (string, required, max 200 characters): The text content of the message.
      • link (object, required): An object defining the link associated with the text.
        • web_url (string, optional, uri format)
        • mobile_web_url (string, optional, uri format)
      • button_title (string, optional): The title of the button.
  2. send_feed_template_to_me

    • Description: Sends a Kakao Talk feed message to me.
    • Inputs:
      • __email_address__ (string, required)
      • content (object, required): The main content block of the feed message.
        • title (string, required)
        • description (string, required)
        • image_url (string, required, uri format)
        • image_width (integer, optional)
        • image_height (integer, optional)
        • link (object, required) - defines the link for the content
          • web_url (string, optional, uri format)
          • mobile_web_url (string, optional, uri format)
          • android_execution_params (string, optional)
          • ios_execution_params (string, optional)
      • item_content (object, optional): Additional item content for the feed. (See API documentation for nested structure)
      • social (object, optional): Social information like likes, comments, etc. (See API documentation for nested structure)
      • buttons (array of objects, optional): Buttons to include with the message. (Each object requires title and link)
  3. send_list_template_to_me

    • Description: Sends a Kakao Talk list message to me.
    • Inputs:
      • __email_address__ (string, required)
      • header_title (string, required): The title displayed at the top of the list.
      • contents (array of objects, required): A list of content items. Each item requires:
        • title (string, required)
        • description (string, required)
        • image_url (string, required, uri format)
        • image_width (integer, optional)
        • image_height (integer, optional)
        • link (object, required) - defines the link for the list item
          • web_url (string, optional, uri format)
          • mobile_web_url (string, optional, uri format)
          • android_execution_params (string, optional)
          • ios_execution_params (string, optional)
      • header_link (object, optional): A link for the header area. (See API documentation for nested structure)
      • buttons (array of objects, optional): Buttons to include with the message. (Each object requires title and link)
  4. send_location_template_to_me

    • Description: Sends a Kakao Talk location message to me.
    • Inputs:
      • __email_address__ (string, required)
      • content (object, required): The main content block for the location message.
        • title (string, required)
        • description (string, required)
        • image_url (string, required, uri format)
        • image_width (integer, optional)
        • image_height (integer, optional)
        • link (object, required) - defines the link for the content
          • web_url (string, optional, uri format)
          • mobile_web_url (string, optional, uri format)
          • android_execution_params (string, optional)
          • ios_execution_params (string, optional)
      • address (string, required): The address of the location.
      • buttons (array of objects, optional): Buttons to include with the message. (Each object requires title and link)
      • address_title (string, optional): A title for the address.
  5. send_calendar_template_to_me

    • Description: Sends a Kakao Talk calendar message to me.
    • Inputs:
      • __email_address__ (string, required)
      • content (object, required): The main content block for the calendar message.
        • title (string, required)
        • description (string, required)
        • link (object, required) - defines the link for the content
          • web_url (string, optional, uri format)
          • mobile_web_url (string, optional, uri format)
          • android_execution_params (string, optional)
          • ios_execution_params (string, optional)
        • image_url (string, optional, uri format)
      • id_type (string, required, enum: "event"): The type of calendar item.
      • id (string, required): The ID of the calendar item.
      • buttons (array of objects, optional): Buttons to include with the message. (Each object requires title and link)
  6. send_commerce_template_to_me

    • Description: Sends a Kakao Talk commerce message to me.
    • Inputs:
      • __email_address__ (string, required)
      • content (object, required): The main content block for the commerce message.
        • title (string, required)
        • image_url (string, required, uri format)
        • image_width (integer, optional)
        • image_height (integer, optional)
        • link (object, required) - defines the link for the content
          • web_url (string, optional, uri format)
          • mobile_web_url (string, optional, uri format)
          • android_execution_params (string, optional)
          • ios_execution_params (string, optional)
      • commerce (object, required): Commerce-specific information.
        • regular_price (integer, required)
        • discount_price (integer, optional)
        • discount_rate (integer, optional, 0-100)
      • buttons (array of objects, optional): Buttons to include with the message. (Each object requires title and link)
</details> <details> <summary><h3>Kakao TalkCalendar API</h3></summary>
  • ์นด์นด์˜ค ํ†ก์บ˜๋ฆฐ๋” API๋ฅผ ํ†ตํ•ด ์‚ฌ์šฉ์ž์˜ ์บ˜๋ฆฐ๋”๋ฅผ ์กฐํšŒํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.
    • ์ž‘์„ฑ์‹œ์  ๊ธฐ์ค€ '์‚ฌ์šฉ์ž ์บ˜๋ฆฐ๋” - ๋ชฉ๋ก ๊ฐ€์ ธ์˜ค๊ธฐ, ์„œ๋ธŒ ์บ˜๋ฆฐ๋” ์ƒ์„ฑ / ์ˆ˜์ • / ์‚ญ์ œ' ๊ธฐ๋Šฅ๋งŒ ์ง€์›๋ฉ๋‹ˆ๋‹ค.
    • ํ†ก์บ˜๋ฆฐ๋” API๋Š” ์นด์นด์˜ค์— ์‚ฌ์šฉ ๊ถŒํ•œ์„ ์‹ ์ฒญํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์‹ ์ฒญ ๋ฐฉ๋ฒ•์€ https://developers.kakao.com/docs/latest/ko/talkcalendar/common#policy-request-permission ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
  • ์ฐธ๊ณ ๋ฌธ์„œ: https://developers.kakao.com/docs/latest/ko/talkcalendar/rest-api
  1. get_calendar_list

    • Description: Retrieves the list of user calendars.
    • Inputs:
      • __email_address__ (string, required): The email address associated with the Kakao account.
  2. create_sub_calendar

    • Description: Creates a new sub-calendar for the user.
    • Inputs:
      • __email_address__ (string, required): The email address associated with the Kakao account.
      • name (string, required): The name of the sub calendar.
      • color (string, optional): The default color for events in the calendar.
      • reminder (integer, optional): The default reminder time for non-all-day events in minutes.
      • reminder_all_day (integer, optional): The default reminder time for all-day events in minutes.
  3. update_sub_calendar

    • Description: Updates an existing sub-calendar.
    • Inputs:
      • __email_address__ (string, required): The email address associated with the Kakao account.
      • calendar_id (string, required): The ID of the sub calendar to update.
      • name (string, optional): The new name for the sub calendar.
      • color (string, optional): The new default color for events in the calendar.
      • reminder (integer, optional): The new default reminder time for non-all-day events in minutes.
      • reminder_all_day (integer, optional): The new default reminder time for all-day events in minutes.
  4. delete_sub_calendar

    • Description: Deletes a user's sub-calendar.
    • Inputs:
      • __email_address__ (string, required): The email address associated with the Kakao account.
      • calendar_id (string, required): The ID of the sub calendar to delete.
</details>

installation

requirements: Python 3.13+

์นด์นด์˜ค ๊ณ„์ • ํ•„์š”

Step 1. developers.kakao.com ์—์„œ ์นด์นด์˜ค ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ƒ์„ฑ

์นด์นด์˜ค ์‹ ๊ทœ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ƒ์„ฑ ๋ฐฉ๋ฒ•์€ quick start๋ฌธ์„œ๋ฅผ ์ฐธ๊ณ ํ•ฉ๋‹ˆ๋‹ค.

<details> <summary>๋ฉ”์‹œ์ง€ API๋ฅผ ํ™œ์„ฑํ™”ํ•˜๊ธฐ ์œ„ํ•œ ์ถ”๊ฐ€์ž‘์—…</summary>

์‚ฌ์ดํŠธ ๋“ฑ๋ก

"๋‚ด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ > ์•ฑ ์„ค์ • > ํ”Œ๋žซํผ" ์˜ Web์—์„œ ์‚ฌ์ดํŠธ ๋„๋ฉ”์ธ์œผ๋กœ http://localhost:8000 ๋“ฑ๋ก

<br>

๋น„์ฆˆ ์•ฑ ๋“ฑ๋ก

๋น„์ฆˆ ์•ฑ ๋“ฑ๋ก. ์‚ฌ์—…์ž๋ฒˆํ˜ธ๊ฐ€ ์—†์–ด๋„ "๊ฐœ์ธ ๊ฐœ๋ฐœ์ž ๋น„์ฆˆ ์•ฑ" ๋“ฑ๋ก์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

<br>

์นด์นด์˜ค ๋กœ๊ทธ์ธ ํ™œ์„ฑํ™”

์นด์นด์˜ค ๋กœ๊ทธ์ธ์„ ํ™œ์„ฑํ™”ํ•œ๋‹ค.

<br>

๋™์˜ํ•ญ๋ชฉ ์„ค์ •

  • ์ œํ’ˆ ์„ค์ • > ์นด์นด์˜ค ๋กœ๊ทธ์ธ > ๋™์˜ํ•ญ๋ชฉ์—์„œ '๋‹‰๋„ค์ž„', '์นด์นด์˜ค๊ณ„์ •(์ด๋ฉ”์ผ)', '์นด์นด์˜คํ†ก ๋ฉ”์‹œ์ง€ ์ „์†ก' ์„ ํ™œ์„ฑํ™”ํ•œ๋‹ค.
  • OpenID ํ™œ์„ฑํ™”ํ•œ๋‹ค.
  • ํ†ก์บ˜๋ฆฐ๋” API๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ https://developers.kakao.com/docs/latest/ko/talkcalendar/common#policy-request-permission ๋ฅผ ์ฐธ๊ณ ํ•ด์„œ ์‚ฌ์šฉ ๊ถŒํ•œ์„ ์‹ ์ฒญํ•ด์•ผ ํ•œ๋‹ค.
</details>

Step 2. ๋กœ์ปฌํ™˜๊ฒฝ ์„ค์ •

๋กœ์ปฌ์— uv๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผ ํ•œ๋‹ค.

git clone git@github.com:inspirit941/kakao-bot-mcp-server.git
cd kakao-bot-mcp-server
pip install uv
uv sync

# inspector ์‹คํ–‰
npx @modelcontextprotocol/inspector uv --directory .  run mcp-kakao

# MCP server ์‹คํ–‰
uv run mcp-kakao

์ •์ƒ์ ์œผ๋กœ ๋™์ž‘ํ•˜๋ ค๋ฉด ๋‘ ๊ฐœ์˜ ํŒŒ์ผ์ด ํ•„์š”ํ•˜๋‹ค. .accounts.json, .kauth.json ํ”„๋กœ์ ํŠธ root ๊ฒฝ๋กœ์— ์•„๋ž˜ ํŒŒ์ผ์„ ์ƒ์„ฑํ•œ๋‹ค.

.accounts.json


{
    "accounts": [
        {
            "email": "your-email@kakao.com",
            "account_type": "personal",
            "extra_info": "Additional info that you want to tell Claude: E.g. 'Contains Family Calendar'"
        }
    ]
}
  • email: ์นด์นด์˜ค ๊ณ„์ • ์ด๋ฉ”์ผ์ฃผ์†Œ.
  • account_type: personal ๊ณ ์ •.
  • extra_info: MCP server์— ์ „๋‹ฌํ•  ์ถ”๊ฐ€์ •๋ณด.

.kauth.json

{
  "web": {
    "client_id": "rest-api-key",
    "auth_uri": "https://kauth.kakao.com/oauth/authorize",
    "token_uri": "https://kauth.kakao.com/oauth/token",
    "client_secret": "your_client_secret",
    "redirect_uris": ["http://localhost:8000/code"],
    "revoke_uri": "https://kapi.kakao.com/v2/user/revoke/scopes",
    "token_info_uri": "https://kauth.kakao.com/oauth/tokeninfo"
  }
}
  • client_id: ์นด์นด์˜ค ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์ œ๊ณตํ•˜๋Š” REST_API key
  • client_secret: ์นด์นด์˜ค ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ๋ฐœ๊ธ‰๋ฐ›์„ ์ˆ˜ ์žˆ๋Š” client_secret. ์ž„์˜์˜ ๋ฌธ์ž์—ด์„ ๋„ฃ์–ด๋„ ๋™์ž‘ํ•จ
  • ๋‚˜๋จธ์ง€ ํ•„๋“œ๋Š” ๊ณ ์ •.

claude desktop ์„ค์ •

{
  "mcpServers": {
    "mcp-kakao": {
      "command": "uv",
      "args": [
        "--directory",
        "your-project-path/kakao-bot-mcp-server",
        "run",
        "mcp-kakao"
      ]
    }
  }
}

๋™์ž‘ ๋ฐฉ์‹

<br>

LLM์ด MCP Tool์„ ์‹คํ–‰ํ•˜๋ฉด

  • ํ”„๋กœ์ ํŠธ root ๊ฒฝ๋กœ์— .oauth2.<์นด์นด์˜ค๋ฉ”์ผ์ฃผ์†Œ>.json ํŒŒ์ผ์ด ์žˆ๋Š”์ง€ ํ™•์ธํ•œ๋‹ค.
    • ํŒŒ์ผ์ด ์—†์„ ๊ฒฝ์šฐ, ์›น ๋ธŒ๋ผ์šฐ์ €์— ์นด์นด์˜ค OAuth2 ์„œ๋ฒ„์— ๋กœ๊ทธ์ธ ํ™”๋ฉด์„ ๋„์šด๋‹ค. (https://accounts.kakao.com/login?continue=...)
    • ํŒŒ์ผ์ด ์žˆ์„ ๊ฒฝ์šฐ, ํ† ํฐ์ด ๋งŒ๋ฃŒ๋˜์ง€ ์•Š์•˜๋Š”์ง€ ํ™•์ธํ•œ๋‹ค. ๋งŒ๋ฃŒ๋˜์—ˆ๋‹ค๋ฉด, refresh token์œผ๋กœ ์žฌ๋ฐœ๊ธ‰๋ฐ›๋Š”๋‹ค. refresh token๋„ ๋งŒ๋ฃŒ๋˜์—ˆ์„ ๊ฒฝ์šฐ, tool์—์„œ ๋กœ๊ทธ์ธํ•  ์ˆ˜ ์žˆ๋Š” url ์ฃผ์†Œ๋ฅผ ๋ฆฌํ„ดํ•œ๋‹ค.
  • ๋กœ๊ทธ์ธ์— ์„ฑ๊ณตํ•˜๋ฉด, ํ”„๋กœ์ ํŠธ root ๊ฒฝ๋กœ์— .oauth2.<์นด์นด์˜ค๋ฉ”์ผ์ฃผ์†Œ>.json ์ด๋ฆ„์œผ๋กœ access_token ์ •๋ณด๋ฅผ ์ €์žฅํ•œ๋‹ค.

MCP tool์€ json ํŒŒ์ผ์˜ access token์„ ์‚ฌ์šฉํ•˜๋Š” ๊ตฌ์กฐ.