MCP REST API and CLI Client
@rakesh-eltropy
About MCP REST API and CLI Client
Overview
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.
Basic information
More Agent Frameworks MCP clients
chatmcp
daodao97ChatMCP is an AI chat client implementing the Model Context Protocol (MCP).
🌟 MCPM - Model Context Protocol Manager
pathintegral-instituteCLI MCP package manager & registry for all platforms and all clients. Search & configure MCP servers. Advanced Router & Profile features.
MCP Client Chatbot
cgoinglove🚀 Open source MCP Client: A Multi-provider AI Chatbot Solution
MCP CLI client
adhikaspA simple CLI to run LLM prompt and implement MCP client.
LangChain.js MCP Adapters
langchain-ai** THIS REPO HAS MOVED TO
Comments