Cover image
Try Now
2025-03-18

MCP服务器(消耗虚拟API)和基本客户端的演示实现。

3 years

Works with Finder

1

Github Watches

7

Github Forks

20

Github Stars

Example MCP Server + Client Implementation

I wrote an article and created a video about MCPs and why they're useful in my opinion.

This demo project contains a backend service / API that's consumed by a MCP server which exposes it in a standardized way to MCP clients - like the example MCP client (a very simple AI chatbot) that's also part of this project.

Important: All three parts (service, server, client) rely on Node.js being able to execute TypeScript without a compilation step. Yes, modern Node.js can do that! Make sure you have Node.js 23.x or higher installed!

Configuration

Add a .env file inside the client folder (next to the package.json file there) and add the following content to it:

OPENAI_API_KEY=<your-open-ai-key>

In each folder (service, server, client) run npm install to install required dependencies.

Running Service, MCP Server & MCP Client

For each part, navigate into the respective folder (service, server and client) and run npm run dev (with Node.js 23+). Keep each process running.

The "client" process is a simply AI chatbot using OpenAI behind the scenes. This chatbot has the custom MCP server "installed" - therefore, this AI chat application is able to store and retrieve custom information via the backend service created in the "service" folder.

Bugs are possible - it's just a basic demo implementation :-)

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    2 (1)
    Avatar
    user_PLkfM5at
    2025-04-15

    I have been using Remote MCP Server on Cloudflare by shixixiyue and it has been a game changer for me. The integration with Cloudflare ensures excellent performance and security. The setup was straightforward and the seamless connectivity has made managing MCP applications incredibly efficient. Highly recommend this for anyone looking for a robust remote server solution!