Homework
Three tasks extending the MCP server with search, building a custom server, and Claude Desktop integration.
Complete all three lab exercises before starting the homework. You will need the MCP SDK and optionally Claude Desktop.
📥 Reference Solution
⬇ lab_answer.pdfTask 1 — Add a search_notes Tool
Objective
Add a search_notes tool that finds notes containing a keyword.
Instructions
- Implement
search_notes(query: str) -> strthat searches note titles and content for a keyword (case-insensitive) - Return matching note titles and a snippet of the matching content
- Handle the case where no notes match
- Test with several notes and different search queries
Deliverable
A notebook with the search tool implementation and test results.
Self-check: Searching for a keyword present in 2 of 5 notes returns exactly those 2 notes.
Task 2 — Build a Real MCP Server
Objective
Build a complete MCP server for a domain of your choice (using the design from Lesson 12 Homework Task 2, if completed).
Instructions
- Choose a domain: bookmarks, recipes, vocabulary flashcards, project tasks, etc.
- Implement at least 3 tools (create, read, update or delete)
- Implement at least 1 resource
- Include proper error handling for all tools
- Test with
mcp dev your_server.py
Deliverable
A standalone .py server file and a notebook documenting its tools, resources, and test results.
Self-check: The server starts without errors. All tools work in the Inspector. Error cases return helpful messages.
Task 3 — Connect to Claude Desktop
Objective
Connect your custom MCP server to Claude Desktop and demonstrate it working.
Instructions
- Add your server to
claude_desktop_config.json - Restart Claude Desktop and verify the server connects
- Have a conversation with Claude that uses your server’s tools
- Document the conversation, showing Claude discovering and using your tools
Deliverable
A notebook with your config JSON, the conversation transcript, and observations about how Claude uses your tools.
Self-check: Claude successfully calls at least 2 of your tools in a natural conversation.
Submission Checklist
- Task 1: search_notes tool with keyword matching; test with multiple queries
- Task 2: Complete MCP server with 3+ tools and 1+ resource; tested in Inspector
- Task 3: Server connected to Claude Desktop; conversation demonstrating tool use
- All code runs without error