modern-cli-mcp
MCP server exposing 104+ modern CLI tools for AI agents with JSON output.
可用工具 (5 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
tavily_search 14 个参数 需填 1 项
Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.
必填参数:query
tavily_extract 6 个参数 需填 1 项
Extract content from URLs. Returns raw page content in markdown or text format.
必填参数:urls
tavily_crawl 11 个参数 需填 1 项
Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.
必填参数:url
tavily_map 8 个参数 需填 1 项
Map a website's structure. Returns a list of URLs found starting from the base URL.
必填参数:url
tavily_research 2 个参数 需填 1 项
Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources to answer a question or complete a task. Returns a detailed response based on the research findings.
必填参数:input
服务介绍
Modern CLI MCP Server
MCP server exposing 107 modern CLI tools to AI/LLM agents. Provides structured JSON-RPC access to filesystem, Git forges, containers, Kubernetes, and data transformation tools—all optimized for AI consumption with JSON output.
# Features
- 107 Tools in 15 Groups: Filesystem, search, Git (GitHub/GitLab), containers, Kubernetes, data processing
- AI-Optimized Output: JSON by default for structured parsing
- Access Control:
.agentignorefiles to control which files AI agents can access - Zero Config: Nix bundles all dependencies—no manual tool installation
# Quick Start
# # Claude Desktop / Claude Code
Add to your MCP configuration:
Option 1: Nix (Recommended)
{
"mcpServers": {
"modern-cli": {
"command": "nix",
"args": ["run", "github:NacoSolutions/modern-cli-mcp", "- -"]
}
}
}
Option 2: Docker
{
"mcpServers": {
"modern-cli": {
"command": "docker",
"args": ["run", "- -rm", "-i", "ghcr.io/nacosolutions/modern-cli-mcp"]
}
}
}
Option 3: Binary
{
"mcpServers": {
"modern-cli": {
"command": "/path/to/modern-cli-mcp"
}
}
}
# Available Tools (70+)
# # Filesystem
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| eza | Modern ls with icons and git integration |
| bat | Cat with syntax highlighting |
| fd | Fast find alternative |
| duf | Disk usage viewer (JSON) |
| dust | Directory size analyzer |
| trash_* | Safe file deletion |
# # Search
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| rg | Ripgrep for fast content search (JSON) |
| fzf_filter | Fuzzy filtering |
| ast_grep | AST-based code search (JSON) |
| web_search | DuckDuckGo web search (JSON) |
# # Git Forges
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| gh_repo | GitHub repository operations (JSON) |
| gh_issue | GitHub issues (JSON) |
| gh_pr | GitHub pull requests (JSON) |
| gh_search | Search repos, issues, PRs, code (JSON) |
| gh_release | GitHub releases (JSON) |
| gh_workflow | GitHub Actions workflows (JSON) |
| gh_run | GitHub Actions runs (JSON) |
| gh_api | Direct GitHub API access (JSON) |
| glab_issue | GitLab issues (JSON) |
| glab_mr | GitLab merge requests (JSON) |
| glab_pipeline | GitLab CI/CD pipelines (JSON) |
# # Containers
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| podman | Container operations (JSON) |
| dive | Image layer analysis |
| skopeo | Registry operations (JSON) |
| crane | Low-level registry tool (JSON) |
| trivy | Security vulnerability scanner (JSON) |
# # Kubernetes
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| kubectl_get | Get resources (JSON) |
| kubectl_describe | Describe resources |
| kubectl_logs | Pod logs |
| kubectl_apply | Apply manifests |
| kubectl_delete | Delete resources |
| kubectl_exec | Execute in pods |
| stern | Multi-pod log aggregation (JSON) |
| helm | Chart management (JSON) |
| kustomize | Manifest building |
# # Data Transformation
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| jq | JSON processor |
| yq | YAML/JSON/XML processor |
| gron | JSON→greppable format |
| htmlq | jq for HTML |
| pup | HTML parser (JSON) |
| miller | Multi-format processor |
| dasel | Universal data selector |
# # Network
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| http | HTTP requests (xh) |
| dns | DNS lookups (doggo) |
| usql | Universal SQL client |
# # System
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| procs | Process viewer (JSON) |
| tokei | Code statistics (JSON) |
| hyperfine | Benchmarking (JSON) |
# # Diff/Git
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| delta | Syntax-highlighted diffs |
| difft | Structural diff |
| git_diff | Git diff with highlighting |
# # Utilities
| Tool | Description |
|- -- -- -|- -- -- -- -- -- --|
| tldr | Command cheatsheets |
| grex | Regex generator |
| ouch_* | Archive handling |
| pueue_* | Task queue |
# Installation
# # Nix with Flakes (Recommended)
Flakes are enabled by default in Determinate Nix. For standard Nix, enable with - -experimental-features 'nix-command flakes' or add to ~/.config/nix/nix.conf:
experimental-features = nix-command flakes
Run directly (no installation):
nix run github:NacoSolutions/modern-cli-mcp
Install to profile:
nix profile install github:NacoSolutions/modern-cli-mcp
Add to flake.nix:
{
inputs.modern-cli-mcp.url = "github:NacoSolutions/modern-cli-mcp";
# Use in outputs
outputs = { self, nixpkgs, modern-cli-mcp }: {
# Add to packages, devShells, etc.
};
}
# # Nix with FlakeHub
FlakeHub provides versioned flake references with semantic versioning.
Add to flake.nix via CLI:
fh add NacoSolutions/modern-cli-mcp
Or manually:
{
inputs.modern-cli-mcp.url = "https://flakehub.com/f/NacoSolutions/modern-cli-mcp/ *.tar.gz";
}
Run specific version:
nix run "https://flakehub.com/f/NacoSolutions/modern-cli-mcp/0.2.tar.gz"
# # Nix without Flakes (Classic)
For Nix installations without flakes enabled, the repository includes a default.nix via flake-compat:
Build from tarball:
nix-build https://github.com/NacoSolutions/modern-cli-mcp/archive/main.tar.gz -A defaultNix.default
./result/bin/modern-cli-mcp
Or clone and build locally:
git clone https://github.com/NacoSolutions/modern-cli-mcp
cd modern-cli-mcp
nix-build
./result/bin/modern-cli-mcp
Install to profile:
nix-env -if https://github.com/NacoSolutions/modern-cli-mcp/archive/main.tar.gz -A defaultNix.default
# # Docker
docker pull ghcr.io/nacosolutions/modern-cli-mcp
docker run - -rm -i ghcr.io/nacosolutions/modern-cli-mcp
# # From Source (Cargo)
Requires CLI tools to be installed separately in PATH:
cargo install - -git https://github.com/NacoSolutions/modern-cli-mcp
# Development
# # With Nix (Recommended)
# Enter dev shell
nix develop
# Available commands (run 'menu' for full list)
build # Build release binary
run # Run the server
test # Run tests
check # Cargo check
clippy # Lint with clippy
fmt # Format code
flake-check # Nix flake checks
# # Without Nix
# Requires Rust toolchain and CLI tools installed separately
cargo build - -release
cargo run
cargo test
# Architecture
src/
├── main.rs # Entry point, MCP server setup
└── tools/
├── mod.rs # Tool registration and routing
└── executor.rs # Tool execution logic
The server wraps CLI tools with structured JSON input/output. Each tool:
- Validates parameters via JSON Schema
- Constructs the appropriate command
- Executes and captures output
- Returns structured results
# Configuration
The Nix package bundles all CLI tools. When running via cargo, ensure tools are in PATH.
# # Environment Variables
RUST_LOG- Logging level (default:info)
# # .agentignore
Control which files AI agents can access using .agentignore files. Uses gitignore syntax but operates independently—tools respect .agentignore only, not .gitignore.
Pattern sources (in order of precedence):
~/.config/agent/ignore- Global patterns for all projects.agentignore- Per-directory patterns (walked up from working directory)
Example .agentignore:
# Secrets and credentials
*.secret
.env*
secrets/
credentials.json
# Large generated files
node_modules/
target/
*.min.js
# Sensitive data
*.pem
*.key
Behavior:
- Blocked paths return an error:
Path is blocked by .agentignore: /path/to/file - Search tools (fd, rg, ast-grep) automatically apply ignore patterns
- Patterns in child directories extend (not replace) parent patterns
# License
MIT