DM

deniscartin/mcp-cli

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

20 stars 3 forks 质量 58 趋势 10

一个用于与模型上下文协议(MCP)服务器交互的综合工具包。该项目既提供了图形用户界面,也提供了命令行工具,用于管理运行的MCP服务器......

概览

一套用于与模型上下文协议(MCP)服务器交互的全面工具包。该项目提供图形用户界面和命令行工具,用于管理MCP服务器、使用OpenAI模型对其运行查询以及发现可用工具。 模型上下文协议(MCP)是一个开放标准,用于向大型语言模型(LLM)展示工具和能力。它使LLM能够以标准化方式访问外部工具,如网页浏览器、数据库和API。本项目提供了一个客户端实现,使其能够轻松: - 连接兼容MCP的服务器 - 管理多台服务器配置 - 运行利用MCP工具功能的自然语言查询 - 探索可用工具及其功能 该项目由三个主要组成部分组成: 1. : 用于管理服务器并在终端中运行查询 2.: 基于PyQt5的桌面应用程序,用于可视化交互 3.

概述(AI 翻译)

一套用于与模型上下文协议(MCP)服务器交互的全面工具包。该项目提供图形用户界面和命令行工具,用于管理MCP服务器、使用OpenAI模型对其运行查询以及发现可用工具。

什么是模型上下文协议?

模型上下文协议(MCP)是一个开放标准,用于向大型语言模型(LLM)展示工具和能力。它使LLM能够以标准化方式访问外部工具,如网页浏览器、数据库和API。本项目提供了一个客户端实现,使其能够轻松:

  • 连接兼容MCP的服务器
  • 管理多服务器配置
  • 运行利用MCP工具功能的自然语言查询
  • 探索可用工具及其功能

项目组成部分

该项目由三个主要组成部分组成:

  1. 命令行接口(CLI):用于管理服务器并在终端中运行查询
  2. 图形用户界面(GUI):基于PyQt5的可视化桌面应用
  3. API 服务器:一个通过 HTTP 暴露 MCP CLI 功能的 RESTful API,实现与 Web 应用及其他服务的集成

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP CLI, GUI & API - Model Context Protocol Client

A comprehensive toolkit for interacting with Model Context Protocol (MCP) servers. This project provides both a graphical user interface and command-line tools for managing MCP servers, running queries against them using OpenAI models, and discovering available tools.

What is Model Context Protocol?

The Model Context Protocol (MCP) is an open standard for exposing tools and capabilities to large language models (LLMs). It enables LLMs to access external tools like web browsers, databases, and APIs in a standardized way. This project provides a client implementation that makes it easy to:

  • Connect to MCP-compatible servers
  • Manage multiple server configurations
  • Run natural language queries that leverage MCP tool capabilities
  • Explore available tools and their functionality

Project Components

This project consists of three main components:

  1. Command-Line Interface (CLI): For managing servers and running queries in a terminal
  2. Graphical User Interface (GUI): A PyQt5-based desktop application for visual interaction
  3. API Server: A RESTful API that exposes MCP CLI functionality via HTTP, enabling integration with web applications and other services

Directory Structure

mcp-cli-project/
├── mcp_cli/                 # Core Python package
│   ├── api/                 # RESTful API server implementation
│   │   ├── server.py        # Flask-based API server
│   │   └── README.md        # API documentation
│   ├── gui/                 # GUI implementation using PyQt5
│   ├── core.py              # Core functionality shared by CLI, implementation
├── mcpgui/                  # Web-based GUI (Next.js frontend)
│   ├── src/                 # Source code for the web interface
│   └── public/              # Static assets
├── bin/                     # Executable scripts
│   ├── mcp_gui.py           # Script to start the GUI
│   └── mcp_cli.py           # Script to run CLI commands
├── config/                  # Configuration files
│   └── config.json          # Server configurations
├── docs/                    # Documentation
└── setup.py                 # Package installation configuration

Features

Core Features

  • Server Management: Add, remove, list, and update MCP server configurations
  • Query Execution: Run natural language queries against MCP servers
  • Tool Discovery: View available tools and their capabilities
  • Configuration Import/Export: Share configurations between installations

GUI Features

  • User-friendly Interface: Intuitive desktop application for managing MCP servers
  • Query History: View and reuse previous queries
  • Real-time Output: See query results as they arrive
  • Tool Explorer: Visual interface to browse available tools

API Features

  • RESTful Interface: HTTP endpoints for all MCP CLI functionality
  • JSON-based: Consistent request/response formats
在 GitHub 查看完整 README

安装

npx @playwright/mcp@latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"], "env": {"DISPLAY": ":1"} }, "airbnb": { "command": "npx", "args": ["-y", "@openbnb/mcp-server-airbnb", "--ignore-robots-txt"], "env": {} } } }