This example has been fully verified: connect to a local course materials service, view its capabilities, then query materials for a specific lesson. All materials are included with the project—no personal files, AI accounts, or model API keys required.
If you only want to understand the usage method, you can start with the steps and results below. The commands for reproduction come later, as optional advanced content.
Example Environment and Verification Scope
| Item | This Run |
|---|---|
| Client Application | AI Atlas command-line teaching client provided with the project: scripts/verify_mcp.py |
| Communication Component | ClientSession from the official MCP Python SDK 1.26.0 |
| Service Program | scripts/mcp_course_server.py, providing fictional course materials |
| Operating System | Verified on macOS 15.6, arm64; other systems not verified |
| Python | Verified on 3.12.14; Python 3.12 recommended for this example |
| Connection Method | Local standard input/output (stdio), no network port listening |
| Protocol | Actually negotiated 2025-11-25; this guide does not claim to use the latest protocol |
| Cost and Materials | Installing dependencies requires internet; experiment runs do not call paid models or remote data services, reading only the fictional materials bundled with the project |
| Verification Date | 2026-09-09 |
This example uses the minimal teaching client, making it easy to preserve original results and avoid depending on personal accounts and changing product interfaces. It verifies MCP communication and capability invocation, but does not verify the setup interfaces of arbitrary desktop AI applications, nor does it test the quality of lesson plans generated by models.
Step 1: Confirm What You're Connecting To
The service is named AgentLearn course materials (keeping the pre-rename example identifier for consistency with original verification records). It only provides querying for one example course, does not read other materials from your computer, and does not offer modification, deletion, or sending operations.
The client first establishes communication with the service, actually returning protocol version 2025-11-25 and declaring support for tools, resources, and prompts. This is evidence of connection, not yet a course query result.
Step 2: View Available Capabilities
What was actually discovered this time:
| Type | Identifier | What It Can Do |
|---|---|---|
| Tool | get_course_material | Query materials by course ID |
| Resource | course://catalog | Read the course catalog to find queryable IDs |
| Prompt | prepare_lesson | Get a lesson preparation requirement with course ID |
In AI applications with graphical interfaces, these capabilities may appear in connection details, tool lists, or related selection portals. Specific buttons should be verified against the application documentation; this guide will not substitute unverified interface paths for actual evidence.
Step 3: Query and Verify Returned Content
Select course ID silk-road-01 and invoke get_course_material. The actual return includes:
Course: silk-road-01
Title: Silk Road: Exchange and Communication
Grade: First year of middle school
Duration: 40 minutes
Materials: M01 Routes, M02 Exchanges, M03 Classroom QuestionsThis is a summary of the actual return. The complete tool result matches field-by-field verification with the original materials, with the lesson plan section totaling 40 minutes. See the original result JSON and readable summary.
Additional checks have also been executed: non-existent course IDs return errors; path strings used as course IDs are also rejected; the content hash of the original materials remains unchanged. Both the resource catalog and prompt template were actually retrieved.
Successful template retrieval only means obtaining a set of requirements—it does not mean a lesson plan has been generated. Regular AI applications still need to select materials, submit them to the model for processing, and verify the final result.
Optional Reproduction: Running the Same Experiment
Execute the following commands from the project root directory. venv creates an isolated Python environment within the project, pip installs the experiment dependencies; these are tools for reproducing the experiment, not prerequisites for learning MCP concepts.
python3.12 -m venv .venv
.venv/bin/python -m pip install -r docs/evidence/mcp-environment-lock.txt
.venv/bin/python scripts/verify_mcp.pyThe complete dependency snapshot is preserved in the lock file above; core SDK dependencies are also listed in requirements-mcp.txt. If you already have the project environment set up and dependencies installed, you can skip directly to the third command. First-time installation requires internet; subsequent runs only read and write the project's examples and verification records locally.
You should see:
SDK: mcp 1.26.0
Protocol: 2025-11-25
Transport: stdio
Tools: get_course_material
Resources: course://catalog
Prompts: prepare_lesson
Course: silk-road-01
Title: Silk Road: Exchange and Communication
Duration: 40 minutes
Source material IDs: M01, M02, M03
Result: passed
Model called: no; this experiment verifies MCP communication, not generated teaching quality.This output comes from the actual run record. The script will overwrite verification results and service logs; it will not install persistent connections or automatically start model tasks.
To further examine the implementation, see the client program and service program. These files are the experiment code—they are not general-purpose configurations that can be copied into arbitrary product settings pages.
When Stuck, Judge by Results
| Symptom | What to Check First | How to Confirm Recovery |
|---|---|---|
Cannot find python3.12 | Whether this version already exists on the current machine; installing environments is outside the scope of basic tutorials | After the interpreter outputs a version number, create the environment |
Cannot find mcp package | Whether it was installed and run in the project's .venv | Use the same .venv/bin/python to run installation and experiments |
| Service fails to start | Whether the root directory is correct, files are complete, and service logs show errors | Initialization returns correct service name and protocol version |
| Connected but no query capabilities | Whether you're connecting to this project's service and whether the required tools are discovered | The list actually contains get_course_material |
| Query returns course not found | Whether the ID comes from course://catalog | Querying silk-road-01 returns complete materials |
| Invocation succeeds but answer still has problems | Whether the model's organization process, context selection, and requirements meet the goal | Verify the final answer against the materials; this experiment does not include this phase |
These troubleshooting steps are organized by invocation layer. Dependency or environment errors should be handled according to actual logs; this table does not guarantee coverage of all possible situations.
How to Exit
When the experiment ends normally, the client closes the session and terminates the local service. Press Ctrl+C during execution to abort; no persistent connections or external authorizations have been added. The .venv and verification records within the project can be kept for reproduction.
The service only provides restricted queries, but the Python process running it is not an operating system read-only sandbox; do not extend this example's capability boundaries to all MCP services.
Think About It
If you switched to an AI application of your own choosing, what should you re-verify?
Reference judgment: Whether it supports the required connection method and protocol; how to configure that service; what tools or materials it provides; what the access scope is; whether actual queries return correct results. Don't just verify that the "MCP" label is present.
Next Steps and Sources
Read How a Query Actually Happens, or return to MCP Basic Explanation.
See the official Python SDK v1.26.0 and Protocol 2025-11-25 lifecycle. Technical documentation and this experiment were verified on 2026-09-09. Actual run records demonstrate this environment works; cross-product configuration, other systems, and actual reader comprehension remain unverified.