# example-mcp-server

> MCP Server

This repository provides a template for creating custom tools for Cursor IDE using the Model Context Protocol, allowing users to build and connect their own tools to the Cursor IDE environment.

## Overview

- **Category:** Developer Tools
- **Language:** Python
- **Stars:** 38
- **Forks:** 7
- **Owner:** kirill-markin
- **GitHub:** https://github.com/kirill-markin/example-mcp-server
- **Created:** 2025-02-04T12:02:40+00:00
- **Updated:** 2025-03-28T03:20:19+00:00
- **Source:** https://model-context-protocol.com/servers/cursor-ide-custom-tools-mcp-server

## Setup

## Setup

**Quick Start:**

1.  Click "Deploy to Heroku" button.
2.  Configure Cursor: Open Cursor Settings â Features, add new MCP server, and use your Heroku URL with `/sse` path (e.g., `https://<your-app-name>.herokuapp.com/sse`).
3.  Test your agent's mood in Cursor by asking it to inquire about the server mood.

**Alternative Setup Methods:**

**Docker Setup:**

1.  Initial setup:
    ```bash
    # Clone the repository
    git clone https://github.com/kirill-markin/weaviate-mcp-server.git
    cd weaviate-mcp-server

    # Create environment file
    cp .env.example .env
    ```
2.  Build and run using Docker Compose:
    ```bash
    # Build and start the server
    docker compose up --build -d

    # View logs
    docker compose logs -f

    # Check server status
    docker compose ps

    # Stop the server
    docker compose down
    ```
3.  The server will be available at: SSE endpoint: http://localhost:8000/sse
4.  Quick test:
    ```bash
    # Test the server endpoint
    curl -i http://localhost:8000/sse
    ```
5.  Connect to Cursor IDE: Open Cursor Settings â Features, add new MCP server, Type: Select "sse", URL: Enter `http://localhost:8000/sse`

**Traditional Setup:**

1.  Install the uv package manager:
    ```bash
    # Install uv on macOS
    brew install uv
    # Or install via pip (any OS)
    pip install uv
    ```
2.  Start the server using either stdio (default) or SSE transport:
    ```bash
    # Install the package with development dependencies
    uv pip install -e ".[dev]"

    # Using stdio transport (default)
    uv run mcp-simple-tool

    # Using SSE transport on custom port
    uv run mcp-simple-tool --transport sse --port 8000

    # Run tests
    uv run pytest -v
    ```
3.  After installation, connect the server directly to Cursor IDE:
    1.  Right-click on the `cursor-run-mcp-server.sh` file in Cursor
    2.  Select "Copy Path" to copy the absolute path
    3.  Open Cursor Settings (gear icon)
    4.  Navigate to Features tab
    5.  Scroll down to "MCP Servers"
    6.  Click "Add new MCP server"
    7.  Fill in the form: Name, Type (stdio), Command (path to `cursor-run-mcp-server.sh`)

**Environment Variables:**

*   `MCP_SERVER_PORT` (default: 8000) - Port to run the server on
*   `MCP_SERVER_HOST` (default: 0.0.0.0) - Host to bind the server to
*   `DEBUG` (default: false) - Enable debug mode
*   `MCP_USER_AGENT` - Custom User-Agent for website fetching

**Installing via Smithery:**

```bash
npx -y @smithery/cli install @kirill-markin/example-mcp-server --client claude
```

## Tools

## Available Tools

1.  Custom tools for Cursor IDE (allows creating custom tools for Cursor IDE using Model Context Protocol (MCP))
2.  Server mood response (responds with a cheerful message and a heart when asked about the server's mood).

