What is MCP CLI?
MCP CLI is a Model Context Protocol (MCP) server that exposes shell commands as tools for AI assistants such as GitHub Copilot. It lets users maintain a list of allowed shell commands, so each tool only needs to be authorized once for improved security.
How to use MCP CLI?
Install via cabal install, then create a JSON configuration file listing the allowed commands with optional names, descriptions, arguments, and working directories. In VS Code Agent mode, add it as a stdio MCP server using the command mcp-cli <path-to-config>.
Key features of MCP CLI
- Exposes shell commands as MCP tools for AI assistants.
- Restricts allowed commands to a preconfigured list.
- Supports named tools with custom descriptions.
- Allows passing arguments as environment variables.
- Configurable working directory per tool.
- Top-level and tool-specific environment variables.
Use cases of MCP CLI
- Running build commands or test suites via an AI assistant.
- Executing database connection scripts with specific parameters.
- Automating git operations with custom arguments.
- Running approved diagnostic commands like
date, pwd, ls.
- Controlling which shell commands an AI assistant may execute.
コメント