Sponsored by Deepsite.site

MCP Calendar Tool Server

创建者
KyanBergeron4Runra year ago
内容

MCP Calendar Tool Server

A FastAPI-based MCP (Model Context Protocol) server that provides calendar management tools for AI agents running in n8n.

Features

  • Server-Sent Events (SSE) for real-time tool discovery
  • HTTP endpoints for tool execution
  • Calendar management tools:
    • Check availability
    • Add events
    • Update events
    • Delete events
  • API key authentication
  • Mock implementations ready for real calendar API integration

Setup

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Create a .env file with your API key:
    API_KEY=your-secret-key-here
    

Running the Server

uvicorn main:app --host 0.0.0.0 --port 5000

API Endpoints

Tool Discovery

  • GET /mcp-events
    • SSE stream of available tools
    • Used by n8n MCP Client for tool discovery

Tool Execution

  • POST /mcp/message
    • Execute calendar tools
    • Requires X-API-Key header
    • Accepts JSON payload with tool name and parameters

Available Tools

Check Availability

{
  "name": "calendar.check_availability",
  "parameters": {
    "start_time": "2024-01-01T10:00:00Z",
    "end_time": "2024-01-01T11:00:00Z"
  }
}

Add Event

{
  "name": "calendar.add_event",
  "parameters": {
    "title": "Meeting",
    "start_time": "2024-01-01T10:00:00Z",
    "end_time": "2024-01-01T11:00:00Z",
    "description": "Team meeting"
  }
}

Update Event

{
  "name": "calendar.update_event",
  "parameters": {
    "event_id": "event_123",
    "title": "Updated Meeting",
    "start_time": "2024-01-01T10:00:00Z",
    "end_time": "2024-01-01T11:00:00Z",
    "description": "Updated team meeting"
  }
}

Delete Event

{
  "name": "calendar.delete_event",
  "parameters": {
    "event_id": "event_123"
  }
}

Development

The project is structured as follows:

/my_mcp_server/
├── main.py              # FastAPI app and routes
├── auth.py             # API key authentication
├── tools/
│   └── calendar.py     # Calendar tool implementations
├── schemas/
│   └── calendar_schemas.py  # Pydantic models
└── requirements.txt    # Python dependencies

Testing

  1. Start the server
  2. Use the n8n MCP Client node to connect to http://localhost:8000/mcp-events
  3. Test tool execution using the /mcp/message endpoint

Future Improvements

  • Integration with real calendar APIs (Google Calendar, Cal.com, etc.)
  • Enhanced error handling and validation
  • Rate limiting and request throttling
  • Additional calendar management features
  • Webhook support for event notifications
推荐的 MCP Server
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
ChatWiseThe second fastest AI chatbot™
Tavily Mcp
Serper MCP ServerA Serper MCP Server
CursorThe AI Code Editor
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
Amap Maps高德地图官方 MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"