-
Notifications
You must be signed in to change notification settings - Fork 2
Steps 1 through 9 suggestions #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adds a note indicating that the VS Code MCP extension documentation URL is broken.
| ## Terminology Note | ||
|
|
||
| <!-- comment: I had multiple comments about why we weren't defining client, server and transport clearly until I found them at the very bottom. List them early so learners can find the definition asap. We might also want to list them again at the end as a key takeaway, but definitely include them at the top. --> | ||
|
|
||
| Throughout this training, we'll use "server" and "tool provider" consistently with the MCP SDK terminology. Remember: | ||
|
|
||
| - **Client**: The AI agent, IDE, or chat application | ||
| - **Server**: The MCP service that provides tools, resources, and prompts | ||
| - **Transport**: The communication layer for client and server (stdio or Streamable HTTP) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially had multiple comments about why we weren't defining client, server and transport clearly until I found them at the very bottom. List them early so learners get the definition asap. We can still list them again at the end as a key takeaway if desired, but definitely include them at the top.
| **Key differences from tools:** | ||
|
|
||
| - **Discoverable**: Agents can list and browse available resources | ||
| - **Cacheable**: Content can be cached since resources are relatively static | ||
| - **URI-based**: Use templated URI patterns for easy access | ||
| - **Content-focused**: Represent "things that exist" vs "actions to take" | ||
|
|
||
| **Examples:** | ||
|
|
||
| - Configuration files | ||
| - API documentation | ||
| - Live data feeds | ||
| - Database schemas | ||
| - Log files | ||
| - Project documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[organizing consideration]
Maybe move "Key differences" to the bottom of "## Resources" and consolidated with "Example context patterns", since that also lists the differences.
Bonus: "Examples" could then be consolidated into the "Resources" intro paragraph above, like how "### Tools" has it. Fewer bold list headings = easier to understand structure
| **Agent capabilities with resources:** | ||
|
|
||
| - VS Code and other agents can treat resources as virtual files | ||
| - Display resources in tree views or file explorers | ||
| - Cache frequently accessed resources for performance | ||
| - Use resource content for IntelliSense and autocomplete | ||
| - Preview resource content without executing actions | ||
|
|
||
| **Context efficiency:** | ||
|
|
||
| - **Resources can be cached**: Fetch once, reference multiple times without re-loading | ||
| - **Selective loading**: Agents can load only relevant parts of large resources | ||
| - **Reference vs execution**: Resources can be referenced by URI without full content in context | ||
| - **Tools require execution context**: Each tool call needs parameters, execution trace, and results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor thought]
Agent capabilities and Context efficiency lists make the Resources section feel too long. And since caching is mentioned in 3 lists, it makes these feel slightly redundant. Could these be consolidated?
|
|
||
| <!-- this is where we should start all Tools vs Resources lists. "Example context patterns" should be renamed to make it clear that it's a comparison list, if it's going to stay as it's own list --> | ||
|
|
||
| **Example context patterns:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Continuing off prior comment about moving comparisons to the end:
This is where we could start all the Tools vs Resources lists.
"Example context patterns" should also be renamed to make it clear that it's a comparison list, if it's going to stay as it's own list.
|
|
||
| <!-- todo: this url is broken ⬇️. Maybe it should be https://code.visualstudio.com/docs/copilot/customization/mcp-servers ? --> | ||
|
|
||
| 📝 **Reference**: [VS Code MCP Extension Documentation](https://github.com/modelcontextprotocol/vscode-mcp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broken url. Should it be https://code.visualstudio.com/docs/copilot/customization/mcp-servers ?
|
|
||
| <!-- what progressToken? --> | ||
|
|
||
| When a client doesn't provide a `progressToken`, you can still stream intermediate content updates using structured notification messages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[clarify]
what is this progressToken & what should we be doing about it? Should it be coded somewhere? How do we test for it?
|
|
||
| <!-- ? why not just provide the default in only the typescript function? This would cause confusion if someone updates only 1 of the 2... --> | ||
|
|
||
| **Note on defaults**: While Zod's `.default()` provides the default value, you should also add a TypeScript default in your function parameter destructuring for type safety: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just provide the default in only the typescript function? This would cause confusion if someone updates only 1 of the 2...
| <!-- broken link. maybe https://modelcontextprotocol.io/docs/learn/server-concepts? --> | ||
| The **[MCP SDK](https://modelcontextprotocol.io/docs/api/server)** provides specific error types for different scenarios: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broken link. maybe https://modelcontextprotocol.io/docs/learn/server-concepts?
|
|
||
| <!-- todo: Recommend a mermaid diagram plugin. VScode supports no diagramming languages by default. - ex: Markdown Preview Mermaid Support --> | ||
|
|
||
| ```mermaid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[todo]
Recommend a mermaid diagram plugin. VScode supports no diagramming languages by default.
- ex: Markdown Preview Mermaid Support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[todo]
Missing the "problem" & "verify" sections. & need more than just the diagram for the background info section.
| # Note: If port 6277 is in use, set a new `SERVER_PORT`. | ||
| # You can also optionally change the URL by setting a new `CLIENT_PORT`. | ||
| # Example of changing both: | ||
| # CLIENT_PORT=8080 SERVER_PORT=6278 npx @modelcontextprotocol/inspector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we introduce this earlier?
Why include this: Trying to simply run the inspector in two terminals results in a "port in use" error
I was able to go through all solutions except step 9 authorizing mcp. Step 9 had no technical requirements or validation, only file changes.