Skip to main content
Glama

Local Utilities MCP Server

by arjshiv

本地实用程序 MCP 服务器

一个模型上下文协议 (MCP) 服务器,提供对各种本地系统实用程序的访问。此服务器可与 Cursor 和其他兼容 MCP 的客户端配合使用,以快速访问系统信息。

特征

该服务器提供以下实用程序:

  • 时间和日期:以各种格式获取当前本地时间和日期,包括星期几
  • 主机名:获取系统的主机名
  • Public IP :获取机器的公网IP地址
  • 目录列表:列出指定目录的内容
  • Node.js 版本:获取当前运行的 Node.js 版本
  • 端口检查器:检查特定端口上正在运行的进程
  • 思考工具:在开发过程中记录、检索和分析想法

安装

全局安装

pnpm add -g localutils-mcp-server

与 npx 一起使用

您也可以直接使用 npx 运行服务器,而无需全局安装它:

npx localutils-mcp-server

用法

启动服务器

如果全局安装:

localutils-mcp

使用 npx:

npx localutils-mcp-server

与游标一起使用

通过在 Cursor 的设置中将该服务器配置为 MCP 服务器,即可与 Cursor 一起使用。

  1. 打开光标设置
  2. 导航至 MCP 部分
  3. 添加一个新的 MCP 服务器,配置如下:
    { "name": "localutils", "command": "npx", "args": ["localutils-mcp-server"] }

使用 MCP 检查器

您可以使用 MCP 检查器测试服务器:

pnpm run inspector

这将在http://localhost:5173启动 MCP 检查器。

可用工具

get_time_and_date

以各种格式返回当前本地时间和日期,包括:

  • 当地时间
  • 当地日期
  • 星期几
  • ISO 8601 格式
  • Unix时间戳

get_hostname

返回运行 MCP 服务器的机器的主机名。

get_public_ip

返回运行 MCP 服务器的机器的公共 IP 地址。

list_directory

列出指定目录的内容。

参数:

  • path (字符串,必需):要列出的目录路径

get_node_version

返回 MCP 服务器运行环境的 Node.js 版本信息。

check_port

检查特定端口上正在运行的进程。

参数:

  • port (数字或字符串,必需):要检查的端口号(1-65535)。字符串值将自动转换为数字。

示例响应(macOS/Linux):

{ "processes": [ { "command": "node", "pid": "12345", "user": "username", "fd": "12u", "type": "IPv4", "device": "0x1234567890", "size": "0t0", "node": "TCP", "name": "*:3000 (LISTEN)" } ], "message": "Found 1 process(es) using port 3000" }

think

用时间戳记录新想法。

参数:

  • thought (字符串,必需):要记录的思想内容

响应示例:

{ "success": true, "data": { "message": "Thought recorded successfully" } }

get_thoughts

检索所有记录的想法。

响应示例:

{ "success": true, "data": { "thoughts": [ { "timestamp": "2025-03-24T15:00:00.000Z", "content": "Need to update the documentation" } ] } }

clear_thoughts

清除所有记录的想法。

响应示例:

{ "success": true, "data": { "message": "All thoughts cleared" } }

get_thought_stats

返回有关记录的想法的统计数据。

响应示例:

{ "success": true, "data": { "totalThoughts": 1, "averageLength": 28, "oldestThought": "2025-03-24T15:00:00.000Z", "newestThought": "2025-03-24T15:00:00.000Z" } }

发展

建筑

pnpm run build

以开发模式运行

pnpm run dev

测试

pnpm test

Git 工作流

此仓库包含一个预提交钩子,可在每次提交之前自动构建服务器。这确保了构建文件在仓库中始终保持最新。

构建文件夹包含在 git 存储库中,以便更轻松地使用带有 npx 的包,而无需先构建它。

克隆存储库后设置预提交钩子:

pnpm install

这将安装依赖项并通过 Husky 设置预提交钩子。

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

通过与 Cursor 和其他 MCP 客户端兼容的 MCP 服务器接口,快速访问本地系统实用程序,包括时间/日期、主机名、公共 IP、目录列表、Node.js 版本和端口使用情况。

  1. 特征
    1. 安装
      1. 全局安装
      2. 与 npx 一起使用
    2. 用法
      1. 启动服务器
      2. 与游标一起使用
      3. 使用 MCP 检查器
    3. 可用工具
      1. get_time_and_date
      2. get_hostname
      3. get_public_ip
      4. list_directory
      5. get_node_version
      6. check_port
      7. think
      8. get_thoughts
      9. clear_thoughts
      10. get_thought_stats
    4. 发展
      1. 建筑
      2. 以开发模式运行
      3. 测试
      4. Git 工作流
    5. 执照

      Related MCP Servers

      • A
        security
        A
        license
        A
        quality
        A simple MCP server that facilitates website fetching through a configurable server platform using stdio or SSE transport, allowing integration with tools like Cursor for streamlined access.
        Last updated -
        2
        23
        Python
        MIT License
      • -
        security
        F
        license
        -
        quality
        An MCP server that provides detailed information about your development environment to the Cursor code editor, enabling more context-aware assistance.
        Last updated -
        1
        Python
        • Linux
        • Apple
      • -
        security
        A
        license
        -
        quality
        A lightweight mcp server that tells you exactly where you are.
        Last updated -
        Python
        MIT License
      • -
        security
        A
        license
        -
        quality
        A Model Context Protocol (MCP) server for Cursor IDE that simplifies the installation and configuration of other MCP servers.
        Last updated -
        882
        23
        JavaScript
        MIT License
        • Apple
        • Linux

      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/arjshiv/localutils-mcp-server'

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