
philschmid/mcp-cli
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
MCP 서버와 상호작용하기 위한 가벼운 CLI
개요
MCP(모델 컨텍스트 프로토콜) 서버와 상호작용하기 위한 경량의 Bun 기반 CLI입니다. - 🪶 - 의존성 최소화, 빠른 시작 - 📦 - bun 빌드를 통해 독립 실행형 실행 파일로 컴파일할 수 있음 -- 컴파일 - 🔧 - 호출용 JSON 출력, jq가 포함된 파이프, 체인 지원 - 🤖 - AI 코딩 에이전트용으로 설계됨(Gemini CLI, Claude Code 등) - 🔌 Stdio 및 HTTP MCP 서버 지원 - ⚡ - 게으른 스폰 데몬이 연결을 따뜻하게 유지함 (60초 유휴 타임아웃) - - config📋를 통해 서버별 특정 도구를 허용/비활성화 - - MCP 서버 명령어 출력에 표시 - 💡 - 이용 가능한 서버 및 복구 제안이 포함된 구조화된 오류 메시지 현재 디렉터리나 ~/.config/mcp/에서 mcp_servers.json을 생성하세요: 설명을 포함하기 위해 명령어에 -d를 추가하세요. 단일 따옴표, 특수 문자, 긴 텍스트가 포함된 JSON 인자에 대해, 셸 이스케이프 문제를 피하기 위해 다음을 사용하세요: {}, 따옴표, 특수 문자의 셸 해석은 신중하게 이스케이프해야 합니다. Stdin은 셸 파싱을 완전히 우회합니다.
개요(AI 번역)
MCP(모델 컨텍스트 프로토콜) 서버와 상호작용하기 위한 경량의 Bun 기반 CLI입니다.
특징
- 🪶 경량 - 의존성 최소화, 빠른 시작
- 📦 단일 바이너리 - [[T0]를 통해 독립 실행형 실행 파일로 컴파일됨
- 🔧 셸 친화적 - 호출용 JSON 출력,
jq가 포함된 파이프, 체인 지원 - 🤖 Agent-Optimized - AI 코딩 에이전트(Gemini CLI, Claude Code 등)를 위해 설계되었습니다.
- 🔌 Universal - stdio와 HTTP MCP 서버 모두를 지원합니다
- ⚡ 연결 풀링 - 레이지스폰 데몬이 연결을 따뜻하게 유지함 (60초 유휴 타임아웃)
- 툴 필터링 - 설정을 통해 서버별로 특정 도구를 허용/비활성화
- 📋 서버 명령어 - 출력에 MCP 서버 명령어 표시
- 💡 실행 가능한 오류 - 사용 가능한 서버와 복구 제안이 포함된 구조화된 오류 메시지
퀵 스타트
1. 설치
또는
2. 설정 파일을 생성하세요
현재 디렉터리 또는 ~/.config/mcp/에서 mcp_servers.json를 생성하세요:
3. 사용 가능한 도구 발견하기
4. 도구를 불러주세요
사용
두 형식 모두 작동: info 또는 info /
[! 팁] 설명을 포함하는 명령어에
-d를 추가하세요.
옵션
| 옵션 | 설명 |
|---|
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
mcp-cli
A lightweight, Bun-based CLI for interacting with MCP (Model Context Protocol) servers.
Features
- 🪶 Lightweight - Minimal dependencies, fast startup
- 📦 Single Binary - Compile to standalone executable via
bun build --compile - 🔧 Shell-Friendly - JSON output for call, pipes with
jq, chaining support - 🤖 Agent-Optimized - Designed for AI coding agents (Gemini CLI, Claude Code, etc.)
- 🔌 Universal - Supports both stdio and HTTP MCP servers
- ⚡ Connection Pooling - Lazy-spawn daemon keeps connections warm (60s idle timeout)
- � Tool Filtering - Allow/disable specific tools per server via config
- 📋 Server Instructions - Display MCP server instructions in output
- �💡 Actionable Errors - Structured error messages with available servers and recovery suggestions
Quick Start
1. Installation
curl -fsSL https://raw.githubusercontent.com/philschmid/mcp-cli/main/install.sh | bash
or
# requires bun install
bun install -g https://github.com/philschmid/mcp-cli
2. Create a config file
Create mcp_servers.json in your current directory or ~/.config/mcp/:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"."
]
},
"deepwiki": {
"url": "https://mcp.deepwiki.com/mcp"
}
}
}
3. Discover available tools
# List all servers and tools
mcp-cli
# With descriptions
mcp-cli -d
4. Call a tool
# View tool schema first
mcp-cli info filesystem read_file
# Call the tool
mcp-cli call filesystem read_file '{"path": "./README.md"}'
Usage
mcp-cli [options] List all servers and tools
mcp-cli [options] info Show server tools and parameters
mcp-cli [options] info Show tool schema
mcp-cli [options] grep Search tools by glob pattern
mcp-cli [options] call Call tool (reads JSON from stdin if no args)
mcp-cli [options] call Call tool with JSON arguments
Both formats work: info or info /
[!TIP] Add
-dto any command to include descriptions.
Options
| Option | Description |
|---|---|
-h, --help |
Show help message |
-v, --version |
Show version number |
-d, --with-descriptions |
Include tool descriptions |
-c, --config |
Path to config file |
Output
| Stream | Content |
|---|---|
| stdout | Tool results and human-readable info |
| stderr | Errors and diagnostics |
Commands
List Servers
# Basic listing
$ mcp-cli
github
• search_repositories
• get_file_contents
• create_or_update_file
filesystem
• read_file
• write_file
• list_directory
설치
npx -y @modelcontextprotocol/server-filesystem .설정
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"."
]
},
"deepwiki": {
"url": "https://mcp.deepwiki.com/mcp"
}
}
}