🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

zfmcptestpublish

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zfmcptestpublish

A simple MCP server written in TypeScript

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

My MCP Server

一个使用TypeScript编写的简单MCP(Model Context Protocol)服务器,提供两个工具:计算器和问候工具。

功能

可用工具

  • calculate - 执行简单的数学计算

    • 参数:expression (字符串) - 数学表达式,例如:"2 + 2", "10 * 5", "100 / 4"
  • greet - 向用户打招呼

    • 参数:
      • name (字符串) - 要打招呼的用户名
      • language (字符串,可选) - 问候语言,支持:en, zh, es, fr,默认为en

安装和运行

1. 安装依赖

npm install

2. 构建项目

npm run build

3. 运行服务器

npm start

开发

监视模式

npm run dev

发布到npm

npm run publish

发布到npm

npm run publish

这会在监视模式下编译TypeScript,当文件更改时自动重新编译。

项目结构

.
├── src/
│   └── index.ts          # 主服务器文件
├── dist/                 # 编译后的JavaScript文件
├── package.json          # 项目配置和依赖
├── tsconfig.json         # TypeScript配置
└── README.md            # 项目说明

技术栈

  • TypeScript - 类型安全的JavaScript
  • @modelcontextprotocol/sdk - MCP官方SDK
  • Node.js - 运行时环境

许可证

MIT

Keywords

mcp

FAQs

Package last updated on 03 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts