Skip to content

bas/mcp-workshop-doc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Build your own MCP Server

Workshop resources used for the MCP workshop at the LEGO DevCon 25 in Billund.

Presenter: Bas Peters (@bas), Solutions Engineer at GitHub.


Goals for today

  • What is MCP?
  • Showcase MCP
  • Hack + Q&A
  • Everyone leaves with a working MCP Server

What is MCP?

MCP (Model Context Protocol) is an open-source standard for connecting AI applications to external systems.

Some examples include:


Participants

The key participants in the MCP architecture are:

Participant Description
MCP Host The AI application that coordinates and manages one or multiple MCP clients
MCP Client A component that maintains a connection to an MCP server and obtains context from an MCP server for the MCP host to use
MCP Server A program that provides context to MCP clients

Communication: Through stdio or HTTP streaming using JSON RPC as a protocol language for messaging.


Server Capabilities

MCP servers can provide three main types of capabilities (primitives):

Capability Description
📄 Resources File-like data that can be read by clients (like API responses or file contents)
🔧 Tools Functions that can be called by the LLM
📝 Prompts Pre-written templates that help users accomplish specific tasks

Utilities

  • Notifications: Enable MCP servers to provide real-time updates to connected clients
  • Logging: Send log messages to clients for debugging and monitoring purposes
  • Pagination: Handle paging

Client Capabilities

MCP servers can provide additional client capabilities:

Capability Description
🗂️ Roots Specify which files servers can access, guiding them to relevant directories while maintaining security boundaries
🧠 Sampling Request LLM completions through the client, enabling an agentic workflow
❓ Elicitations Request specific information from users during interactions

MCP Inspector

To inspect and debug your MCP server you can use the inspector, for example for Node.js:

npx @modelcontextprotocol/inspector node dist/index.js stdio

Getting started

Get one of the starter repositories (see Resources) and then folow the README to install and run the server and to run the examples. There is a resource, a tool, and a prompt example included.

Explore the source code. Open the repository in VS Code and ask Copilot to explain the code and start making some changes. You could start by adding a few improvements like for example name validation for the say-hello tool or add a resource that can be used to help you to greet people in different countries.

⚠️ Warning: always validate tools against Security Best Practices and follow these practices when you build servers.


Resources

📚 MCP Spec / Introduction

🚀 Starter Repositories

The starter repositories might have to bumped to the latest SDK version.

🛠️ SDKs

The Everything Server provides a showcase of all capabilities. A great start to learn more about cpesific MCP features.

🐙 GitHub MCP Server


🎮 Playtime

Guidelines

  • Share your ideas
  • Find partners (optional)
  • Use one of the starter repositories
  • Use GitHub Copilot

💡 Some Ideas

  • Add some resources and implement a resource listing tool
  • Connect to some service or API
  • Build something creative!

Workshop materials for MCP (Model Context Protocol) development

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors