muhtalipdede
MCP Servermuhtalipdedepublic

mcp examples

包含模型上下文协议 (MCP) 的示例和实现,展示如何构建和使用 MCP 服务器与工具。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
JavaScript
Language
MIT License
License

About This Server

包含模型上下文协议 (MCP) 的示例和实现,展示如何构建和使用 MCP 服务器与工具。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Examples

This repository contains examples and implementations for the Model Context Protocol (MCP). The examples are designed to demonstrate how to build and use MCP servers and tools effectively.

Repository Structure

The repository is organized as follows:

mcp-node-examples/
  echo/
    index.ts
    package.json
    tsconfig.json

mcp-node-examples/echo

This folder contains an example implementation of an MCP server using Node.js. The server includes a simple tool called echo_tool that echoes back the input provided by the client.

Files:

  • index.ts: The main entry point for the echo server implementation.
  • package.json: Contains the dependencies and scripts for the Node.js project.
  • tsconfig.json: TypeScript configuration file.

Getting Started

To run the examples in this repository, follow these steps:

  1. Clone the repository:

    git clone https://github.com/muhtalipdede/mcp-examples.git
    cd mcp-examples/mcp-node-examples/echo
    
  2. Install dependencies:

    npm install
    
  3. Run the server:

    npm start
    

Usage

The echo server listens for client connections and provides the following functionality:

  • echo_tool: Accepts a string input and returns the same string as output.

Example Request

{
  "method": "callTool",
  "params": {
    "name": "echo_tool",
    "arguments": {
      "input": "Hello, MCP!"
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}

Example Response

{
  "result": {
    "content": {
      "type": "text",
      "text": "Echo: Hello, MCP!"
    },
    "isError": false
  },
  "jsonrpc": "2.0",
  "id": 1
}

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve the examples or add new ones.

License

This repository is licensed under the MIT License. See the LICENSE file for details.

Quick Start

1

Clone the repository

git clone https://github.com/muhtalipdede/mcp-examples
2

Install dependencies

cd mcp-examples
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownermuhtalipdede
Repomcp-examples
LanguageJavaScript
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation