Today we're talking about the Model Context Protocol
also known as MCP designed by Anthropic and supported
by Microsoft. We're going to build an MCP Copilot
agent inside Microsoft Copilot Studio step by
step so that you can follow along. Now I'm very
excited to show you MCP because I really believe
It simplifies the creation of making agents inside
Copilot Studio and makes it really effortless
and I'll show you exactly why as we go through
the build. My name is Shervin Shafi and I'm a
Copilot Principal Engineer at Microsoft. Thank
you for joining Collaboration Simplify. Let's
get into the build. Okay so on to the favorite
part of the video which is creating this agent
and so open up a browser and just type in copilot
studio dot preview this gives you access to all
our preview features dot microsoft .com so put
that in the browser and copilot studio will pop
up now if this is your first time in studio just
a little bit of navigation if you look on the
left hand side you have your home icon you can
create new agents These are your existing agents.
You have access to flows and different tools.
And then these three dots open up another menu,
which gives you access to Power Platform, Automate,
and all kinds of good stuff. Now here, basically,
I just wanted to point out this tool section
is one way of you being able to access MCP, the
Model Context Protocol. And when I selected tools,
these are some of the existing tools, which are
basically flows in this case that I've created
in the past. These are custom flows that I've
created. But if you select this plus new tool
icon, then MCP pops up over here, as well as
custom connector flows, prompts, and so on. Now,
if I select model context protocol, this just
basically takes me to the copilot studio our
admin guide and a specific tab inside the admin
guide that talks about how you can extend your
agent with mcp and it talks about what mcp is
how does it work and there's a lot of good information
in here so definitely check this out but one
of my favorite parts of this is right here it
gives you hyperlink to the mcp the main site
for it which is basically a site that is designed
and developed by Anthropic because they make
MCP. So this is the site that it takes you to,
modelcontextprotocol .io. And so real quick,
before we jump into actually creating the agent,
I wanted to do a level set so everyone's on the
same page with what MCP is and why it's so awesome.
So let's look at this introduction together and
just kind of review it. So basically it says,
look, MCP is an open protocol that standardizes
how applications provide context to large language
models. Think of MCP like a USB port for AI applications.
Just as USB -C provides a standardized way to
connect your devices to various peripherals and
accessories, MCP provides a standardized way
to connect AI models to different data sources
and tools. MCP enables you to build agents and
complex workflows on top of LLMs and connects
your model with the world. So the whole idea
is that you have your own large language model
and you want to be able to connect it to data
sources. And so there needs to be a standard.
which is MCP that defines how these connections
happen. Because there's a lot of data sources,
right? So think of ServiceNow, Salesforce, so
many different data sources. And on the other
side, you have Copilot Studio, which is housing
a large language model. And if Studio wants to
connect to ServiceNow, how is this interoperability
happening? And it's not just Studio. So there
are many different hosts, if you will, or LLMs
that want to connect to these data sources. So
why not just define a standard way for everyone
to be able to connect and interoperate? So looking
at this just a little bit more before we dive
into the actual agent creation, if you go to
this understanding concepts part and just scroll
down a little bit, here is the concept section
of MCP. So let's look at this, right? MCP follows
a client server architecture where an MCP host,
an AI application like cloud code or cloud desktop,
establishes connections to one or more MCP servers.
The MCP host accomplishes this by creating one
client for each MCP server. each mcp client maintains
a dedicated one -on -one connection to the corresponding
mcp server so there's three concepts to understand
here right you have the mcp host which they're
defining as cloud or cloud desktop but in our
case the host is actually copilot studio that's
the host that is the application that coordinates
and manages one or multiple mcp clients so the
host can manage or coordinate clients so on the
client side you have a component that maintains
a connection to a server so you got the client
server relationship this has been around in technology
for such a long time now and then finally you
have the server which is a program that provides
context to the mcp client so the server in our
case we're going to be using this ncp server
for docusign so the server is connecting to docusign
which is the end application essentially and
then the client is actually in the Copilot Studio
world using Power Platform's tools like Power
Automate Flows and Connectors essentially to
be able to connect to the server which is connecting
to DocuSign. So all of this stuff is happening
in pretty much an automated fashion. So what
really makes this great is that it makes Copilot
Studio really really low code or almost no code
and you're going to see this as I build this
out. using the DocuSign MCP server. So this is
kind of like level setting what it is and there's
some diagrams here that you can look at and a
lot of good documentation here. Now, let's go
back to Copilot Studio and we're going to close
this out. Let's go ahead and create our agent.
So on the left -hand side here, we're going to
select Create and we're going to build this MCP
agent. And here I'm just going to select the
plus new to create a new agent. And you can type
in what you want this agent to do, or you can
configure it, or you can just create it. So I'm
going to select create because this takes me
to the full functionality of the agent. And then
from within this, we're going to select tools
to get us to the MCP server. So as this is coming
up, there's always a lot of stuff that you can
do with these agents. have to give it a description
you can give it instructions give it a name give
it an image you can share this you can publish
it knowledge sources a lot of this we've done
in the past but just heads up that most of these
basically they show up on the top right knowledge
sources tools is what we're going to be focusing
on agent which is multi -agent orchestration
we did some videos on this recently topics and
then this plus three or additional items like
activity analytics channels and so on so now
that this has come up we can select edit and
for the agent name let's call it something like
my first mcp agent and we're going to go ahead
and then change the icon and i have this really
cool mcp logo that i found and i'm just going
to select that and save it so this is my first
mcp agent the details are here we can click edit
to give it a description and all kinds of good
stuff right but we're going to skip all this
and we're going to scroll down to tools and we're
going to select add a tool and here you can see
a lot of different tools right now if you look
we basically have all featured we're in the feature
section we have connectors we have flows and
we have mcp so if i go to mcp you'll see a list
of mcp servers and there's more and more popping
up every time i come here i see a new one like
for example this this one is new box just showed
up but we're going to be focusing on this docusign
mcp server and i also wanted to show you real
quick if i switch from mcp to connectors and
if i type in docusign here in the search you'll
see that we have a lot of different connectors
that are basically Power Automate flows that
are already available. These connectors are available
and you can see there's so many of them, right?
And each one is for a specific action. Like for
example, this one adds a recipient to an envelope.
This one lists recipients from envelopes and
this one updates and so on and so forth, right?
So all of this exists from a connector perspective,
but on the MCP side, there's one DocuSign server.
That's the one we're going to select because
it really simplifies the building of these agents
and you'll see why in just a minute. So we select
it and the first thing it says is, look, you
need to have a connection. You're not connected
because you have to connect to your DocuSign
account. And being a Microsoft employee, I really
don't do much with DocuSign. But there is a way
that we can demo this together. So I'll take
a break here and say, look, if you have a DocuSign
account, you can probably skip forward to the
next section of this video. But if you don't
have a DocuSign account, then just follow along
into how I'm actually going to create this using
these steps. So you can create a demo DocuSign
account. Here, there's a connector documentation
I'm going to select. And this kind of drops me
halfway down this document that if I scroll all
the way back up to the top and just go down a
little bit, I found that there's a section here
under obtaining credentials that talks about
to try the connector, please use a demo account.
And you have to go to this site. You have to
create a sandbox account. And this is essentially
what I did. So select this DocuSign developer
sandbox portal. And here all you got to do is
select try for free and create an account for
yourself. So I went ahead and did this already.
I created an account for Shervin for myself.
But just go ahead and fill this out and create
yourself a demo account. And then we'll go from
there. Let me actually log in with the credentials
that I have. So let me click not connected. Create
a new connection. and it says okay this is a
docusign demo and it tells you what it does i'm
going to go ahead and select create i'm going
to create a new connection it opens up this docusign
page where i can log in with my credentials so
just give me one second and let me log in all
right with that my password in there i'm going
to go ahead and select login and then i'm just
going to skip for now and log in and hopefully
this should authenticate me if i got everything
in there it says okay boom you're connected the
green check box and i can add it to the agent
i can add and configure let's go ahead and select
add and configure and see what it gives us for
this mcp server okay so here we are in this DocuSign
MCP server and we're in the details section there's
some inputs and there's tools and so let's look
at this together it says okay details this is
the name we're going to leave it we're not going
to change it this is the server we're connected
green check box under additional details I'm
going to leave all of this as is but you can
change authentication ask the end user before
running I said no in terms of inputs there's
nothing in there you can click plus to add them
i'm going to leave them this is the most interesting
part that i wanted to highlight for all of you
right so these are the tools that this server
has access to so much like you saw all the different
connectors that were under the docusign there
was like maybe a hundred of them these are the
tools that are part of the server so what makes
mcp great is that these connectors, if you will,
on their tools are already in there. And so you
don't need to go ahead and build them out or
add them or even program them, if you will. So
it just makes everything simple. So look at the
tools, right? There's a send envelope, send a
new DocuSign envelope email using a specified
template. This template is key. We probably have
to build it and specify the email message of
the recipient. So if you want to... send a DocuSign
template to someone for them to sign something
this is what you do it uses the send envelope
template get envelope templates list the templates
for a specific DocuSign account and get current
DocuSign account retrieves the current DocuSign
account so it does three different things and
maybe we can test out some of these now with
that because we're not making any changes to
the MCP server and it's enabled up here I'm just
going to go ahead and back out of this and basically
go to the overview of the agent, which again,
it's blank. There's no instructions in here.
Now, if on this side here from under testing,
so you can see that there's a testing mechanism
inside of an agent. And if I close this out,
and if you don't see it, just select test, we
can go ahead and test, right? So I can say, I
can ask you the simple question like, what can
the mcp .q assign tool do for me let's see what
it says okay first thing it says is let's get
you connected first so apparently it's not connected
this is probably going to happen for you so let's
go ahead and see what happens if we select retry
and if that doesn't work select the open connection
manager so this is going to pop up this connection
manager and let's see if we can connect over
here okay so this is the DocuSign demo there's
one tool using it and it says that it is not
connected so let's select connect and it should
just use the credentials that I tried to connect
it with initially which right here you can see
it's the same credentials it gave a green check
box I'm going to click submit and this should
go from not connected to connected so looks like
we're good here i'm going to go ahead and close
this out and let's come back here and i'm just
going to copy this and i'm going to click this
arrow to kind of refresh this test and type this
in again and i'm basically going to say what
can the DocuSign tool in this agent do for me
i'm going to add in this agent and let's see
what it comes back with Okay, the MCP DocuSign
tool in this agent can assist with electronic
signature process, document management and workflow
automation. It allows users to send, sign and
manage documents securely and efficiently. Okay,
so let's go ahead and say, can you send a document
for me? This is totally being new to this, right?
Really not knowing what the agent can do. And
let's see what happens here. So it's doing stuff.
You can see all of this stuff in the screen is
trying. And it says that it appears that there
are no available templates in the DocuSign account.
Therefore, I cannot proceed with sending a document.
So this is a hint, right? The hint is that you
need to have some templates in place. So let's
do this. Let's go to our DocuSign account that
we created in the sandbox developer environment
and create a template. And up along the top,
I see that there is a template menu item. So
I'm just going to select that. And there should
be nothing in here because we just created this
account. And so one of the first options you
have is to create a template. I'm going to go
ahead and select that. And I'm going to basically
say, look, the name of this template is for my
MCP agent. The description is optional. We'll
leave a blank and we can add documents. So I'm
gonna click on this blue link and you can browse,
you can drop it from some other location or you
can create a new document. And so this one for
my MCP agent shows up here. And in terms of other
functions like role, name, email, who needs to
sign. All of these are additional options. I
don't know much about DocuSign, but you can go
ahead and customize these. And subject, please
sign immediately. Let's say, please sign immediately.
Hello, this is very important. And then the envelope
type, let's just select, this is a lease agreement.
And I'm going to select next. It says add at
least one recipient and name and email to the
template. So that's what it says down there.
So let's go ahead and say, look, I want Shervin
to sign in. That's fine, right? Let's go ahead
and select that and select next. So it looks
like now we're actually in that document for
my MCP agent that I said I'm going to build.
And here you can... make some changes to the
document right so let's say this is our document
please sign and then you can ask for a signature
here and then sign here too all kinds of stuff
right you you guys get the point you can you
can customize this DocuSign document that's part
of the template so With that, I'm just going
to go ahead and save and close this. Keep it
simple. And it looks like everything is in place
now. Now, let's do this. Let's go back to our
agent. Make sure to give this video a like as
it really does help the channel. And let's take
this prompt and copy it. Refresh the test and
ask it the same question. Can you send a document
for me? Let's see what it says I'm already seeing
some differences here based on all the coding
that's happening Look at all this stuff over
here look at this the document has been successfully
sent to the specified recipients if you need
any further assistance let me know so that document
that i already had got sent to the recipient
which i already put the email in here so look
at all this stuff right in terms of the inputs
this is the template this is the email subject
please sign immediately this is the body hello
this is very important all of that stuff basically
happening and all the coding you can see is already
pre -populated and done for you this is the power
of MCP you don't have to do all the heavy lifting
that you normally had to do with power automate
flows and custom connectors because it's a standard
it's already set up for you and so you can just
execute quickly just like i did in this in this
demo for you now there's some other functions
but let's go check make sure that this email
actually got sent to the recipient so let's do
that real quick and so what you're looking at
now is that gmail that basically the agent sent
the document to and so you can see test document
please sign immediately and i can go ahead and
select it And then I can review the document
and it says in the body, hello, this is very
important. So everything that we put in the template
got executed by just me telling the agent about
it or to tell it to take that action. So I can
go ahead and review the document and see what
it looks like. Now, if it doesn't look very good,
it's because I didn't put a ton of effort in
there. But let's just see. This is the message.
Everything that we did, click continue. and look
this is our document please sign sign here okay
sounds good accept and sign sign here too accept
and sign ready to finish finish so basically
we just signed this document using our agent
now let's see what else this agent can do right
so if i select tools and i select that docusign
mcp server if you look on the bottom the tool
section that we looked at before so it looks
like basically it can tell us about our account
it can tell us about the templates that we have
and then it can also send the template so let's
go back to test here and we can say something
like tell me about my DocuSign account let's
see what it says so it executes that MCP server
and it's running some code here right basically
using that connector and it's coming back here
on the right hand side and saying look this docusign
account details are it's for microsoft this is
your account id this is a your url it's for shervin
and this is your email all of that stuff now
let's say we ask it a question like um tell me
about my docusign templates Let's see what it
does there. So this one over here use the get
current DocuSign account but this one is using
get envelope templates and Over here. It's basically
telling me that the template name is this the
template ID It was created on this day was modified.
It was used by it's got one page all of this
stuff, the subject, the blurb, everything, right?
So I would suspect if you had multiple templates,
it would give you multiple of this information.
Now, one thing I wanted to really highlight is
the difference between how easy MCP servers are
with the tools that they have embedded. Not only
do they have multiple tools or connectors, if
you will, but they've really simplified the process
because of the standard that exists. So if we
look at a traditional flow that I've made in
the past using these connectors, if I select
my flows here and I go and I look at one of these
flows that I built, like this custom flow for
ServiceNow, I use this as part of my HR connector
in the past that connected to ServiceNow. So
here we're in the overview section, but I can
go to designer. This whole process of designing
the connector you are basically skipping i know
this is a custom flow and maybe a connector is
a little bit more simple but let me just highlight
something else right so if i expand this out
like when an agent calls the flow listing the
records in the service now and then i look at
like updating the records there are things in
here like basically formulas that you have to
put in so for this this part of the connector,
when I wanted to change the hours booked in a
database, I had to write this code in here. And
although this might not be that intense for someone
who is new to power platforms or coding, this
can be somewhat overwhelming. And so this whole
idea of like functions and expressions and dynamic
functions. all of that goes away with these mcp
connectors and mcp servers and clients because
of this standard connection that exists between
the client and the server and the host so i think
that is really the power of mcp and one last
thing i want to show you is if we go back to
the actual agent so if i select agents and continue
without saving here and go back to that mcp server
agent that we just built together. Remember,
we didn't give it any instructions, any knowledge
sources. All of that stuff is to come. We just
kind of tested it in here. If this looks good,
you can always publish it. and you can share
it and you can put it inside channels. So there's
a ton more that you can do. And if you're curious
about those, just let me know. But this doesn't
have to be just something that you test inside
Copilot Studio, but this can be something that
you actually publish and you share. So now that
we're publishing it, we can actually go ahead
and select this on the top here. We have five
different options. We can go to five. We can
go to channels. And then we can decide where
we want to publish to. So if you want to publish
just to inside Teams and M365 Copilot, then we
can basically fill out this stuff. So if this
looks good, we can go ahead and add channel and
then we can make this agent available in M365
and we can edit the details and all of that good
stuff over here. So the developer name, I always
like to put Shafi Studios. and go ahead and save
and then you can always click on availability
options right here and you can basically copy
the link very simple thing to do is if you go
inside teams and you just drop it anywhere in
a chat this is my first mcp agent then you can
basically select it and you can add it to your
own profile and by you now adding it to your
profile everything that we did in the test screen
You can just have access to inside Copilot for
Teams. So now that it was added, you can see
that you can chat with it inside Teams. My first
MCP agent, we can select it and you can say something
like, wow, what templates do I have? And so you
can interact with it just much like you did.
And the first time, even here, it's going to
ask you to connect with it. It's going to ask
you for that connection manager, which is fine.
You just click on the link, you connect to your
DocuSign account, and then you can ask it that
question again. So let's go ahead and select
connect and then go back to Teams and ask it
the same question. What templates do I have access
to? And now with the connection there, this is
kind of like asking everything we did in the
test environment, but now you're doing it inside
Teams. So this is how you can access your agents
inside Teams and Copilot. So it's basically telling
us that template that we built. This is very
important, all that kind of stuff, right? I hope
you really enjoyed this session. I was very excited
to show you all about MCP and I'm looking forward
to... The MCP server list being built out with
more and more companies and connections over
time. If you have any feedback, if you have any
questions, drop them in the comments. Make sure
to give this video a like and consider subscribing.
And I'll catch you on the next one.