Loading video player...
And so the theme that we've been talking
about of AI agents as MCP servers uh I
shared some of these slides last time as
well uh but let me give a little bit
more context. So if you think about
agents today a lot of the agentic
behavior happens on the client side. So
the client may be a cursor or a cloud
code or now there's you know OpenAI
codeex and those are the uh uh
applications that do the agentic
behavior and then they connect to MCP
servers to get uh to call tools to get
data uh even to like get prompts and
resources etc. Um but like you could
actually expose agents as MCP servers
instead. That way any MCP client could
invoke these agents and coordinate
across them and orchestrate them just
the same way that it does with any other
MCP server. Uh and that's kind of like
the idea that we've been thinking about
quite a bit. Uh Roy showed that with
Langflow as well where uh you have these
agents themselves exposed over the MCP
protocol and so you can even do like
these multi-agent uh interactions uh
over the same base protocol that like
you do to fetch data.
is more of like a retriever and so
there's you know it's fetching data from
the web it's doing more of a
prototypical kind of like API request uh
and then retriever I think that we just
saw that to me also seems like an agent
that's exposed as an MCP server because
you make these tool calls and then the
server goes out and does like
sophisticated things behind the scenes
and those sophisticated things may
involve LLM calls in that workflow
and so uh the other thing that we've
been thinking a lot about is tools
currently in MCP are pretty short-lived
like they they're in proc right you kind
of call a tool and then you await for
its response uh and so they don't really
work very well for agentic behavior
because agents can take minutes to hours
to maybe in the future even days to
complete and so how do you like model
that as a tool uh how do you pause and
resume and how do you like uh what's the
runtime of the environment of this
because they can't just like block the
server on an API call that's uh going to
take hours to complete. And so we've
been thinking about modeling these uh uh
kind of like a agent tools as async
workflows uh and so that like these
agents can be paused and resumed. They
can await for human feedback. They may
fail and need to be retrieded. And we
currently use uh temporal in the back
end to like kind of actually execute the
the the agent runtime. But in order to
expose it, one of the things we actually
came up with was this decorator called
app.tool tool with an MCP agent. And
what it does is it sets up a temporal
workflow for you and it like basically
will wrap this API that you have that
you want to expose as an MCP tool uh as
an as a temporal workflow so that you
can uh kind of call it like any other
MCP tool but it will be executed in an
asynchronous longunning durable
execution backend. Uh and so this part
is now like open source. It's uh uh
available for folks to try. You can run
it locally as well. Uh but one of the
things that we've been working for quite
a while on now is actually being able to
deploy these agents as MCP servers in
like a single command. And so we've been
uh calling this MCP agent cloud. And
really the whole idea is you should be
able to deploy agents that you write
with MCP agent as SSC or streamable HTTP
uh MCP servers and for like
automatically have the these app.tool
tool decorated functions run as
longunning temporal workflows and so uh
agent to agent communication agent to
other tool other MCP server
communication all of that happens over
MCP and all of the execution because
it's durable it's like fault tolerant
and it can be paused and resumed over
long periods of time happens over
temporal and so that's what we've been
working on and I want to show you a very
quick demo of that um so here I have
this like uh uh project that If you do
uh MCP agent init u using the CLI,
you'll be able to get this. Uh and I
I'll just to go over a few of these. So
I talked about app.tool. So this is an u
an uh MCP uh server that will be exposed
uh through MCP agent. And this tool will
actually run in a in a durable execution
backend uh as a as a workflow. And so in
this case, the agent is very simple. It
has access to the fetch and file system
servers. It's like a prototypical hello
world agent and it's just able to like
fetch URLs, read files and answer users
requests. And so this tool will just
like you know generate uh pass you pass
in the input that the user specifies
here and you'll get a response. Then we
can like have a regular MCP tool which
doesn't run in the durable execution
back end. This is like you know you're
just doing calling a simple function
that you just want a quick answer back
from. So this will run in proc in this
MCP server context. And we have a whole
set of these things by the way like
loggers notifications elicitation
sampling, all of these really advanced
like MCP features. We spend a lot of
time just getting all of them to just
work seamlessly. So here you could do
like logger error and this will show up
u back at the MCP client side as a as a
notification. All done over MCP. So
there's really like no secret sauce
here. It's just putting together a bunch
of these technologies and exposing
things in this standardized protocol.
And then to deploy this uh you can
actually like run this locally pretty
straightforwardly uh and test things
out. Uh and there's tons of like
examples and documentation in the MCP
agent repo for that. But in order to
deploy this, you just do uh u uh run MCP
agent deploy. And this one single
command will basically get you I ran
this just before starting this. And it
gets you like an HTTP uh endpoint with a
deployments. MCP agent.com URL. And this
is an SSC uh endpoint for your server.
And so you can basically run this in
inspector and cloud and any MCP client.
Uh and so let's just uh try that real
quick. Actually uh I think I have it
actually set up here. Uh yep, this is
running. And so uh here let's just do a
list tools request and you can kind of
see all these tools that we had the
finder tool which was that hello world
agent that has access to fashion file
system. The cool thing you'll notice is
uh this looks just like an MCP tool and
it is just an MCP tool but I can like
maybe say uh please summarize the first
paragraph
uh and we'll use maybe the model context
protocol website itself. And so here
we'll run this tool and first you'll
start seeing the notifications. These
are all the logger statements that are
coming back from the server. And so you
can immediately start seeing like all of
this uh collaboration and coordination
is happening over over MCP. We made a
tool call uh where we passed in the
arguments and then we got a response
back and it says something to the effect
of the first paragraph of this is um
this USBC I think they compare uh MCP to
the USBC of uh uh like uh analogy and
that looks pretty correct and so uh this
the cool part is this uh didn't just run
in the app server context it actually
ran in temporal and so you can do all
sorts of really sophisticated stuff as a
consequence of that. This workflow could
have failed. It could have ran for
hours. It could have like, you know, uh
required human input and the workflow
needed to be paused and then resumed at
a later date. And all of those semantics
are still possible, but they're exposed
as an MCP tool. Uh what you'll see also
is like some of these uh tools uh there
are a few tools that ship by default. So
you can kind of see like workflows list
shows you all the workflows that you can
run with this server. This comes like
automatically packaged uh as part of uh
an MCP server shipped with MCP agent. uh
workflow runs will show you like all the
workflows that you've run and what the
status was and it's really useful for
things where uh they're longunning tasks
and uh the tools will like return a
workflow ID so you can kind of query
things afterwards asynchronously and
then you can use this uh also because
this is just a streamable HTT or
streamable HTTP or SSC endpoint you can
just use this in any MCP client like
cursor cloud desktop uh chat GPT etc and
you can start using your agents pretty
much anywhere. Uh and so we're pretty
excited because this is kind of a new uh
you know uh paradigm for how agents are
exposed uh over the web and I hope that
this results in like many many more
agents that are doing very sophisticated
things and you could write all sorts of
custom agents but then deploy them as
MCP servers and then use them in any MCP
client. And the fundamental premise is
that in the near future, you know, the
vast majority of line of business
applications are going to become uh MCP
clients. And so if you want custom
agentic behavior in those applications,
the best way is to just piggyback off of
like the MCP protocol and expose your
agents as MCP servers so that you can
use them in any MCP client. Um, and so
that's the simple premise and there's a
ton of infrastructure behind the scenes
that makes this possible. So, uh, please
check it out. You can basically go on um
mcpag agent.com and there are some docs
on getting started and we'll we're going
to be doing like a pretty uh soft launch
in the coming hours just posting about
it on Discord and Twitter. So check it
out and would love your feedback really
like this is a new paradigm and so we're
curious to see what what folks do with
it.
In this talk, Sarmad Qadri (LastMile AI) introduces MCP Agent Cloud, a platform for deploying long-running, durable AI agents that can act as MCP servers. He covers: • The limitations of stateless agents • How Temporal enables persistent, interruptible agent workflows • Deploying agents as cloud-hosted MCP tools with built-in logs and orchestration Try it today here: https://docs.mcp-agent.com/cloud/overview Join our Silsila Series with exciting speakers on MCP every month: https://luma.com/calendar/cal-PD5n917pFSeIj9E?period=past