About Mcp_client_openai_gradio
Mcp_client_openai_gradio provides an MCP client service compatible with the OpenAI API format, allowing interaction with local MCP servers through standard OpenAI API requests. It uses an OpenAI-format LLM API that supports function calling and includes a Gradio UI for testing.
Key features
- 01OpenAI API-compatible client service
- 02Connect to MCP servers over stdio or SSE
- 03Configure OpenAI-format LLM APIs
- 04Gradio UI for testing
Use cases
- 01Access local MCP tools through OpenAI API requests
- 02Connect to a server configured for stdio or SSE
- 03Test the service through the Gradio interface
MCP support
Acts as an MCP client and connects to configured MCP servers using stdio or SSE. It exposes interaction through an OpenAI API-compatible service.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP-client 本项目实现了一个兼容 OpenAI API 格式的 MCP (Model Control Protocol) 客户端服务,允许通过标准的 OpenAI API 接口与本地 MCP 模型进行交互。
运行方法:
1, 启动openai api : python main-api.py
2, 启动gradio_ui : python gradio_ui.py # just for test
MCP-Server配置:
修改config.json, 支持stdio 和sse两种。
LLM配置:
修改.env文件, 支持所有 OpenAI API 格式的API, 需要支持 Function Call(工具调用)。

Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.