Skip to main content
Glama

Calculator MCP

by wrtnlabs

计算 MCP

一个模型上下文协议 (MCP) 服务器,利用基本的计算器功能提供浏览器自动化功能。该服务器使 LLM 能够与计算器交互。(我实际上是为一个测试程序制作的)

用例

  • 用于连接 MCP 功能的测试代码。
  • 玩具项目

示例配置

{ "mcpServers": { "calculate": { "command": "npx", "args": [ "-y", "@wrtnlabs/calculator@latest" ] } } }
在 VS Code 中安装

或者,您可以使用 VS Code CLI 安装 Playwright MCP 服务器:

# For VS Code code --add-mcp '{"name":"calculator","command":"npx","args":["-y", "@wrtnlabs/calculator-mcp@latest"]}'
# For VS Code Insiders code-insiders --add-mcp '{"name":"calculator","command":"npx","args":["-y", "@wrtnlabs/calculator-mcp@latest"]}'

安装后,计算器 MCP 服务器将可与 VS Code 中的 GitHub Copilot 代理一起使用。

CLI 选项

计算器 MCP 服务器支持以下命令行选项:

  • --port <port> :监听 SSE 传输的端口

在 Linux 上运行带显示器的浏览器

在没有显示器的系统上或从 IDE 的工作进程运行带头浏览器时,从具有 DISPLAY 的环境中运行 MCP 服务器并传递--port标志以启用 SSE 传输。

npx @wrtnlabs/calculator-mcp@latest --port 8931

然后在 MCP 客户端配置中,将url设置为 SSE 端点:

{ "mcpServers": { "calculator": { "url": "http://localhost:8931/sse" } } }

通过自定义传输进行编程使用

import { createServer } from "@wrtnlabs/calculator-mcp"; // ... other import statement const client = new Client({ name: "test client", version: "0.1.0", }); const server = createServer({ name: "calculator", version: "1.0.0" }); const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair(); await Promise.all([ client.connect(clientTransport), server.connect(serverTransport), ]);

工具

  • 添加
  • 潜艇
  • 乘法
  • div
  • 模组
  • 平方根
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议服务器为 LLM 提供基本的计算器功能,使其能够执行加法、减法、乘法、除法、模数和平方根等数学运算。

  1. 用例
    1. 示例配置
      1. 在 VS Code 中安装
    2. CLI 选项
      1. 在 Linux 上运行带显示器的浏览器
        1. 通过自定义传输进行编程使用
          1. 工具

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.
              Last updated -
              31
              323
              2
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.
              Last updated -
              13
              13
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables LLMs to perform precise numerical calculations by evaluating mathematical expressions.
              Last updated -
              1
              48
              Python
              MIT License
              • Linux
              • Apple
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that connects LLMs to the Compiler Explorer API, enabling them to compile code, explore compiler features, and analyze optimizations across different compilers and languages.
              Last updated -
              Python

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/wrtnlabs/calculator-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server