mcp_starter_project
This MCP server powers a chat CLI for Claude or Gemini, letting users reference local documents by ID and execute MCP prompts through natural language.
README
MCP Chat
mcp_starter_project is a command-line chat application built around a local MCP server. The project supports two usage modes:
- Anthropic Claude mode using
main.py - Google Gemini / GenAI mode using
genai_main.py
Both modes share the same MCP server implementation and document tooling in mcp_server.py, but use different model adapters and entrypoints.
Runtime modes
| Mode | Entry point | Model adapter | Required env vars | Notes |
|---|---|---|---|---|
| Claude | main.py |
core/claude.py |
ANTHROPIC_API_KEY, CLAUDE_MODEL |
Uses Anthropic Claude and the Claude CLI flow |
| Gemini / GenAI | genai_main.py |
core/gemini.py |
GOOGLE_API_KEY, GEMINI_MODEL |
Uses Google Gemini and the GenAI CLI flow |
Prerequisites
- Python 3.10+
- Either Anthropic or Google Gemini credentials
- Optional:
uvif you want to run the MCP server withuv run
Setup
1. Configure environment variables
Create a .env file in the project root with the values for the mode you want to use.
Claude mode
ANTHROPIC_API_KEY="your_api_key_here"
CLAUDE_MODEL="claude-3.5-mini"
Gemini / GenAI mode
GOOGLE_API_KEY="your_google_api_key"
GEMINI_MODEL="gemini-3.1-flash-lite"
Optionally set USE_UV=1 if you want main.py to launch mcp_server.py through uv run instead of the current Python interpreter.
2. Install dependencies
Use the provided pyproject.toml dependencies.
Recommended:
python -m venv .venv
source .venv/bin/activate
pip install -e .
If you do not want to install editable mode:
pip install anthropic python-dotenv prompt-toolkit "mcp[cli]>=1.8.0"
Running the application
Choose one of the two supported runtime modes.
Claude mode
python main.py
If you set USE_UV=1, main.py will start mcp_server.py through uv run.
You can also pass additional MCP server scripts to main.py:
python main.py another_server.py
Gemini / GenAI mode
python genai_main.py
This path uses the Google Gemini adapter and the GenAI-specific CLI.
How it works
main.pystarts the CLI app and launchesmcp_server.pyas a local MCP server.mcp_client.pymanages the MCP session and exposes methods for listing tools, prompts, and reading resources.mcp_server.pydefines documents, MCP tools, resources, and a prompt that can be executed through the MCP protocol.core/cli.pyprovides the interactive prompt with/command completion and@document ID completion.
Usage
Basic chat
Type a question and press Enter.
Reference documents
Use @<document_id> to include a document into your query.
For example:
> Tell me about @deposition.md
The CLI will fetch the referenced document content from the MCP server and include it in the model prompt.
Commands
Use / followed by a prompt name to run a server-side prompt.
For example, if the MCP server defines a prompt named format, type:
> /format deposition.md
Tab completion is available for prompt names and document IDs.
Project structure
main.py- application entry point for Anthropic Claude usagemcp_client.py- MCP client session wrapper for Claude modegenai_main.py- application entry point for Google Gemini / GenAI usagegenai_mcp_client.py- MCP client session wrapper for GenAI modemcp_server.py- local MCP server with documents, tools, and resources shared by both modescore/cli.py- prompt UI with completions and key bindings for Claude modecore/cli_chat.py- chat flow, document injection, and MCP prompts for Claude modecore/chat.py- general chat orchestration and model invocation for Claude modecore/claude.py- Anthropic Claude client wrappercore/gemini.py- Gemini model adapter for the GenAI flowcore/genai_cli.py- CLI prompt UI with completions for GenAI modecore/genai_cli_chat.py- GenAI CLI chat flow with MCP-backed resourcescore/genai_chat.py- GenAI chat orchestration and tool loop handling
Development notes
- Add or update documents in the
docsdictionary insidemcp_server.py. - Add new MCP prompts and tools in
mcp_server.pyto extend the CLI capabilities. mcp_client.pyalready includes MCP session helpers; you can expand it to expose more server operations.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.