Skip to main content
Glama
timeverse-command-mcp

timeverse-command-mcp

by elimyliu

timeverse-command-mcp

跨平台执行 shell / Python / Node 命令的 MCP (Model Context Protocol) Server

PyPI Python License


它能做什么?

让任意支持 MCP 的 AI 客户端(Timeverse Studio、Claude Desktop、Cursor、Continue 等)通过三个工具直接操作你的本地机器:

工具

作用

适用平台

bash

执行 shell 命令

macOS / Linux / Windows

python

执行 Python 代码片段

全平台

node

执行 JavaScript 代码片段

全平台

典型用法(让 Claude 帮你做):

"用 bash 看一下 /tmp 目录下最大的 5 个文件"
"用 python 算一下 1+2+...+100"
"用 node 把这个 JSON 解析后告诉我 user.name"

Related MCP server: MCP Shell Server

安装

方式 1:pip(推荐)

pip install timeverse-command-mcp

安装完成后会得到一个 timeverse-command-mcp 命令。

方式 2:源码安装(开发用)

git clone https://github.com/elimyliu/timeverse-command-mcp.git
cd timeverse-command-mcp
pip install -e ".[dev]"

接入 Claude Desktop

编辑 Claude Desktop 配置文件(位置见下表):

操作系统

配置路径

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

加入以下内容:

{
  "mcpServers": {
    "timeverse-command": {
      "command": "timeverse-command-mcp",
      "args": [],
      "env": {}
    }
  }
}

重启 Claude Desktop,工具列表中会出现 bash / python / node 三个工具。

详细配置说明、Cursor / Continue / Cline 等其他客户端的接入方式,请参考 docs/USAGE.md。

Python API

除了作为 MCP Server,本包也可以作为 Python 库使用:

import asyncio
from timeverse_command import AsyncCommandSession

async def main():
    session = AsyncCommandSession(
        tool_call_id="demo-1",
        command="echo hello && echo world",
        tool_name="bash",
    )

    async for chunk in session.run():
        if chunk["stream"] == "stdout":
            print(f"[out] {chunk['delta']}")
        elif chunk["stream"] == "exit":
            print(f"[exit] code={chunk['exit_code']} status={chunk['status']}")

asyncio.run(main())

输出:

[out] hello
[out] world
[exit] code=0 status=success

更多 API(取消、全局执行器等)见 docs/USAGE.md。


开发

# 克隆
git clone https://github.com/elimyliu/timeverse-command-mcp.git
cd timeverse-command-mcp

# 安装依赖(含 dev 工具)
pip install -e ".[dev]"

# 运行测试
pytest

# 代码风格
ruff check src/
ruff format src/

# 类型检查
mypy src/

协议

  • MCP 传输: stdio(标准)

  • 不依赖任何私有扩展,可在所有支持 MCP stdio 的客户端中使用

  • 增强能力(流式 / 取消 / 危险确认)由 TimeVerse Studio 客户端专属提供,其他客户端以"基础能力"运行


许可证

MIT © TimeVerse Studio

Available Tools

3 tools
bashB

在本地 shell(macOS/Linux: zsh/bash, Windows: cmd/powershell)中执行命令。支持流式输出。常用场景:文件操作、查看系统信息、运行 CLI 工具。

Inputs: command (required), cwd, timeout.

nodeA

在本地 Node.js 中执行单段代码(node -e)。适合 JavaScript 计算、JSON 处理。

Inputs: code (required), timeout.

pythonA

在本地 Python 3 解释器中执行单段代码(python -c)。适合快速计算、数据处理、调用 Python 库。

Inputs: code (required), timeout.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation5/5

    The three tools are clearly distinct: bash runs shell commands, node runs JavaScript, and python runs Python. No overlap in purpose.

    Naming Consistency5/5

    All tool names are single-word runtime names (bash, node, python), following a consistent and intuitive pattern.

    Tool Count5/5

    3 tools is a well-scoped set for a code execution server, covering the most common interpreters without being excessive.

    Completeness4/5

    The set covers bash, node, and Python, which are the most common execution environments. A minor gap is the lack of file-based script execution, but for inline code snippets it is largely complete.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      F
      maintenance
      An MCP server that allows AI models to execute system commands on local machines or remote hosts via SSH, supporting persistent sessions and environment variables.
      1
      45 npm
      28
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      A secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.
      13
      137 npm
      6
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A production-ready MCP server that enables AI assistants to execute shell commands, manage files, monitor system resources, and automate complex workflows with advanced features like stock tracking and web automation.
      7
      13 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A self-hosted MCP server that gives AI coding assistants direct shell access to your local machine, enabling execution of arbitrary bash commands for development workflows.
      5,159 npm
      ISC