本地工具
STDIO提供本地系统工具和信息访问的MCP服务器
提供本地系统工具和信息访问的MCP服务器
A Model Context Protocol (MCP) server that provides access to various local system utilities. This server can be used with Cursor and other MCP-compatible clients to provide quick access to system information.
The server provides the following utilities:
pnpm add -g localutils-mcp-server
You can also run the server directly using npx without installing it globally:
npx localutils-mcp-server
If installed globally:
localutils-mcp
With npx:
npx localutils-mcp-server
The server can be used with Cursor by configuring it as an MCP server in Cursor's settings.
{ "name": "localutils", "command": "npx", "args": ["localutils-mcp-server"] }
You can test the server using the MCP Inspector:
pnpm run inspector
This will start the MCP Inspector at http://localhost:5173.
get_time_and_dateReturns the current local time and date in various formats, including:
get_hostnameReturns the hostname of the machine running the MCP server.
get_public_ipReturns the public IP address of the machine running the MCP server.
list_directoryLists the contents of a specified directory.
Parameters:
path (string, required): Directory path to listget_node_versionReturns the Node.js version information of the environment running the MCP server.
check_portChecks what process is running on a specific port.
Parameters:
port (number or string, required): Port number to check (1-65535). String values will be automatically converted to numbers.Example Response (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" }
thinkRecords a new thought with timestamp.
Parameters:
thought (string, required): The thought content to recordExample Response:
{ "success": true, "data": { "message": "Thought recorded successfully" } }
get_thoughtsRetrieves all recorded thoughts.
Example Response:
{ "success": true, "data": { "thoughts": [ { "timestamp": "2025-03-24T15:00:00.000Z", "content": "Need to update the documentation" } ] } }
clear_thoughtsClears all recorded thoughts.
Example Response:
{ "success": true, "data": { "message": "All thoughts cleared" } }
get_thought_statsReturns statistics about recorded thoughts.
Example Response:
{ "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
This repository includes a pre-commit hook that automatically builds the server before each commit. This ensures that the build files are always up-to-date in the repository.
The build folder is included in the git repository to make it easier to use the package with npx without having to build it first.
To set up the pre-commit hook after cloning the repository:
pnpm install
This will install dependencies and set up the pre-commit hook via Husky.
MIT