# MCP Builder Lab: Learning Resource Finder
Build and test one discoverable MCP tool. All catalog entries are fictional. No network services, credentials or enrollments are used.

## Environment
Tested with Python 3.12 and `mcp[cli]==1.29.0`. The kit intentionally pins the official SDK v1 maintenance API. SDK v2 is current; migrate separately using https://py.sdk.modelcontextprotocol.io/migration/ rather than changing versions midway through this exercise.

## macOS / Linux
```sh
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python test_resource_server.py
```
## Windows PowerShell
```powershell
py -3.12 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\.venv\Scripts\python.exe test_resource_server.py
```
Expected final output: `PASS: 16 discovery, schema, result and validation cases`.

## Connect in VS Code
Copy the appropriate `vscode-mcp.macos-linux.json` or `vscode-mcp.windows.json` into `.vscode/mcp.json` within this project. Start the server with VS Code's MCP controls, inspect its tool listing and review the trust prompt for your own project. See https://code.visualstudio.com/docs/agent-customization/mcp-servers for current client instructions.

Ask: “Use Learning Resource Finder to find Python practice I can finish in 20 minutes. Report the resource ID and duration.” Expected tool result: `py-loops`, 15 minutes. The assistant must not claim to enroll you.

## Files
- `resource_server.py`: complete one-tool implementation.
- `test_resource_server.py`: actual MCP stdio session tests.
- `requirements.txt`: pinned dependency.
- `vscode-mcp.*.json`: platform-specific client examples.
- `project-brief.md`: contract, scope and extension plan.
- `assessment-rubric.md`: behavior-based assessment.
- `results-journal.md`: prediction, observation and debugging record.

## Troubleshooting
An import error usually means the install and launch interpreters differ. A server run directly in the terminal may wait silently for protocol input; that is expected. Run the test to exercise it. Do not print diagnostics to stdout, which carries protocol messages. Empty search results can be correct.

## Use and adaptation
Use these learning files for your own study, teaching or portfolio. Label catalog data as fictional. Explain your own modifications and preserve enough setup information for someone else to reproduce your results. Before using a real database, add authorization, failure handling and source-specific tests.
