This repository contains my coursework and learning materials for the Model Context Protocol (MCP), including server implementations, client applications, and practical examples.
mcp_coursework/
├── mcp_project/ # Main project directory
│ ├── research_server.py # MCP server for arXiv paper research
│ ├── mcp_chatbot.py # MCP client chatbot implementation
│ ├── server_config.json # Multi-server configuration
│ ├── pyproject.toml # Python project configuration
│ └── papers/ # Research papers data (gitignored)
├── mcp_client.ipynb # Single server client notebook
├── mcp_client_multi_server.ipynb # Multi-server client notebook
├── research_server.ipynb # Server creation tutorial notebook
└── .gitignore # Git ignore rules
- arXiv Paper Search: Search and retrieve academic papers from arXiv
- Paper Information Storage: Save paper metadata locally
- Information Extraction: Retrieve stored paper information by ID
- Single Server Chatbot: Connect to one MCP server
- Multi-Server Chatbot: Connect to multiple MCP servers simultaneously
- Tool Discovery: Automatic tool schema discovery and registration
- Research Server: Custom arXiv paper research tools
- Filesystem Server: File and directory operations
- Fetch Server: Web content retrieval
- Python 3.13+
uvpackage manager- Anthropic API key (for Claude models)
-
Clone the repository
git clone https://github.com/alicegu1117/MCP_starter.git cd MCP_starter -
Set up the Python environment
cd mcp_project uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv sync
-
Configure API keys Create a
.envfile in themcp_projectdirectory:ANTHROPIC_API_KEY=your_anthropic_api_key_here
cd mcp_project
uv run research_server.pycd mcp_project
python mcp_chatbot.pycd mcp_project
jupyter notebook
# Open mcp_client.ipynb or mcp_client_multi_server.ipynbsearch_papers(topic, max_results): Search arXiv for papers on a topicextract_info(paper_id): Retrieve stored paper information
- Connects to multiple MCP servers
- Automatic tool discovery and registration
- LLM-powered conversation with tool usage
{
"mcpServers": {
"research": {
"command": "uv",
"args": ["run", "research_server.py"]
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
}
}
}This project includes several Jupyter notebooks that demonstrate:
- Lesson 3: Basic MCP client implementation
- Lesson 4: Creating an MCP server with FastMCP
- Lesson 6: Multi-server MCP client implementation
This is a learning project, but suggestions and improvements are welcome!
This project is for educational purposes as part of MCP coursework.
Note: The papers/ directory contains generated research data and is excluded from version control via .gitignore.