KM

kirill-markin/example-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

38 stars 19 forks 质量 74 趋势 8MIT

kirill-markin/example-mcp-server 是从 https://github.com/kirill-markin/example-mcp-server. 导入的 MCP 服务器候选

概览

kirill-markin/example-mcp-server 是从 https://github.com/kirill-markin/example-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

一个简单的模板,用于使用模型上下文协议(MCP)创建光标IDE自定义工具。从该模板创建您自己的仓库,修改工具,并将其连接到你的光标IDE。

快速启动

  1. 点击“部署到赫罗库”按钮

  2. 部署后,配置光标:

  • 开放光标设置→功能
  • 添加新的MCP服务器
  • 使用你的 Heroku URL 与 /sse 路径(例如 https:// .herokuapp.com/sse)
  1. 在光标中测试你的代理人的情绪:
  • 问你的经纪人“请问问我们的服务器氛围,告诉我感觉如何。”
  • 服务器会回复一条愉快的信息和一个爱心 ❤️

替代设置方法

你可以用三种方式运行服务器:用Docker、传统Python设置,或者直接在Cursor IDE里运行。

Docker 设置

该项目包含了 Docker 支持,便于部署:

  1. 初始设置:

  2. 使用 Docker Compose 构建和运行:

  3. 服务器将开放于:

  1. 快速测试:

  2. 连接到光标IDE:

  • 开放光标设置→功能
  • 添加新的MCP服务器
  • 类型:选择“sse”
  • URL:输入 http://localhost:8000/sse

传统布置

首先,安装UV包管理器:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP Server Template for Cursor IDE

A simple template for creating custom tools for Cursor IDE using Model Context Protocol (MCP). Create your own repository from this template, modify the tools, and connect them to your Cursor IDE.

Quick Start

  1. Click “Deploy to Heroku” button

  2. After deployment, configure Cursor:

    • Open Cursor Settings → Features
    • Add new MCP server
    • Use your Heroku URL with /sse path (e.g., https://.herokuapp.com/sse)
  3. Test your agent’s mood in Cursor:

    • Ask your agent “Please ask about our server mood and let me know how it is.”
    • The server will respond with a cheerful message and a heart ❤️

Alternative Setup Methods

You can run the server in three ways: using Docker, traditional Python setup, or directly in Cursor IDE.

Docker Setup

The project includes Docker support for easy deployment:

  1. Initial setup:
# 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
  1. Build and run using Docker Compose:
# 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
  1. The server will be available at:

  2. Quick test:

# Test the server endpoint
curl -i http://localhost:8000/sse
  1. Connect to Cursor IDE:
    • Open Cursor Settings → Features
    • Add new MCP server
    • Type: Select “sse”
    • URL: Enter http://localhost:8000/sse

Traditional Setup

First, install the uv package manager:

# Install uv on macOS
brew install uv
# Or install via pip (any OS)
pip install uv

Start the server using either stdio (default) or SSE transport:

# 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

After installation, you can 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: Choose any name (e.g., “my-mcp-server-1”)
    • Type: Select “stdio” (not “sse” because we run the server locally)
    • Command: Paste the absolute path to cursor-run-mcp-server.sh that you copied earlier. For example: /Users/yourname/weaviate-mcp-server/cursor-run-mcp-server.sh

Environment Variables

在 GitHub 查看完整 README

安装

npx -y @smithery/cli install @kirill-markin/example-mcp-server --client claude
新手?先看 mcpskill.org 教程 →