terminal-mcp 0.1.6

Model Context Protocol (MCP) server for long-lived shell execution.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// src/protocol/params/exec.rs
use rmcp::schemars;
use serde::Deserialize;

#[derive(Debug, Deserialize, schemars::JsonSchema)]
pub struct ExecParams {
    /// Command content to execute
    pub input: String,
    /// Interpreter: can be a common shell/interpreter name (bash/sh/zsh/cmd/powershell/python/node),
    /// or an absolute/relative path to an executable to specify a particular version
    /// (e.g., "/usr/local/bin/python3.11", "C:\\nvm\\v20\\node.exe").
    pub shell: String,
    /// Timeout in milliseconds, default 3000
    pub timeout_ms: Option<u64>,
}