Lessons from Building Enterprise Remote MCP Server?

Bookmark
Rate this content

This talk shares real-world lessons from building and operating remote MCP (Model Context Protocol) server. It covers the architectural decisions, technical challenges, and practical insights that came from enabling scalable, context-aware model execution in one of the world’s largest payment platforms.

This talk has been presented at JSNation US 2025, check out the latest edition of this JavaScript Conference.

FAQ

Hemant is a senior machine learning manager at PayPal and a GD in the web and payments domain.

Tool or function calling enables AI models to access real-time data and perform tasks like fetching the current time or weather by making API calls to external services.

MCP (Model Context Protocol) is an open protocol that standardizes communication between AI models and servers, simplifying tool calling and enabling seamless data exchange.

PayPal uses MCP to facilitate remote server interactions, allowing users to perform tasks like creating invoices or checking transactions through natural language prompts.

Key security measures include user consent, token validation, trust boundaries, and multi-layer security architecture to prevent unauthorized access and attacks.

AI models can use code execution to write and run code snippets for workflows, reducing context overload by avoiding the need to register and manage numerous tools.

MCP can enable agent-driven experiences in banking and commerce, such as automated financial analytics, seamless checkouts, and personalized shopping recommendations.

A major challenge was coordinating various teams and addressing legal, security, and operational aspects within a short time frame during MCP's initial launch.

The future points towards more autonomous agent-driven transactions where payments become seamless and integrated into everyday activities without explicit user actions.

Developers should focus on defining clear tool scopes, maintaining secure token handling, and using dynamic imports to manage toolkits efficiently.

Hemanth HM
Hemanth HM
32 min
17 Nov, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Hemant, machine learning manager at PayPal, explains enabling models to access real-time data using tools and function calls. Discussion on the launch of MCP by Antropic and its attributes for standardized protocol. Overview of PayPal's MCP architecture, security measures, and best practices. Importance of trust boundaries, multi-layer security, and authentication in tool access. Evolution of tool architecture, deployment strategy, and blockchain payment protocols. LLM code execution for efficient MCP handling and enterprise-scale launch strategies. Collaboration in tech projects, future of financial MCPs, and use cases in consumer banking.

1. Enabling Models with Tools

Short description:

Hemant, machine learning manager at PayPal, explains enabling models to access real-time data using tools and function calls.

I'm Hemant. I'm a senior machine learning manager at PayPal. I also happen to be a GD in web and payments domain. I'm a DuckDuckDuck community member. I've been lucky enough to be part of TC39, contribute a bit here to Node.js. And you can find me at h3man.com or at Gnument, and that's the QR code.

So if you were a chat GPT or any of those users back then, if you were and said, hey, what's the time or what's the date like? It would have responded you back saying that I don't have access to real-time data, or it would say, hey, I or probably it would have made up a time or date, right? But if I open up a terminal and just say date command, I would see the date and time. It works fine.

Same thing. It might sometimes ask for two different responses and say which is better. And both of them are equally bad in this case where it's saying, hey, probably should ask Siri or Google or use your local time. I really don't have access to time. And these are like actual screenshots. So why does that happen? It happened because all of these models kind of are trained on a particular data set and they have a cutoff knowledge. As you can see it on the graph, each of these models have a cutoff knowledge for a particular month beyond which they don't really know. And within that date also, sometimes they hallucinate.

So how do we enable these models to kind of get access to all of this information? That's where tools came into picture or function calling or tool calling where you can enable the model to make a tool call and figure out what the time or what the weather is in this case. Right. I'm saying what's the weather in Fremont? You can see here the LLM is making a call to weather.com and fetching the weather. The forecast seems to be 67 of high and 53 of low. And that seems to be the high here which is interesting. And same thing with Gemini or anything else. If you say what the time, it would probably say the proper time and the date because now it's able to make a tool call and figure out what the time of the date is.

This is how the function called dance works, right? The user would come in and pass a prompt to the application and the application would then say, hey, here are the set of functions that I have. And it sends that as a context to the model. Based on the prompt, the model figures out, hey, I need to call this particular function with this identifier. This is the required parameters. It makes the function call. The function call internally would probably call an API, come back with a response. The model would take the response, massage it further and send it back to the application and the application shows this to the user.

2. Function Call Process

Short description:

Explanation of how the function called dance enables various calls like weather, time, or date. Examples include defining functions for tool calls like get weather and using small agents for tasks like determining today's date.

This is how the function called dance works. Yeah, it's fine. We saw that the weather call is happening. You can also do the time or the date call, whatever call you want to make. You can write a function. Everything works fine.

Here's a classic example on how the tool or the function definition would look for a tool call. You'd say it's a type of function and then you would say in this case it's a get weather function, which expects some parameters, maybe location and unit in this case. And we say location is required because if the user is asking for a weather of a particular location, I need to know the location and that's a required field.

Here's another example. You could find such experiments that I do at my GitHub link there on Notebooks. This is a pretty old example here where I'm using small agents and using Dr. Go search as a tool and using a hugging face API for the model and saying what is today's date. Because I'm using a code agent here.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Web 3 Gaming: What it is and Why it Matters
JS GameDev Summit 2022JS GameDev Summit 2022
36 min
Web 3 Gaming: What it is and Why it Matters
Web3 gaming enables decentralized identity and finance, allowing game developers to bypass centralized platforms. It is driven by wallets, ERC20 tokens, and NFTs. Web3 games focus on collaborative world-building, ownership, and open-source collaboration. The challenge is achieving decentralization while addressing economic and technological limitations. Web3 aims to redefine the gaming industry by using economic tools and exploring new genres like RPG and RTS games.
Building Dapps with React
React Advanced 2021React Advanced 2021
30 min
Building Dapps with React
The Talk discusses building decentralized applications (DApps) with React and explores the benefits of smart contract technology. It highlights the characteristics and infrastructure of Web 3 applications, including decentralized indexing, off-chain data storage, and decentralized file storage. The Talk also covers identity in Web 3, with a focus on self-sovereign identity and the use of blockchain for identity verification. The process of building a DApp with React and Hard Hat is explained, along with deploying contracts and interacting with them. Overall, the Talk provides insights into the world of DApps and the technologies involved.
Building a Decentralized Web With Web5
JSNation 2024JSNation 2024
13 min
Building a Decentralized Web With Web5
Today's Talk introduces Web5, which combines the best of Web 2 and Web 3 to build a decentralized web. Web5 consists of three pillars: decentralized identifiers, verifiable credentials, and decentralized applications. Verifiable credentials are used on platforms like LinkedIn, while decentralized web nodes act as data stores for web apps. Web5 allows users to own their data, reduces friction in onboarding, and enables example applications like Universal Music Playlist and Connected Travel. Building for Web5 presents challenges such as key management and data usage, but there are resources available to learn more about the technologies.
React on the Blockchain - the Missing Getting Started Guide
React Summit Remote Edition 2021React Summit Remote Edition 2021
32 min
React on the Blockchain - the Missing Getting Started Guide
Today's talk is a guide to developing on the blockchain using Solidity and React. It covers the basics of blockchain, Ethereum, and smart contracts. Interacting with the blockchain involves submitting transactions and solving cryptographic puzzles. Smart contracts can be written in Solidity and tested using the Remix Web IDE. To connect to the Ethereum blockchain, you can run a local node or use an Ethereum node provider. Setting up the development environment involves installing Node.js, Python, Truffle, and MetaMask. Working with Web3 allows for interacting with contracts. The blockchain provides transparency and decentralized networks for use cases like decentralized finance.
Building GraphQL APIs on Ethereum
GraphQL Galaxy 2021GraphQL Galaxy 2021
8 min
Building GraphQL APIs on Ethereum
This Talk is about building GraphQL APIs on top of Ethereum and the Ethereum virtual machine. The graph is an indexing protocol for querying blockchain networks like Ethereum and IPFS. Developers can build APIs called subgraphs to efficiently index data and make it available for querying from frontend applications. The graph serves over 1 billion queries per day and is used in various Web3 applications including DeFi, gaming, and NFT marketplaces. The process involves defining the data model using the GraphQL schema and contract addresses, deploying and testing the subgraph, and using a GraphQL client to query the subgraph.
Build Blockchain dApps using JavaScript
JSNation 2022JSNation 2022
21 min
Build Blockchain dApps using JavaScript
Hello, my name is Russ Fustino, and welcome to Build Blockchain DApps Using JavaScript. We'll cover Algorand blockchain, layer one, setup your development environment, creating a simple DApp, verification, and UI controls from pipeline. Blockchain tools are now accessible to anyone for creating liquidity pooling, staking, and more. The Italian Society of Authors and Publishers is using NFTs on the Algorand blockchain to identify copyrights. Algorand accounts, ASAs, Atomic Transactions, Algorand Smart Contracts, and reporting with Indexer are part of the solution. Creating NFTs can be done using visual tools like Algodesk.io and wallets like Algosigner and MyAlgoWallet. Algorand atomic transfers guarantee the exchange of goods and facilitate decentralized applications. Smart signatures approve spending transactions and smart contracts facilitate global and local storage. DApp architecture includes a UI front end, payment transactions between accounts, asset transactions for NFTs and Fungible Tokens, and application calls for smart contracts. Various SDKs and tools are available, such as AlgoDesk.io, Algorand Studio, and Algodia. Reach is a high-level language and compiler for deploying DApps to the blockchain. Verification and audits play a crucial role in preventing locked away tokens. The Pipeline UI offers controls and components for easy integration into solutions.

Workshops on related topic

Web3 Workshop - Building Your First Dapp
React Advanced 2021React Advanced 2021
145 min
Web3 Workshop - Building Your First Dapp
Top Content
Featured Workshop
Nader Dabit
Nader Dabit
In this workshop, you'll learn how to build your first full stack dapp on the Ethereum blockchain, reading and writing data to the network, and connecting a front end application to the contract you've deployed. By the end of the workshop, you'll understand how to set up a full stack development environment, run a local node, and interact with any smart contract using React, HardHat, and Ethers.js.
Querying Blockchain Data with GraphQL
JSNation 2023JSNation 2023
64 min
Querying Blockchain Data with GraphQL
WorkshopFree
Simon Emanuel Schmid
Simon Emanuel Schmid
Curious about how data works in the world of blockchain? Join Simon in an engaging session about The Graph, the decentralized indexing protocol that makes it easy for blockchain developers to search and query blockchain data. 
Table of the contents:- Understanding blockchain data- Anatomy of a smart contract- Indexing blockchain data with The Graph- Accessing data on The Graph- Recommended subgraphs- Writing subgraphs overview
How to Build UI's for Smart Contracts
React Summit 2022React Summit 2022
134 min
How to Build UI's for Smart Contracts
Workshop
Rahat Chowdhury
Rahat Chowdhury
There are many journeys we can take into becoming a web3 developer. Not all journeys require learning a completely new language and becoming a smart contract developer. In this workshop we will learn how to build our own React UI on top of any existing smart contracts on the Polygon Proof of Stake Blockchain. We will explore a basic overview of blockchains and learn about the advantages of building on Polygon. We will also gain an understanding of what Smart Contracts are, learn how to find existing ones, and learn tools that help us interact with them from a React application.
Build Web3 apps with Javascript
JSNation 2022JSNation 2022
49 min
Build Web3 apps with Javascript
Workshop
Shain Dholakiya
Shain Dholakiya
The workshop is designed to help Web2 developers start building for Web3 using the Hyperverse. The Hyperverse is an open marketplace of community-built, audited, easy to discover smart modules. Our goal - to make it easy for JavaScript developers to build Web3 apps without writing a single line of smart contract code. Think “npm for smart contracts.”Learn more about the Hyperverse here.We will go over all the blockchain/crypto basics you need to know to start building on the Hyperverse, so you do not need to have any previous knowledge about the Web3 space. You just need to have JavaScript experience.