SlideShare a Scribd company logo
Intro to the Model Context Protocol
READY LAYER ONE
MATT MCKENNA #DCNY25
Matt McKenna #dcny25
WHOISBEINGASKEDTOUSEMOREAIATWORK?
WHOLIKESIT?
WHATWE’LLCOVERTODAY
High level view of LLMs and AI Agents
What is the Model Context Protocol
Android Device control with AI
TAKEAWAYS
Demystify the Model Context Protocol
Enable you all to build your own MCP Servers!
WHATISALARGELANGUAGEMODEL(LLM)
- Sequence prediction at a massive scale
WHATISALARGELANGUAGEMODEL(LLM)
- Sequence prediction at a massive scale
- Trained on broad data,
fi
ne tuned on task speci
fi
c patterns
WHATISALARGELANGUAGEMODEL(LLM)
- Sequence prediction at a massive scale
- Trained on broad data,
fi
ne tuned on task speci
fi
c patterns
- Interfaces
WHATISALARGELANGUAGEMODEL(LLM)
- Sequence prediction at a massive scale
- Trained on broad data,
fi
ne tuned on task speci
fi
c patterns
- Interfaces
- Chat
- Code Completion
- APIs
WHATISALARGELANGUAGEMODEL(LLM)
HOWDOESANLLMWORK?
- You give the model some text (this is a prompt)
HOWDOESANLLMWORK?
- You give the model some text (this is a prompt)
- It tries to predict what comes next a piece at a time
HOWDOESANLLMWORK?
- You give the model some text (this is a prompt)
- It tries to predict what comes next a piece at a time
- It doesn’t “think” or “know”, but follows patterns
HOWDOESANLLMWORK?
The android developer
The android developer
predict next
The android developer
predict next invalidates
The android developer
predict next
invalidates
The android developer
predict next
invalidates
caches
The android developer
predict next
caches
invalidates
The android developer
predict next
caches
invalidates
and
The android developer
predict next
caches and
invalidates
The android developer
predict next restarts
caches and
invalidates
The android developer
predict next
invalidates caches and restarts
LLMSINACTION
- Let’s do something with the Android Debug Bridge! (ADB)
LLMSINACTION
- Let’s do something with the Android Debug Bridge! (ADB)
- Hey can you write some adb commands for me to launch the Bluesky android app and
input text saying “hey from droidcon new york!” and then post it?
LLMSINACTION
HUMAN
LLM
TASK
PROMPT
HUMAN
LLM
TASK
PROMPT
HUMAN
LLM
TASK
RESPONSE
HUMAN
LLM
TASK
RESPONSE
HUMAN
LLM
TASK
ACTION
HUMAN
LLM
TASK
ACTION
HUMAN
LLM
TASK
PROMPT
HUMAN
LLM
TASK
PROMPT
HUMAN
LLM
TASK
RESPONSE
HUMAN
LLM
TASK
RESPONSE
HUMAN
LLM
TASK
ACTION
HUMAN
LLM
TASK
ACTION
IS GREAT
THIS
IS GREAT
THIS ’NT
WEARESTILLDOINGGRUNTWORK!
ENTERAIAGENTS
WHATISANAIAGENT?
A system that uses a language model to complete tasks
autonomously or semi-autonomously
WHATISANAIAGENT?
- A language model
WHATISANAIAGENT?
- A language model
- Tools it can call
WHATISANAIAGENT?
- A language model
- Tools it can call
- A planner to decide on and sequence actions
WHATISANAIAGENT?
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
Ready Layer One: Intro to the Model Context Protocol
CODENAMEGOOSE
CLAUDEDESKTOP
GEMINIINANDROIDSTUDIO
AIAGENTSNEEDTOOLS
- Tools are the capabilities of the agent
AIAGENTSNEEDTOOLS
- Tools are the capabilities of the agent
- Structured input / output
AIAGENTSNEEDTOOLS
- Tools are the capabilities of the agent
- Structured input / output
- Need to describe
- What’s available
- When to use
- How to use
AIAGENTSNEEDTOOLS
HOWDOWEMAKETOOLS?
THEMODELCONTEXTPROTOCOL
THEMODELCONTEXTPROTOCOL
- A JSON based protocol for tool description and invocation
THEMODELCONTEXTPROTOCOL
- A JSON based protocol for tool description and invocation
- Share contextual information with LLMs
THEMODELCONTEXTPROTOCOL
- A JSON based protocol for tool description and invocation
- Share contextual information with LLMs
- Expose tools and capabilities
THEMODELCONTEXTPROTOCOL
- A JSON based protocol for tool description and invocation
- Share contextual information with LLMs
- Expose tools and capabilities
- Build composable integrations and work
fl
ows
THEMODELCONTEXTPROTOCOL
- A JSON based protocol for tool description and invocation
- Share contextual information with LLMs
- Expose tools and capabilities
- Build composable integrations and work
fl
ows
- Enables tools to describe themselves
THEMODELCONTEXTPROTOCOL
- A JSON based protocol for tool description and invocation
- Share contextual information with LLMs
- Expose tools and capabilities
- Build composable integrations and work
fl
ows
- Enables tools to describe themselves
THEMODELCONTEXTPROTOCOL
MCPFEATURES
- Resources
- File-like data that can be read by clients
MCPFEATURES
- Resources
- File-like data that can be read by clients
- Prompts
- Pre-written templates that help Users accomplish speci
fi
c tasks
MCPFEATURES
- Resources
- File-like data that can be read by clients
- Prompts
- Pre-written templates that help Users accomplish speci
fi
c tasks
- Tools
- Functions that can be called by the LLM
MCPFEATURES
MCPSERVERS
- Easy to build!
MCPSERVERS
- Easy to build!
- Expose Resource, Tools, and Prompts via primitives
MCPSERVERS
- Easy to build!
- Expose Resource, Tools, and Prompts via primitives
- Can work with local processes and/or remote services
MCPSERVERS
ARCHITECTURE
AI AGENT / HOST
ADB
Weather
Calendar
Remote Data Source
Local Data Source
Local Data Source
ARCHITECTURE
AI AGENT / HOST
ADB MCP
Weather MCP
Calendar MCP
Remote Data Source
Local Data Source
Local Data Source
Mode
l
Cont
ext
Proto
col
LET’SBUILD!
ADB
ADB
Kotlin
fun adb(vararg args: String): String {
}
fun adb(vararg args: String): String {
val command = listOf("adb") + args
}
fun adb(vararg args: String): String {
val command = listOf("adb") + args
val process = Runtime.getRuntime().exec(command.toTypedArray())
}
fun adb(vararg args: String): String {
val command = listOf("adb") + args
val process = Runtime.getRuntime().exec(command.toTypedArray())
return process.inputStream.bu
ff
eredReader().readText()
}
ADB
Kotlin
ADB
Kotlin
MCP
ADB
Kotlin
MCP
ADB Kotlin Interface
ADB
Kotlin
MCP
ADB Kotlin Interface
SERVERSETUP
fun main(args: Array<String>) {
val command = args.
fi
rstOrNull() ?: "--sse-server-ktor"
val port = args.getOrNull(1)?.toIntOrNull() ?: 3001
when (command) {
"--stdio" -> runMcpServerUsingStdio()
"--sse-server-ktor" -> runSseMcpServerUsingKtorPlugin(port)
"--sse-server" -> runSseMcpServerWithPlainCon
fi
guration(port)
else -> {
System.err.println("Unknown command: $command")
}
}
}
fun runSseMcpServerUsingKtorPlugin(port: Int): Unit = runBlocking {
println("Starting sse server on port $port")
println("Use inspector to connect to the http://localhost:$port/sse")
embeddedServer(CIO, host = "0.0.0.0", port = port) {
MCP {
return@MCP con
fi
gureServer()
}
}.start(wait = true)
}
fun con
fi
gureServer(): Server {
val def = CompletableDeferred<Unit>()
val server = Server(
Implementation(
name = "mcp-server-android",
version = "0.1.0"
),
ServerOptions(
capabilities = ServerCapabilities(
prompts = ServerCapabilities.Prompts(listChanged = true),
resources = ServerCapabilities.Resources(subscribe = true, listChanged = true),
tools = ServerCapabilities.Tools(listChanged = true),
)
),
onCloseCallback = {
def.complete(Unit)
}
)
//...
fun con
fi
gureServer(): Server {
//...
// Create AdbManager instance
val deviceManager = AdbManager()
//...
fun con
fi
gureServer(): Server {
//...
// Create AdbManager instance
val deviceManager = AdbManager()
// Create AndroidToolsRegistry instance and register all tools
val toolsRegistry = AndroidToolsRegistry(deviceManager)
toolsRegistry.registerTools(server)
//...
fun con
fi
gureServer(): Server {
//...
// Add Android device control prompt
server.addPrompt(
name = "Android Device Control",
description = "Control and interact with Android devices through MCP.",
arguments = listOf()
) { _ ->
// prompt of all tools
}
return server
}
LETSCODE!
TIPSFORDESIGNINGMCPSERVERS
- Start with work
fl
ows, not raw endpoints
DESIGNTOOLSFROMWORKFLOWS
- Start with work
fl
ows, not raw endpoints
- Combine steps into a single high level Tool
DESIGNTOOLSFROMWORKFLOWS
- Tool names and params ARE prompts
PROMPTFRIENDLYTOOLDESIGN
- Tool names and params ARE prompts
- Better Tool descriptions mean better tool use
PROMPTFRIENDLYTOOLDESIGN
- LLMs context is limited
PROTECTTHECONTEXTWINDOW
- LLMs context is limited
- Running out of context window is costly
PROTECTTHECONTEXTWINDOW
- LLMs context is limited
- Running out of context window is costly
- MCPs can help
PROTECTTHECONTEXTWINDOW
MORERESOURCES
- Join the community on
Bluesky
BLUESKY
go.bsky.app/Etd57t6
- Kotlin Multiplatform
implementation of MCP
MCPKOTLINSDK
MODEL CONTEXT PROTOCOL
github.com/modelcontextprotocol/kotlin-sdk
- A local, open source AI
agent, automating
engineering tasks
seamlessly.
GOOSE
AI AGENT BY BLOCK
block.github.io/goose/
- Best practices and
learnings for designing
MCP Servers
DESIGNINGMCPSERVERS
BLOCK’S PLAYBOOK FOR
engineering.block.xyz/blog/blocks-playbook-for-designing-mcp-servers
- bsky.app/pro
fi
le/
botteaap.bsky.social/post/
3lsezmlhco22j
DRUMMCP
HUGO VISSER
- Enable Android apps to
provide MCP server access
to AI tools in development
environments
ANDROID-MCP-SDK
JASON PEARSON’S
github.com/kaeawc/android-mcp-sdk
- Introducing Trailblaze, a
natural language AI driven test
framework.
AIMOBILETESTING -
BLAZINGTHETRAILATBLOCK
SAM EDWARDS + BRIAN GARDNER
STAGE 2
Catch the VOD
THANKYOU
Q/A

More Related Content

Similar to Ready Layer One: Intro to the Model Context Protocol (20)

PDF
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
Matt Walters
 
PDF
Angular js mobile jsday 2014 - Verona 14 may
Luciano Amodio
 
PDF
Divide and Conquer – Microservices with Node.js
Sebastian Springer
 
PPT
Smoothing Your Java with DSLs
intelliyole
 
PDF
Come abbiamo scalato Dazn con micro-architetture
Commit University
 
PDF
SCA Reaches the Cloud
Luciano Resende
 
PDF
PuppetDB: Sneaking Clojure into Operations
grim_radical
 
PDF
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
PPTX
Silverlight Developer Introduction
Tomy Ismail
 
PDF
Os Haase
oscon2007
 
PDF
Play framework
Andrew Skiba
 
PDF
Product! - The road to production deployment
Filippo Zanella
 
PDF
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Cloud Native Day Tel Aviv
 
PPTX
My Saminar On Php
Arjun Kumawat
 
PPTX
Learn you some Ansible for great good!
David Lapsley
 
PDF
Microservices and Friends
Yun Zhi Lin
 
PDF
One Path to a Successful Implementation of NaturalONE
Software AG
 
PDF
Beginning MEAN Stack
Rob Davarnia
 
PDF
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
Jean-Sebastien Delfino
 
PDF
Serverless in production, an experience report (linuxing in london)
Yan Cui
 
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
Matt Walters
 
Angular js mobile jsday 2014 - Verona 14 may
Luciano Amodio
 
Divide and Conquer – Microservices with Node.js
Sebastian Springer
 
Smoothing Your Java with DSLs
intelliyole
 
Come abbiamo scalato Dazn con micro-architetture
Commit University
 
SCA Reaches the Cloud
Luciano Resende
 
PuppetDB: Sneaking Clojure into Operations
grim_radical
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Silverlight Developer Introduction
Tomy Ismail
 
Os Haase
oscon2007
 
Play framework
Andrew Skiba
 
Product! - The road to production deployment
Filippo Zanella
 
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Cloud Native Day Tel Aviv
 
My Saminar On Php
Arjun Kumawat
 
Learn you some Ansible for great good!
David Lapsley
 
Microservices and Friends
Yun Zhi Lin
 
One Path to a Successful Implementation of NaturalONE
Software AG
 
Beginning MEAN Stack
Rob Davarnia
 
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
Jean-Sebastien Delfino
 
Serverless in production, an experience report (linuxing in london)
Yan Cui
 

Recently uploaded (20)

PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
PDF
Simplify React app login with asgardeo-sdk
vaibhav289687
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PPTX
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
PDF
Is Framer the Future of AI Powered No-Code Development?
Isla Pandora
 
PPTX
From spreadsheets and delays to real-time control
SatishKumar2651
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
PPTX
Library_Management_System_PPT111111.pptx
nmtnissancrm
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
Simplify React app login with asgardeo-sdk
vaibhav289687
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
Is Framer the Future of AI Powered No-Code Development?
Isla Pandora
 
From spreadsheets and delays to real-time control
SatishKumar2651
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
Library_Management_System_PPT111111.pptx
nmtnissancrm
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Ad

Ready Layer One: Intro to the Model Context Protocol