MyeongJungKwon/telegram-bot-mcp-vercel
If you are the rightful owner of telegram-bot-mcp-vercel 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.
The Model Context Protocol (MCP) server is a specialized server designed to handle model context operations, providing a structured way to manage and interact with various model-based applications.
generate-endpoint
API endpoint generation tool.
analyze-api
Tool for analyzing API structures and operations.
analyze-telegram-message
Tool for analyzing Telegram messages.
Telegram Bot + MCP Server on Vercel
Vercelμ λ°°ν¬ κ°λ₯ν TypeScript κΈ°λ° Telegram Botκ³Ό MCP (Model Context Protocol) Server ν΅ν© νλ‘μ νΈμ λλ€.
π νΉμ§
- TypeScript 100%: μμ ν νμ μμ μ±
- Vercel μ΅μ ν: μλ²λ¦¬μ€ νκ²½μ νΉν
- MCP ν΅ν©: Model Context Protocol μλ² λ΄μ₯
- Telegraf νλ μμν¬: κ°λ ₯ν Telegram Bot κΈ°λ₯
- μ¦μ λ°°ν¬: νκ²½λ³μ μ€μ λ§μΌλ‘ λ°°ν¬ μλ£
π μ¬μ μꡬμ¬ν
- Node.js 18.0.0 μ΄μ
- Telegram Bot Token
- Vercel κ³μ
π οΈ μ€μΉ λ° μ€μ
1. νλ‘μ νΈ ν΄λ‘
git clone <your-repo-url>
cd telegram-bot-mcp-vercel
2. μμ‘΄μ± μ€μΉ
npm install
# λλ
yarn install
3. νκ²½λ³μ μ€μ
cp .env.example .env
.env
νμΌμ νΈμ§νμ¬ λ€μ κ°λ€μ μ€μ νμΈμ:
BOT_TOKEN=your_telegram_bot_token_here
WEBHOOK_URL=https://your-vercel-app.vercel.app/webhook
4. λ‘컬 κ°λ°
npm run dev
π Vercel λ°°ν¬
1. Vercel CLI μ¬μ©
# Vercel CLI μ€μΉ (μ²μλ§)
npm i -g vercel
# λ°°ν¬
vercel
2. GitHub μ°λ λ°°ν¬
- GitHubμ νλ‘μ νΈ νΈμ
- Vercel Dashboardμμ Import
- νκ²½λ³μ μ€μ :
BOT_TOKEN
: Telegram Bot TokenWEBHOOK_URL
: λ°°ν¬λ URL + /webhook
3. μΉν μ€μ
λ°°ν¬ μλ£ ν Telegramμ μΉν μ λ±λ‘ν΄μΌ ν©λλ€:
curl -X POST "https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook" \
-H "Content-Type: application/json" \
-d '{"url": "https://your-vercel-app.vercel.app/webhook"}'
π€ Bot λͺ λ Ήμ΄
/start
- λ΄ μμ λ° νμ λ©μμ§/help
- λμλ§ λ³΄κΈ°/mcp
- MCP μλ² μν νμΈ/ping
- μλ² μλ΅ ν μ€νΈ/echo [λ©μμ§]
- λ©μμ§ λ°λΌνκΈ°
π§ MCP μλ² κΈ°λ₯
μλν¬μΈνΈ
GET /mcp
- MCP μλ² μν λ° μ 보POST /mcp
- MCP μμ² μ²λ¦¬
μ 곡 λꡬ
- generate-endpoint: API μλν¬μΈνΈ μμ±
- analyze-api: API λΆμ
- analyze-telegram-message: ν λ κ·Έλ¨ λ©μμ§ λΆμ
μ 곡 리μμ€
- api-spec: Telegram Bot API λͺ μΈμ
π νλ‘μ νΈ κ΅¬μ‘°
telegram-bot-mcp-vercel/
βββ api/
β βββ webhook.ts # Telegram Bot μΉν
νΈλ€λ¬
β βββ mcp.ts # MCP μλ² κ΅¬ν
βββ package.json # νλ‘μ νΈ μ€μ
βββ tsconfig.json # TypeScript μ€μ
βββ vercel.json # Vercel λ°°ν¬ μ€μ
βββ .env.example # νκ²½λ³μ μμ
βββ README.md # νλ‘μ νΈ λ¬Έμ
π API ν μ€νΈ
Telegram Bot ν μ€νΈ
λ΄κ³Ό λννμ¬ κΈ°λ₯μ ν μ€νΈν μ μμ΅λλ€.
MCP μλ² ν μ€νΈ
# μλ² μν νμΈ
curl https://your-vercel-app.vercel.app/mcp
# λꡬ λͺ©λ‘ μ‘°ν
curl -X POST https://your-vercel-app.vercel.app/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/list"}'
π‘οΈ λ³΄μ κ³ λ €μ¬ν
- BOT_TOKENμ μ λ μ½λμ νλμ½λ©νμ§ λ§μΈμ
- Vercel νκ²½λ³μλ₯Ό ν΅ν΄μλ§ λ―Όκ°ν μ 보λ₯Ό κ΄λ¦¬νμΈμ
- νλ‘λμ μμλ μΉν URL κ²μ¦μ μΆκ°νμΈμ
π μ°Έκ³ μλ£
π€ κΈ°μ¬νκΈ°
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
π λΌμ΄μ μ€
μ΄ νλ‘μ νΈλ MIT λΌμ΄μ μ€ νμ λ°°ν¬λ©λλ€.
β λ¬Έμ ν΄κ²°
μΌλ°μ μΈ λ¬Έμ λ€
1. Botμ΄ μλ΅νμ§ μλ κ²½μ°
- BOT_TOKENμ΄ μ¬λ°λ₯΄κ² μ€μ λμλμ§ νμΈ
- μΉν μ΄ μ¬λ°λ₯΄κ² λ±λ‘λμλμ§ νμΈ
- Vercel ν¨μ λ‘κ·Έ νμΈ
2. MCP μλ² μ€λ₯
- MCP SDK λ²μ νΈνμ± νμΈ
- TypeScript μ»΄νμΌ μ€λ₯ νμΈ
3. λ°°ν¬ μ€ν¨
- Node.js λ²μ νμΈ (18.0.0 μ΄μ)
- νκ²½λ³μ μ€μ νμΈ
λ μμΈν λμμ΄ νμνλ©΄ Issuesλ₯Ό μμ±ν΄μ£ΌμΈμ!