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
Saiki
truffle-aiA customizable, general purpose AI Agent that supports MCP. Talk to Saiki in natural language to control computers, applications and more!
🚀 MCPOmni Connect - Universal Gateway to MCP Servers
Abiorh001MCPOmni Connect is an agent execution runtime that connects to multiple MCP servers via stdio, SSE, or streamable HTTP. It supports chat, autonomous agents, and planner-based orchestration treating each MCP server as a tool agent to enable dynamic multi-agent workflows across LLM
chatmcp
daodao97ChatMCP is an AI chat client implementing the Model Context Protocol (MCP).
Open MCP Client
copilotkitWhere On-Device and Cloud LLMs Meet
hazyresearchBig & Small LLMs working together
Comments