mcp-server-stickynotes

SivakumarBalu/mcp-server-stickynotes

3.2

If you are the rightful owner of mcp-server-stickynotes 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.

This project sets up a Model Context Protocol (MCP) server using Python and UV for dependency management.

Tools
  1. greet

    Generate a greeting for the given name.

MCP Server with UV

This project demonstrates how to set up and run a Model Context Protocol (MCP) server using the official Python SDK, managed with UV for dependency management.

Prerequisites

  • Python 3.8 or higher
  • UV - A fast Python package installer and resolver

Installation

  1. Install UV (if not already installed):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    

    Or install via pip (if you already have Python):

    pip install uv
    
  2. Initialize a new UV project (if starting fresh):

    uv init mcp-server-custom
    cd mcp-server-custom
    
  3. Add MCP SDK with CLI tools:

    uv add "mcp[cli]"
    

Project Structure

mcp-server-custom/
ā”œā”€ā”€ main.py          # Your MCP server implementation
ā”œā”€ā”€ pyproject.toml   # Project configuration (created by UV)
└── README.md        # This file

Creating an MCP Server

Create a main.py file with your MCP server implementation. Here's a basic example:

# main.py
from mcp.server.fastmcp import FastMCP

# Create an MCP server instance
mcp = FastMCP("MyCustomServer")

# Add a simple tool
@mcp.tool()
def greet(name: str) -> str:
    """Generate a greeting for the given name."""
    return f"Hello, {name}! Welcome to the MCP server."

# Add a resource
@mcp.resource("info://{item}")
def get_info(item: str) -> str:
    """Get information about an item."""
    return f"Information about {item}: This is a sample MCP resource."

Running the Server

Development Mode

To run the server in development mode with hot-reloading:

uv run mcp dev main.py

This will start the MCP server and make it available for local development.

Production Mode

For production use, you can run the server directly:

uv run python main.py

Testing Your MCP Server

Use the MCP Inspector to test your server:

uv run mcp dev main.py

This will start the MCP Inspector at http://localhost:8000 where you can test your tools and resources.

Using with Claude Desktop

If you have Claude Desktop installed, you can install your MCP server directly:

uv run mcp install main.py

Advanced Configuration

Environment Variables

You can configure the server using these environment variables:

  • MCP_HOST: Host to bind to (default: 0.0.0.0)
  • MCP_PORT: Port to listen on (default: 8000)
  • MCP_LOG_LEVEL: Logging level (default: info)

Dependencies

To add additional dependencies to your project:

uv add package-name

Troubleshooting

  • UV not found: Make sure UV is installed and in your PATH
  • Dependency issues: Try recreating the virtual environment:
    rm -rf .venv
    uv venv
    uv pip install -e .
    

License

This project is licensed under the MIT License - see the file for details.