Sponsored by Deepsite.site

AI Sticky Notes MCP Server

Created By
pi-prakhar8 months ago
Content

AI Sticky Notes MCP Server

A simple note-taking system built with the Model Context Protocol (MCP) that allows AI assistants to create, read, and summarize notes.

Overview

This project implements a lightweight note-taking system that demonstrates core MCP concepts with the following features:

  • Add new notes to a central repository
  • Read all existing notes
  • Access the latest note
  • Generate AI summaries of stored notes

The service is built using FastMCP, making it easy to integrate with AI assistants like Claude Desktop or Cursor.

Prerequisites

  • Python 3.8+
  • uv package manager (https://github.com/astral-sh/uv)
  • Claude Desktop (for using with Claude)
  • Cursor IDE (for using with Cursor's AI assistant)

Installation

Clone the repository

git clone https://github.com/pi-prakhar/mcp-server-demo.git
cd mcp-server-demo

Install dependencies

This project uses a pyproject.toml file with uv for dependency management. Install the dependencies with:

# Install dependencies using uv
uv pip install -e .

Run the server

For development and testing:

uv run mcp dev main.py

To install the server for Claude Desktop:

uv run mcp install main.py

Connecting to Claude Desktop

Automatic setup

After running the installation command, you can set up Claude Desktop automatically:

mcp setup --app Claude

Manual setup

Alternatively, edit the Claude Desktop configuration file:

  • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • On Windows: %APPDATA%/Claude/claude_desktop_config.json

Add the following to the configuration file:

{
  "mcpServers": {
    "Demo": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "/full/path/to/your/main.py"
      ]
    }
  }
}

Note: If Claude reports errors finding the uv command, use the full path to the uv executable. To find the full path:

# On macOS/Linux
which uv

# On Windows (Command Prompt)
where uv

# On Windows (PowerShell)
Get-Command uv | Select-Object -ExpandProperty Source

Then use the full path in your configuration:

{
 "mcpServers": {
   "Demo": {
     "command": "/full/path/to/your/uv",
     "args": [
       "run",
       "--with",
       "mcp[cli]",
       "mcp",
       "run",
       "/full/path/to/your/main.py"
     ]
   }
 }
}

Alternatively, you can create a symlink to uv in a directory that's in your PATH:

# On macOS/Linux
sudo ln -s /path/to/your/uv /usr/local/bin/uv

# On Windows (run Command Prompt as Administrator)
mklink C:\Windows\System32\uv.exe C:\path\to\your\uv.exe

Finalizing setup

  1. After updating your configuration file, restart Claude Desktop
  2. You should see a hammer icon in the bottom right corner of the input box
  3. Click on the hammer to verify the AI Sticky Notes tools are available

Integrating with Cursor

Global Setup

  1. Open Cursor IDE
  2. Go to Cursor Settings > Features > MCP
  3. Click on the + Add New MCP Server button
  4. Fill out the form:
    • Type: Select stdio as the transport
    • Name: Enter ai-sticky-notes or any descriptive name
    • Command: Enter the full command to run the server:
      uv run --with mcp[cli] mcp run /full/path/to/your/main.py
      
  5. Click Add
  6. You may need to press the refresh button to populate the tool list

Project-Specific Setup

Alternatively, set up for your specific project:

  1. Create a .cursor/mcp.json file in your project directory with:
    {
      "mcpServers": {
        "ai-sticky-notes": {
          "command": "uv",
          "command": "uv",
          "args": [
            "run",
            "--with",
            "mcp[cli]",
            "mcp",
            "run",
            "/full/path/to/your/main.py"
          ]
        }
      }
    }
    

Important Notes

  • Resources Limitation: Cursor currently only supports MCP tools but not resources. This means the notes://latest resource will not be available in Cursor.
  • Tool Approval: By default, Cursor will ask for your approval before running any MCP tools. You can enable "Yolo mode" in settings to allow automatic execution.
  • Tool Usage: The Agent will automatically use MCP tools when relevant. You can also prompt specific tool usage by mentioning the tool by name or description.

Features

Tools

  • add_note - Append a new note to the notes file
  • read_notes - Read and return all notes from the notes file

Resources

  • notes://latest - Get the latest note from the notes file

Prompts

  • note_summary_prompt - Generate a summary of the current notes

Example Usage

Once connected to Claude or Cursor's AI assistant, you can interact with the note system using natural language:

User: Add a reminder to buy groceries tomorrow
AI: I'll add that note for you.
    [Uses add_note tool]
    Note added successfully!

User: What notes do I currently have?

AI: Let me check your notes:
    [Uses read_notes tool]
    - Buy groceries: milk, eggs, bread
    - Call dentist to reschedule appointment
    - Meeting with team at 3pm tomorrow

User: What was the most recent note I added?

AI: Your most recent note is:
    [Uses notes://latest resource]
    Meeting with team at 3pm tomorrow

User: Can you summarize all my notes?

AI: [Uses note_summary_prompt]
    Your notes contain reminders about shopping for basic groceries (milk, eggs, bread), 
    calling the dentist to change your appointment time, and an upcoming team meeting 
    scheduled for tomorrow at 3pm.

Project Structure

  • main.py - Main MCP server implementation with tool definitions
  • notes.txt - File where notes are stored

Customization

You can modify the NOTES_FILE path in main.py to change where notes are stored.

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. The MCP dev mode provides helpful debugging information:

uv run mcp dev main.py
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Serper MCP ServerA Serper MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
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"
Amap Maps高德地图官方 MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
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.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
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.
CursorThe AI Code Editor
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
WindsurfThe new purpose-built IDE to harness magic
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp