AO

arthurcolle/openai-mcp

开发工具

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

35 stars 16 forks 质量 46 趋势 0

arthurcolle/openai-mcp 是从 https://github.com/arthurcolle/openai-mcp. 导入的 MCP 服务器候选服务器。

概览

arthurcolle/openai-mcp 是从 https://github.com/arthurcolle/openai-mcp. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

这是对Claude代码的强大Python重现,具备增强的实时可视化、成本管理和模型上下文协议(MCP)服务器功能。该工具为软件开发任务提供自然语言接口,支持多个LLM提供者。

主要特色

  • 多提供者支持: 支持OpenAI、Anthropic及其他大型语言模型提供商
  • 模型上下文协议集成:
  • 作为MCP服务器运行,用于Claude Desktop及其他客户端
  • 连接任何内置MCP客户端的MCP服务器
  • 多智能体同步用于复杂问题解决
  • 实时工具可视化: 实时查看工具执行进度和结果
  • 成本管理: 通过预算控制跟踪代币使用和支出
  • 综合工具套件: 文件操作、搜索、命令执行等
  • 增强界面: 丰富的终端界面,带有进度指示器和语法高亮
  • 上下文优化: 智能对话压缩与内存管理
  • 代理协调: 具有不同角色的专业代理可以协作完成任务

安装

  1. 克隆此仓库

  2. 安装依赖:

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

README

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

MCP Coding Assistant with support for OpenAI + other LLM Providers

A powerful Python recreation of Claude Code with enhanced real-time visualization, cost management, and Model Context Protocol (MCP) server capabilities. This tool provides a natural language interface for software development tasks with support for multiple LLM providers.

Key Features

  • Multi-Provider Support: Works with OpenAI, Anthropic, and other LLM providers
  • Model Context Protocol Integration:
    • Run as an MCP server for use with Claude Desktop and other clients
    • Connect to any MCP server with the built-in MCP client
    • Multi-agent synchronization for complex problem solving
  • Real-Time Tool Visualization: See tool execution progress and results in real-time
  • Cost Management: Track token usage and expenses with budget controls
  • Comprehensive Tool Suite: File operations, search, command execution, and more
  • Enhanced UI: Rich terminal interface with progress indicators and syntax highlighting
  • Context Optimization: Smart conversation compaction and memory management
  • Agent Coordination: Specialized agents with different roles can collaborate on tasks

Installation

  1. Clone this repository
  2. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file with your API keys:
# Choose one or more providers
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here

# Optional model selection
OPENAI_MODEL=gpt-4o
ANTHROPIC_MODEL=claude-3-opus-20240229

Usage

CLI Mode

Run the CLI with the default provider (determined from available API keys):

python claude.py chat

Specify a provider and model:

python claude.py chat --provider openai --model gpt-4o

Set a budget limit to manage costs:

python claude.py chat --budget 5.00

MCP Server Mode

Run as a Model Context Protocol server:

python claude.py serve

Start in development mode with the MCP Inspector:

python claude.py serve --dev

Configure host and port:

python claude.py serve --host 0.0.0.0 --port 8000

Specify additional dependencies:

python claude.py serve --dependencies pandas numpy

Load environment variables from file:

python claude.py serve --env-file .env

MCP Client Mode

Connect to an MCP server using Claude as the reasoning engine:

python claude.py mcp-client path/to/server.py

Specify a Claude model:

python claude.py mcp-client path/to/server.py --model claude-3-5-sonnet-20241022

Try the included example server:

# In terminal 1 - start the server
python examples/echo_server.py
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →