MCP REST API and CLI Client
@rakesh-eltropy
基本信息
关于 MCP REST API and CLI Client
概览
What is MCP REST API and CLI Client?
A simple REST API and CLI client to interact with Model Context Protocol (MCP) servers. It runs on any platform supporting Python and is designed for developers who want to query MCP‑compatible servers using natural language via a language model.
How to use MCP REST API and CLI Client?
Clone the repository, set the OPENAI_API_KEY and optionally BRAVE_API_KEY environment variables (or configure them in mcp-server-config.json), then run the CLI with uv run cli.py or start the REST API with uvicorn app:app --reload. Use the chat command or send a POST request to /chat to interact with LLMs and connected MCP servers.
Key features of MCP REST API and CLI Client
- Supports any MCP‑compatible server (SQLite, Brave Search pre‑configured)
- Integrates with LangChain for executing LLM prompts
- Enables multiple MCP servers to collaborate on a single query
- Works with any LLM provider offering a function‑based API
- Provides both a CLI and a REST API for flexible usage
- Customizable via the
mcp-server-config.jsonconfiguration file
Use cases of MCP REST API and CLI Client
- Query a local SQLite database using natural language commands
- Combine database results with web search for enriched answers
- Ask general knowledge questions to an LLM via CLI or REST endpoint
FAQ from MCP REST API and CLI Client
What MCP servers are supported?
Any MCP‑compatible server can be used. The client comes pre‑configured with SQLite (using a sample test.db) and Brave Search.
How do I add additional MCP servers?
Add the server configuration to the mcp-server-config.json file located in the project root.
Which LLM providers can I use?
Any provider with a function‑based API is supported, including OpenAI, Claude, Gemini, AWS Nova, Groq, and Ollama. See the LangChain documentation for more options.
Can I run it as a REST API?
Yes. Start the server with uvicorn app:app --reload and send a POST request to http://localhost:8000/chat with a JSON body containing a message field.
Does it support streaming responses?
Yes. Add "streaming": true to the request body when using the REST API.
智能体框架 分类下的更多 MCP 客户端
Unified MCP Client Library
mcp-usemcp-use is the easiest way to interact with mcp servers with custom agents
Nerve
evilsocketThe Simple Agent Development Kit.
DISCLAIMER
mario-andreschakMCP-Hub and -Inspector, Multi-Model Workflow and Chat Interface
MCP CLI - Model Context Protocol Command Line Interface
chrishayukmcp-cli
wong2A CLI inspector for the Model Context Protocol
评论