Loading...

A command-line interface for interacting with Model Context Protocol servers, supporting multiple LLM providers, tool execution, and various operational modes.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
A command-line interface for interacting with Model Context Protocol servers, supporting multiple LLM providers, tool execution, and various operational modes.
The MCP CLI offers a balance of functionality and security. It is relatively safe when used with local LLMs and filesystem access disabled. However, using cloud providers and enabling tool execution introduces risks that require careful configuration and monitoring.
Performance depends on the chosen LLM provider, model size, and network latency. Local LLMs offer lower latency but may have limited reasoning capabilities.
Using cloud-based LLM providers incurs costs based on API usage (tokens, requests). Consider the cost implications when designing automated workflows.
pip install "mcp-cli[cli]" # Basic CLI features{
"mcpServers": {
"sqlite": {
"command": "python",
"args": ["-m", "mcp_server.sqlite_server"],
"env": {
"DATABASE_PATH": "database.db"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"],
"env": {}
},
"brave-search": {
"command": "npx",
"args": ["-y", "@brave/brave-search-mcp-server"],
"env": {
"BRAVE_API_KEY": "${TOKEN:bearer:brave_search}"
}
},
"notion": {
"url": "https://mcp.notion.com/mcp",
"headers": {
"Authorization": "Bearer ${TOKEN:bearer:notion}"
}
}
}
}OPENAI_API_KEYANTHROPIC_API_KEYAZURE_OPENAI_API_KEYAZURE_OPENAI_ENDPOINTAPI_KEYexecute_shell_commandExecutes a shell command on the underlying system.
Unrestricted shell access can lead to arbitrary code execution.
read_fileReads the content of a file from the filesystem.
Can expose sensitive information if not properly controlled.
write_fileWrites content to a file on the filesystem.
Can modify system files or user data.
search_webSearches the web for information.
Read-only operation with no direct side effects.
get_current_timeRetrieves the current date and time.
Read-only operation with no side effects.
API Key
hybrid
The MCP CLI offers a balance of functionality and security. It is relatively safe when used with local LLMs and filesystem access disabled. However, using cloud providers and enabling tool execution introduces risks that require careful configuration and monitoring.
Autonomy depends on the configured tools and the LLM's reasoning capabilities. Exercise caution when granting the system access to destructive tools.
Production Tip
Implement robust input validation and output sanitization to prevent command injection and other security vulnerabilities.
MCP CLI defaults to using Ollama with the `gpt-oss` reasoning model for local operation without requiring API keys.
Use the `--provider` and `--model` command-line arguments to specify the desired provider and model.
Set the appropriate environment variables (e.g., `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`) with your API keys.
Use the `--disable-filesystem` command-line argument.
MCP CLI supports chat mode, interactive mode, command mode, and direct commands.
MCP CLI supports concurrent tool execution, allowing multiple tools to run simultaneously.
Use a reasoning model like `gpt-oss` to see the AI's thinking process.