MCP Starter for Puch AI

MCP Starter for Puch AI

A starter template for creating MCP servers that work with Puch AI, featuring ready-to-use tools for job searching and image processing. Includes examples for Bearer token authentication, OAuth integration with Google and GitHub, and demonstrates user-scoped data management.

Category
访问服务器

README

MCP Starter for Puch AI

This is a starter template for creating your own Model Context Protocol (MCP) server that works with Puch AI. It comes with ready-to-use tools for job searching and image processing.

What is MCP?

MCP (Model Context Protocol) allows AI assistants like Puch to connect to external tools and data sources safely. Think of it like giving your AI extra superpowers without compromising security.

What's Included in This Starter?

Folders

  • mcp-bearer-token/
    Example MCP servers using Bearer token auth (required by Puch AI). Includes:

    • mcp_starter.py
      A minimal MCP server with:
      • Text input/output tool (echo-style processing)
      • Image input/output tool (e.g., convert to black & white)
      • Bearer token validation
    • puch-user-id-mcp-example.py
      A task management MCP server that demonstrates how to use puch_user_id (a unique, Puch-provided user identifier) to scope tasks and data per user.
  • mcp-google-oauth/
    Example MCP server showing how to implement OAuth with Google for MCP authentication/authorization.

  • mcp-oauth-github/
    Example MCP server showing how to implement OAuth with GitHub for MCP authentication/authorization.

Quick Setup Guide

Step 1: Install Dependencies

First, make sure you have Python 3.11 or higher installed. Then:

# Create virtual environment
uv venv

# Install all required packages
uv sync

# Activate the environment
source .venv/bin/activate

Step 2: Set Up Environment Variables

Create a .env file in the project root:

# Copy the example file
cp .env.example .env

Then edit .env and add your details:

AUTH_TOKEN=your_secret_token_here
MY_NUMBER=919876543210

Important Notes:

  • AUTH_TOKEN: This is your secret token for authentication. Keep it safe!
  • MY_NUMBER: Your WhatsApp number in format {country_code}{number} (e.g., 919876543210 for +91-9876543210)

Step 3: Run the Server

cd mcp-bearer-token
python mcp_starter.py

You'll see: 🚀 Starting MCP server on http://0.0.0.0:8086

Step 4: Make It Public (Required by Puch)

Since Puch needs to access your server over HTTPS, you need to expose your local server:

Option A: Using ngrok (Recommended)

  1. Install ngrok: Download from https://ngrok.com/download

  2. Get your authtoken:

    • Go to https://dashboard.ngrok.com/get-started/your-authtoken
    • Copy your authtoken
    • Run: ngrok config add-authtoken YOUR_AUTHTOKEN
  3. Start the tunnel:

    ngrok http 8086
    

Option B: Deploy to Cloud

You can also deploy this to services like:

  • Railway
  • Render
  • Heroku
  • DigitalOcean App Platform

How to Connect with Puch AI

  1. Open Puch AI in your browser
  2. Start a new conversation
  3. Use the connect command:
    /mcp connect https://your-domain.ngrok.app/mcp your_secret_token_here
    

Debug Mode

To get more detailed error messages:

/mcp diagnostics-level debug

Customizing the Starter

Adding New Tools

  1. Create a new tool function:

    @mcp.tool(description="Your tool description")
    async def your_tool_name(
        parameter: Annotated[str, Field(description="Parameter description")]
    ) -> str:
        # Your tool logic here
        return "Tool result"
    
  2. Add required imports if needed

📚 Additional Documentation Resources

Official Puch AI MCP Documentation

  • Main Documentation: https://puch.ai/mcp
  • Protocol Compatibility: Core MCP specification with Bearer & OAuth support
  • Command Reference: Complete MCP command documentation
  • Server Requirements: Tool registration, validation, HTTPS requirements

Technical Specifications

  • JSON-RPC 2.0 Specification: https://www.jsonrpc.org/specification (for error handling)
  • MCP Protocol: Core protocol messages, tool definitions, authentication

Supported vs Unsupported Features

✓ Supported:

  • Core protocol messages
  • Tool definitions and calls
  • Authentication (Bearer & OAuth)
  • Error handling

✗ Not Supported:

  • Videos extension
  • Resources extension
  • Prompts extension

Getting Help

  • Join Puch AI Discord: https://discord.gg/VMCnMvYx
  • Check Puch AI MCP docs: https://puch.ai/mcp
  • Puch WhatsApp Number: +91 99988 81729

Happy coding! 🚀

Use the hashtag #BuildWithPuch in your posts about your MCP!

This starter makes it super easy to create your own MCP server for Puch AI. Just follow the setup steps and you'll be ready to extend Puch with your custom tools!

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选