@jingjingbox/mcp-cli-bridge
@jingjingbox/mcp-cli-bridge
MCP-CLI 브리지 서버 - MCP 프로토콜을 통해 CLI 도구를 호출하여 AI 어시스턴트에 강력한 지식 그래프 및 파일 읽기 기능을 제공합니다.
소개
@jingjingbox/mcp-cli-bridge는 Model Context Protocol (MCP) 기반의 브리지 서버로, CLI 도구의 기능을 MCP 프로토콜을 통해 AI 어시스턴트(예: TraeCN)에 노출합니다.
핵심 기능
지식 그래프 관리: 엔티티 생성, 관계 설정, 노드 검색을 통해 완전한 지식 네트워크 구축
파일 읽기: 파일의 앞부분 또는 뒷부분 내용을 효율적으로 읽기, 대용량 파일 처리 지원
프로세스 격리: CLI 플러그인이 독립적인 프로세스에서 실행되어 충돌 시에도 메인 서비스에 영향 없음
NativeAOT 컴파일: 최고의 성능, 초소형 크기, 빠른 시작 속도
점진적 로딩: 도구가 필요할 때만 로드되어 컨텍스트 공간을 차지하지 않음
Related MCP server: mcp_server_for_claudes_toolbox
시스템 요구 사항
운영체제: Windows x64
Node.js: >= 14.0.0
런타임: .NET 10.0 Runtime (패키지에 포함됨)
설치
전역 설치
npm install -g @jingjingbox/mcp-cli-bridgenpx 사용 (권장)
설치 없이 바로 실행:
npx @jingjingbox/mcp-cli-bridge설정
환경 변수
변수 | 설명 | 필수 여부 |
| MemoryCli 지식 그래프 데이터 저장 디렉토리 | 예 |
데이터 파일은 자동으로 생성됩니다:
memory.jsonl- 엔티티 데이터memory_relations.jsonl- 관계 데이터
TraeCN 설정 예시
TraeCN의 MCP 설정에 다음을 추가하세요:
{
"mcpServers": {
"cli-bridge": {
"type": "stdio",
"command": "npx",
"args": ["@jingjingbox/mcp-cli-bridge"],
"enabled": true,
"env": {
"MCP_MEMORY_PATH": "D:\\MCP\\Memory"
}
}
}
}전역 설치 설정
{
"mcpServers": {
"cli-bridge": {
"type": "stdio",
"command": "mcp-cli-bridge",
"enabled": true,
"env": {
"MCP_MEMORY_PATH": "D:\\MCP\\Memory"
}
}
}
}도구 목록
Host 계층 도구 (직접 노출)
도구 이름 | 설명 |
| 사용 가능한 CLI 도구 검색 |
| 지정된 CLI 도구 명령 실행 |
| 도구 설명 정보 가져오기 |
| 모든 사용 가능한 도구 나열 |
| 패키지 설치 상태 확인 |
| 지정된 패키지 설치 |
MemoryCli 도구 (지식 그래프)
tool_execute를 통해 호출하며, 명령 접두사는 memory_입니다:
도구 이름 | 설명 |
| 지식 그래프에 여러 엔티티 생성 |
| 엔티티 간의 관계 생성 |
| 전체 지식 그래프 읽기 |
| 지식 그래프 내 노드 검색 |
| 엔티티에 관찰 기록 추가 |
| 엔티티 및 해당 관계 삭제 |
| 이름으로 특정 노드 가져오기 |
FileReaderCli 도구 (파일 읽기)
tool_execute를 통해 호출하며, 명령 접두사는 file_reader_입니다:
도구 이름 | 설명 |
| 파일의 앞 N줄 읽기 |
| 파일의 뒤 N줄 읽기 |
사용 예시
지식 엔티티 생성
{
"command": "memory_create_entities",
"entities": [
{
"name": "React",
"entityType": "Framework",
"observations": ["用于构建用户界面的 JavaScript 库", "由 Meta 维护"]
},
{
"name": "TypeScript",
"entityType": "Language",
"observations": ["JavaScript 的超集", "添加了静态类型检查"]
}
]
}엔티티 관계 설정
{
"command": "memory_create_relations",
"relations": [
{
"from": "React",
"to": "TypeScript",
"relationType": "supports"
}
]
}지식 노드 검색
{
"command": "memory_search_nodes",
"query": "React"
}파일 앞부분 읽기
{
"command": "file_reader_read_head",
"filePath": "C:\\project\\logs\\app.log",
"lineCount": 20
}파일 뒷부분 읽기
{
"command": "file_reader_read_tail",
"filePath": "C:\\project\\logs\\error.log",
"lineCount": 50
}아키텍처 설계
McpHost/
├── McpHost.exe # MCP 主机服务
├── MemoryCli.exe # 知识图谱 CLI 插件
├── FileReaderCli.exe # 文件读取 CLI 插件
└── index.js # npm 入口文件McpHost: MCP 프로토콜 서버, 도구 노출 및 CLI 프로세스 관리 담당
MemoryCli: 지식 그래프 관리, 엔티티, 관계, 관찰 기록의 CRUD 지원
FileReaderCli: 효율적인 파일 읽기, 대용량 파일의 앞/뒷부분 읽기 지원
기술 스택
.NET 10.0 - 런타임 플랫폼
NativeAOT - 네이티브 컴파일, 최고의 성능
C# 13 - 프로그래밍 언어
JSON-RPC 2.0 - CLI 통신 프로토콜
MCP Protocol - AI 어시스턴트 통신 프로토콜
개발
소스 코드 저장소
git clone https://gitee.com/JJbox/memory.git빌드
# 使用 PowerShell
.\build.ps1테스트
# 单元测试
dotnet test McpHost.slnx
# E2E 测试
dotnet run --project tests\E2E\MyMemoryServer.E2E.csproj -c Release상세 문서
MemoryCli 사용 설명서 - 지식 그래프 전체 API 문서
FileReaderCli 사용 설명서 - 파일 읽기 전체 API 문서
라이선스
작성자
JJbox
This server cannot be deployed
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Cross-tool persistent memory and context for AI assistants over MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA general-purpose MCP gateway that exposes your local CLI skills to any AI assistant.4 npm1MIT
- FlicenseNot gradedqualityDmaintenanceExposes a set of CLI tools (test generation, documentation generation, linting, test running, code search) to AI assistants via MCP, allowing them to perform these tasks through natural language.3-
- AlicenseNot gradedqualityCmaintenanceBridges MCP-compatible AI clients to over 100 Hermes Agent skills for web browsing, file management, code execution, GitHub operations, and more.1MIT
- AlicenseAqualityDmaintenanceProvides LLMs with local filesystem operations (read/write files, list directories) and command execution via MCP, enabling file management and task automation within AI clients.79 npmISC