DW

dang-w/example-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

5 stars 3 forks 品質 42 トレンド 13

This repository contains example implementations of Model Context Protocol (MCP) servers that can be used with Cursor IDE to enhance AI capabilities with custom tools and data sources.

概要

This repository contains example implementations of Model Context Protocol (MCP) servers that can be used with Cursor IDE to enhance AI capabilities with custom tools and data sources. The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It allows you to create custom tools that can be used by AI assistants in Cursor. Think of MCP like a USB-C port for AI applications: - Just as USB-C provides a standardized way to connect your devices to various peripherals, MCP provides a standardized way to connect AI models to different data sources and tools - It enables AI assistants to access real-time information, execute specialized functions, and enhance their capabilities beyond their training data This repository includes several example MCP servers: A simple MCP server that provides tools for managing tasks: - Create new tasks - List all tasks - Mark tasks as completed - Delete tasks An MCP server...

README

以下は原文 README の抜粋です。原文を見る。

Cursor Model Context Protocol (MCP) Example

This repository contains example implementations of Model Context Protocol (MCP) servers that can be used with Cursor IDE to enhance AI capabilities with custom tools and data sources.

What is the Model Context Protocol?

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It allows you to create custom tools that can be used by AI assistants in Cursor.

Think of MCP like a USB-C port for AI applications:

  • Just as USB-C provides a standardized way to connect your devices to various peripherals, MCP provides a standardized way to connect AI models to different data sources and tools
  • It enables AI assistants to access real-time information, execute specialized functions, and enhance their capabilities beyond their training data

Project Structure

example-mcp/
├── mcp-servers/                # Different MCP server implementations
│   ├── task-manager/           # Task manager MCP server example
│   ├── file-explorer/          # File explorer MCP server example
│   └── weather-service/        # Weather service MCP server example
├── client-examples/            # Example code for testing MCP servers
├── docs/                       # Additional documentation
└── README.md                   # This file

MCP Server Examples

This repository includes several example MCP servers:

1. Task Manager MCP Server

A simple MCP server that provides tools for managing tasks:

  • Create new tasks
  • List all tasks
  • Mark tasks as completed
  • Delete tasks

2. File Explorer MCP Server

An MCP server that allows browsing and manipulating files:

  • List files in a directory
  • Read file contents
  • Create new files
  • Delete files

3. Weather Service MCP Server

An MCP server that provides weather information:

  • Get current weather for a location
  • Get weather forecast for a location
  • Get historical weather data

Getting Started

Prerequisites

Setting Up an MCP Server

  1. Navigate to one of the server directories:

    cd example-mcp/mcp-servers/task-manager
    
  2. Install dependencies:

    npm install
    
  3. Start the server:

    npm start
    

Connecting to Cursor

To connect your MCP server to Cursor:

  1. Open Cursor IDE
  2. Go to Settings (gear icon in the bottom left)
  3. Navigate to the “Features” section
  4. Scroll down to “MCP”
  5. Click “Add New MCP Server”
  6. Enter a name for your server (e.g., “Task Manager MCP”)
  7. Choose the transport type:
    • SSE: Enter the URL of your MCP server (e.g., http://localhost:3000)
    • Stdio: Enter the command to start your server (e.g., node /path/to/example-mcp/mcp-servers/task-manager/index.js)
  8. Click “Add”

Using MCP Tools in Cursor

Once your MCP server is connected, you can use it in Cursor’s AI features:

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →