Token导航 LogoToken导航TokenDH.com
2025 10 15 MCP logo
AI代理未说明官方级别未说明来源级核验

2025 10 15 MCP

MCP Server

提供使用TypeScript实现模型上下文协议(MCP)的示例代码,包括服务器和客户端的实现,支持密码生成和图像验证等功能。

工具数

1

提示词数

0

GitHub Stars

1

资源数

0
TypeScript本地部署AI代理

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

rstropek

提供方

rstropek

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Introduction to Model Context Protocol (MCP)

Overview

This repository contains samples for an introduction to the Model Context Protocol (MCP) using TypeScript.

Before you can get started with these samples, install the dependencies with npm install. Next, compile the samples with npm run build. You can start the diffeent samples with the npm run start: commands (see the scripts section in package.json for all available samples).

Samples

Sample 1: MCP Server Without SDK

This sample demonstrates how to set up an MCP server without using the MCP SDK. It communicates with the MCP client using raw jsonRPC messages. Do not write MCP server like this in production! This is just for educational purposes to show how the protocol works under the hood.

The MCP server can generate passwords by concatinating character names from the TV show _My Little Pony_.

Sample 2: MCP Server With SDK

The second sample implements the same functionality as the first sample, but this time it uses the MCP SDK. This makes the implementation much simpler and more robust.

The sample contains tools, a prompt, and a resource.

Sample 3: MCP Server With Sampling

This example introduces the concept of sampling in MCP. The server can generate passwords by sampling characters from _My Little Pony_.

Sample 4: MCP Server With Sampling and Image Processing

This example shows how to work with content that is not text. It implements an MCP server that uses sampling to verify images. If you want to try this MCP server, perform the following steps:

  1. Run the sample web server with npm run start:server.
  2. Enable the Verify Image tool in the MCP configuration.
  3. Try the following prompt:
   Use the playwright mcp server to open http://localhost:3000/ and create a screenshot. Then use the verify-image MCP server to check if the screenshot claims that C# is "awesome".

Sample 5: Simple MCP Client

This sample shows how to create an MCP client with _stdio_ transport. It queries the server for the list of tools.

目录标签

目录标签

TypeScript本地部署AI代理密码生成模型上下文协议图像验证RPC通信

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP