LongCut logo

🚀 MCP-powered LangChain payments agent with UiPath

By UiPath Community

Summary

Topics Covered

  • LLMs Need Tools to Act
  • MCP Standardizes Tool Chaos
  • Build UiPath MCP Three Ways
  • Agents Orchestrate MCP Servers
  • End-to-End Autonomous Payments

Full Transcript

Hi there, I'm Jose Bjakan and in this video I will showcase using a real life scenario the power of MCP servers when

leveraged by UiPath Langraph coded agents all hosted and governed within the UiPath platform. MCP which stands for model

platform. MCP which stands for model context protocol is not just a box to be checked. It's a standout feature, I

checked. It's a standout feature, I would say. And maybe even more important

would say. And maybe even more important than that, it truly shines within the UiPath

ecosystem. Now, even if as of today, MCP

ecosystem. Now, even if as of today, MCP hasn't even blown out its first candle yet. It's quite new. It went viral and

yet. It's quite new. It went viral and got accelerated adoption. However, is

misunderstood most of the time. Hence, I

will start with a super brief case for MCP and the history. It all starts with an LLM. And now LM are smart, can respond

LLM. And now LM are smart, can respond to questions, can predict the next thing, but are not really useful in the sense they cannot really do something

for you like fill a form, send a message, pay the bills for that matters.

For that LM need tools and you know it's that saying that

an LLM is as useful or as meaningful as the tools that it has access to and each tool is a different language or different implementation. One needs

to understand the service APIs the business logic of those API fields. it

requires custom implementation and even if the API changes then the inte integration needs to be updated as well. So yes, it is

smart. It is rather useful but hard to

smart. It is rather useful but hard to build and maintain. And this is where MCP comes into play because it offers a standardized

hence the name protocol standardized way to interact with services and applications and agents and LMS can do that without

worrying about how each service is implemented behind the scenes.

There are three options within UiPath to build or host or bring an MCP server.

One is to build and host an UiPath MCP server in a noode fashion by adding tools like RPA agents API and so on.

Another option is to take Python code that implements an MCP server and bring that within the UiPad platform via back and publish similar to coded

agents. Another option is to take an

agents. Another option is to take an existing one, an existing MCP server and bring that within UiPath platform via a

command. I will demonstrate how one can

command. I will demonstrate how one can leverage a local MCP server or an external MCP server for endto-end automation and that processes payment

request like making a payment, issuing refund, sending invoices directly through email. It interprets each

through email. It interprets each message, performs the right action and responds with the outcome. And this is all without human intervention. So this

is supposed to be uh dynamic, trusted and fully autonomous.

And let's suppose that we have this uh situation. We have a product that is

situation. We have a product that is called code editor plus and we have a customer that requests to have four of

these products and we'll say let me know what are the next steps. Once it sends this message, it will be picked up and we will parse that email and send that

email parsed to the agent. Let's go to the agent just to see what happens behind the scenes. This is our agent. Let's see the

scenes. This is our agent. Let's see the diagram for this. So firstly we will prepare the input obviously and the next step would be to understand the email.

So this is the email just the one that you've seen in Outlook and it has to label it as for instance in this case as it is a payment a payment flow and it

labels it correctly. The next part is to trash the emails like to make sure that the email is legit and we can proceed with the action and for this it triggers

a local MCP server and it calls a few tools like is the email valid for instance this is a low code written in Python that is back and published to

UiPath once this is validated so it is successful then from this one it will go to handle transaction ction this

one. See? Yes. And this will call

one. See? Yes. And this will call another server which is stripe and would call a few tools like list the products.

Another one would be list the prices, list the customers and so on up until it would create a payment link and the the answer will be the thank you for

interest. Here is your payment link for

interest. Here is your payment link for this. I will copy this link, paste it.

this. I will copy this link, paste it.

I'm the customer now. I receive the the link. I'll say here's my email. Populate

link. I'll say here's my email. Populate

it and really make this payment. Okay. And once I'm back with

payment. Okay. And once I'm back with the vendor choose, then I will see this transaction here, a payment of $200 and

then some for those four product that the customer wanted to to buy. And let's

say that we have this policy that within 30 days one can make a refund no question asked. Let's do just that.

question asked. Let's do just that.

We'll create a new email. I will say refund

email. I will say refund request and I will take the transaction ID just to have it.

Let me compose the email. Okay. I'll say

please refund this transaction for whatever reason. Okay. And now I will start a

reason. Okay. And now I will start a process again which will trigger because we will see the email will trigger another process. While this executes,

another process. While this executes, let me show you how we've set up the MCP servers. We have two of them. One is a

servers. We have two of them. One is a local one which is this one which exposes three tools. the

tools. Let me refresh it until it you have three tools. One is

to check the if the email is valid like it's not a temporary email or something else to mark an email in our local storage to say this is blacklisted and

to check if the refund was done in the same day for the same customer since we probably want to limit this. The way

this looks into the code is that I have a Python code here with several tools like is a valid email mark email and check the same day refund. You can see

these are the three tools that we see here. Also, we want to use a stripe MCP

here. Also, we want to use a stripe MCP server to access all of these tools. For

this, it is uh even more uh easy to do. We have this official MCP server from Stripe with

this command and we copy this command edit. So we have this command

command edit. So we have this command here. We paste this secret key if you

here. We paste this secret key if you want and we are done ready to to be used. Okay. Let's go back to the jobs

used. Okay. Let's go back to the jobs view and see if if the refund was successful. So we

can see the input here was please refund this transaction. This was the ask from

this transaction. This was the ask from the customer. Now if you look what the

the customer. Now if you look what the agent does here in this diagram it goes through the

same steps. However at understand email

same steps. However at understand email par it labels it differently. It labels

it as refund not payment which is correct and sends this state to the next one in line which is to check the

email this right we'll go here which will trigger again the local MCP server to check if that email is not blacklisted and it's not a temporary

email to see if it's legit and if that is successful if this tool call is successful and we are allowed to move on then it will move on to the next one to

the next node which is to handle the transaction which spin up again the stripe MCP server and it selected a different set of tools let's see what

tools it selected uh second load so it listed the customers this the payment intent so on and so forth up

until it created a refund and the email for that is deu thank you for contacting as I will write to confirm that your refund is successful for this one with

this transaction. Now if you look at

this transaction. Now if you look at transactions, let's see the magic. This one got refunded and also

magic. This one got refunded and also the customer gets that email. For now, I keep it in the draft for the demo purposes, but this is the kind of email

that the customer would receive. And

yeah, this would demonstrate how we can leverage local and external MCP server for a real use case. And MCP is expected to accelerate to unlock a range of use

cases. And we do know that the real

cases. And we do know that the real magic will happen once once this gets into the hands of customers. Thank you.

Loading...

Loading video analysis...