📖 Lesson content
Summary
We're going to build a CLI-based chatbot that demonstrates how MCP clients and servers work together. This hands-on project will give you practical experience with both sides of the MCP architecture.
What We're Building
Our chatbot will allow users to interact with a collection of documents through natural language. The system consists of two main components:
- An MCP client that handles user interactions and communicates with Claude
- An MCP server that provides tools for reading and updating documents

The server will expose two tools to Claude:
- Tool to read a document's contents
- Tool to update a document's contents
All documents are stored in memory for simplicity - they include files like document.pdf, spreadsheet.xlsx, report.txt, and spec.md.
Important Architecture Note
In real-world projects, you typically implement either an MCP client or an MCP server, not both. You might build:
- Just an MCP server to expose your service's capabilities to AI models
- Just an MCP client to connect to existing MCP servers built by other developers

We're building both components in this project purely for educational purposes - to understand how they communicate and work together.
Project Setup
Download the CLI_project.zip file attached to this video and extract it to your preferred development directory. Open your code editor in the project folder.
Configuration
The project includes a README.md file with detailed setup instructions. You'll need to:
- Add your Anthropic API key to the .env file
- Install dependencies using either UV (recommended) or pip

The .env file should contain:
ANTHROPIC_API_KEY="your-api-key-here"
Running the Project
Once setup is complete, navigate to your project directory in the terminal and run:
uv run main.py
python main.py
You should see a chat prompt appear. Test it by asking a simple question like "what's 1+1?" to verify everything is working correctly.
The starter project already includes basic chat functionality with Claude. In the following videos, we'll add MCP server capabilities and document management features to create a fully functional document-aware chatbot.
Downloads
🔁 Related lessons
- Next: Defining tools with MCP
- Previous: MCP clients
- Same section: Making a request · Multi-turn conversations · Chat exercise
- Part of paths: Path C
- Reference docs: Glossary · Skills atlas · By use-case
📚 Source & attribution
- Original Anthropic Academy lesson: https://anthropic.skilljar.com/claude-with-google-vertex/289199
- © 2025 Anthropic. Educational fair-use only.