1.0.0 • Published 9 months ago

@mikefd097021/mcp-server-test v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

MCP 計算器伺服器

這是一個簡單的 MCP (Model Context Protocol) 計算器伺服器,提供基本的加減運算功能。

功能

  • 支援基本的加減運算
  • 完整的輸入驗證
  • 清晰的錯誤提示

使用方法

透過 npx 使用

在 VS Code 的 MCP 設定檔中加入:

{
  "mcpServers": {
    "calculator": {
      "command": "cmd /c npx -y",
      "args": ["@mikefd097021/mcp-server-test"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

本地開發

  1. 克隆倉庫:
git clone [repository-url]
cd mcp-server-test
  1. 安裝依賴:
npm install
  1. 建置專案:
npm run build
  1. 本地測試:
npm link
npx mcp-server-test

API

calculate

執行基本的加減運算。

參數:

  • operand1 (number, 必要): 第一個數字
  • operand2 (number, 必要): 第二個數字
  • operator (string, 必要): 運算符('+' 或 '-')

回傳:

  • 計算結果文字,格式為:計算結果: [operand1] [operator] [operand2] = [result]

授權

MIT

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago