Mel Innvertir I Get Started With MCP Servers With Polygon I ETHGlobal Taipei 2025
ETHGlobal·Thu, Oct 9, 2025, 12:00 AM
Learn how to build with MCP servers on Polygon in this ETHGlobal Taipei 2025 workshop by Mel from Double Club. Discover how Model Context Protocol (MCP) extends LLM capabilities, enabling AI-driven smart contract deployment, on-chain interactions, and automation directly from tools like Cursor. Explore Polygon’s MCP server setup, GitHub integration, and real-world asset (RWA) tokenization with live demos on deploying ERC721 and fractional reserve tokens. Whether you're into AI agents, DeFi, or blockchain automation, this workshop provides the tools to streamline development on Polygon. 00:00 - Introduction to MCP Servers on Polygon 00:42 - Workshop GitHub Setup & Demo Day Announcement 01:03 - AI & MCP Servers: Evolution of LLM Tools 01:38 - What is Model Context Protocol (MCP)? 02:13 - Extending LLMs with MCP: Tools & Automation 02:48 - MCP as an Interoperability Layer for AI & Blockchain 03:22 - AI-Driven Smart Contract Development 03:58 - Automating Workflows with GitHub, Notion & On-Chain Actions 04:32 - Cloning the Polygon MCP Server Repository 05:06 - Setting Up the MCP Server Locally 05:58 - NPM Install & Server Configuration 06:32 - MCP Servers vs. Clients: How Cursor Integrates 07:05 - Exploring the MCP Server Tools & Handlers 07:39 - Understanding the Index.ts Entry Point 08:09 - Wallet Setup & Smart Contract Deployment Prep 08:47 - Deploying ERC721 Contracts with MCP 09:54 - Defining MCP Tools: Schemas & Input Parameters 10:58 - Polygon PoS Integration & Beam SDK Setup 11:33 - Building & Running the MCP Server 12:12 - Loading MCP Servers into Cursor IDE 13:29 - Configuring MCP in Cursor for On-Chain Queries 15:09 - Live Demo: Fetching Wallet Address & Token Balance 16:42 - Deploying an ERC721 NFT Contract via MCP 18:00 - Fractionalizing RWAs: Deploying ERC20 Tokens 19:26 - Q&A: SDK Integrations & Agentic MCP Use Cases 22:19 - Closing Remarks & Polygon Grants Program _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 🇹🇼 *ETHGlobal Taipei* This workshop is specifically for ETHGlobal Taipei, a 3-day hackathon held April 4-6 2025, that brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ✅ Follow Polygon X: https://x.com/0xPolygon ✅ *Follow ETHGlobal* X: https://x.com/ETHGlobal Warpcast: https://warpcast.com/ethglobal Website: https://ethglobal.com YouTube: https://www.youtube.com/c/ETHGlobal _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Are you interested in Ethereum development and entrepreneurship?_ 👉 Sign up for the next ETHGlobal event: https://ethglobal.com/events 🎁 Get exclusive access and perks with ETHGlobal Plus! https://ethglobal.com/plus 📣 Want us to throw an event in your city? Tell us where! https://ethglobal.com/city _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Transcript
[Music] Uh, as you know, I'm I'm male from uh Double Club and we're part of the Polygon ecosystem and we want to get you building on Polygon as fast as possible. So, that's why we're doing this MCP server workshop. Um, Double Club is um our it's a dev comm we help dev communities all over the world. We have over 100 cities. So if you ever want to build on Polygon or want to do something fun on Polygon, you can just uh tweet at us, contact us and we'll be happy to support you in any way we can.
Um we are running a demo day on on Sunday. Uh check this link. Uh this QR code will take you to the GitHub repository which is on the top for this workshop. Uh which is the one that we're going to be able to clone and get running the MCP servers locally on your machine. So I would suggest you to uh check it and if not you can just uh I I'll share it in a bit as well.
And um make sure to visit us for the demo day 6:00 to 9:00 p.m. on Sunday. You want to show off what you built. We want to show it off to all of the world.
So you're welcome to join us. And okay, let's get to the to the meat of it. So everyone is on AI right now. Who here has used Chad GPT or any kind of assistant? Probably all of you, right?
Um who here has already built agents? Any agents builder here? Nice. Couple of people. Awesome.
and MCP servers which is like the hot new thing. Who has dabbled a little bit with MCP servers or got it started at least on their machine? Couple of people there. Okay, cool. So you know it's been an evolution uh everything started for a lot of people with with GPTs uh back in 2022 with when chat GPT started and it's been progressing more and more uh on how we start using these tools and MCP server is a new paradigm of sorts that will help you to get building faster enable you to integrate more of the tools that you are have available not only for the LLMs but other tools that you use on your daily uh workflows notion John, GitHub, Google Drive, everything that you use.
So, MCP servers is mostly like an extension to your LLM tools. So, you can provide additional context and functionality. So it's not only about getting responses or getting u trained answers but rather extending the training that the LLMs have and give them access to not only this uh extension of knowledge but also agentic behavior that can help you build and deploy stuff without you having to go through all of the usual processes. Um so how can we check them out? So model context protocol that's what MCP stands for and what you can think of it is as an extension a USB u kind of interperability uh layer that will allow your LLMs to have access to a lot of other functionality that it usually doesn't have.
So you're probably using Corser, Windsorf or VS Code with some extensions such as client. Well, client is more MCP, but this uh GitHub copilot and all of these tools that already help you build on top of your ID. So you can build front-end components, you can build backend uh you know uh APIs and uh Prisma ORMs and get all of this backend stuff and also even smart contracts. So this is already something that you probably are using and enabling. But how can we take it to the next level and allow the LLMs that live inside or like not live inside but have access to your uh working environment and enable it even more access so you can start doing onchain uh actions deploy contracts on chain get information from the from the from the polygon proof ofstake uh chain um enable web search you know sometimes some LM like clot don't have uh web search enabled or even start uh allowing the LLMs to work on your GitHub and on top of your components that you create, have it upload the code and do testing, create issues, and even get information from notion that can be uh managed by a content management system.
Maybe your marketing department wants to get some stuff built on top of a new website, but you know, the flow is usually like kind of slow. Well, what if you could connect the notion page that the uh managers or any other copywriter can work on and automatically get it deployed into the website that you're currently running on production. So, this is what model context protocol enables us to do. What we're going to do right now is we're going to clone the model context protocol server that we created for Polygon that it has um several tools that will allow you to communicate and deploy contracts without you having to touch the code just executing a couple of um commands. So what we're going to do is uh learn build grow.
That's what we're going to do right now. So let's take a look here. And this is the GitHub um repository that we need to um clone. So I'm going to show a cure code specific for this page in case that you want to to scan this as well. And what we're going to do is just uh sorry uh once again you have like five seconds.
One, two, three, four, five. And we're going to move over to our terminal. And I had already been creating this uh before. So, we're going to Oh, why does it look like this? Anyways, so here we're going to get clone and we're going to use the Hold up.
That's fine. And then we're going to switch to Polygon MCP, which is the one that we just cloned. Um, we need to run the npm install. Uh, let me open the cursor first. me make this also a little bit bit larger so you can see.
So once you clone it, you will have already uh several tools uh enabled by default. And this is something that you can also try to build on top of uh during the hackathon. If you whatever you create uh you create like a a D5 application, a swap a swapping uh contract, an escro contract, you can also build it on top of uh the MCP server. that would be super cool but it's not required. What we really really want to you to start exploring is how to get used to these MCP tools.
So whenever you download uh an MCP server which is exactly what this is Polygon MCP we have the servers which is the ones that are going to be running locally on your machine and you're going to have clients that consume these servers. So the client in this case is going to be Corser. Corser is a client that's going to load the code that you build uh which is this uh server. And once you build this code and and enable it on top of cursor, you will have access to any tool that is uh created on top of the server. So there are se different servers.
You have GitHub server, you have notion, there's like 200, 300, there's official, there's community servers. In our case, this is a community server for polygon. And what we're going to do first going to check the readme. We have some uh basic instructions here. We already did this uh cloning and and switching.
We're going to install the dependencies and the dependencies already include um the main things that we we're going to be using. It's going to install things such as um Beam. It's going to install um packages uh such as u GraphQL Prior, you know, basic stuff. And let's explore what we have on the index. So when we start building MCP servers, we usually need to create the the entry point where we're going to um fully uh instruct the the script that's going to be running when your server uh is built.
So this index.ts file is usually the entry point for anything that you're going to run. And here's where the script is run. So if you've used uh Node.js JS before this is just scripts that gets run on main and here we need uh to enable a couple of DMV uh files.
So for example for this one we need specifically a seed phrase because we will be using uh private key to deploy the contracts. So this uh this uh key or this wallet rather needs to be funded with uh Paul previously because we're going to be executing some of the contracts uh some of the deployments sorry and we can also start getting uh other information from the chain. So here we have the the entry point here uh on the contracts f folder we have some uh base contracts for rwas that we already have deployed and we are going to deploy them right now also on the poss sorry and proc chain the lib has only like basic stuff also for constants and some contracts that you can also place here if you want to get get it running and the tools is where it the uh the meat of it happens. So here we have three different things. Uh it's going to depend a lot on how you build your own uh implementation for servers.
For us, it it's uh it feels right to have an index file where you define all of the tools and this is part of the model context protocol um specification. You know, it's a protocols. It's an open source protocol, but it's it has a very welldefined integrations and how to build it. That's how the tools get defined. So here we're going to be placing all of the tools and which are the specific workflows or actions that we want the server to execute.
In our case, we will be creating some simple tools such as call a contract, uh get the ERC20 balance, uh get ERC20 transfer tool, um price, and a couple more that are more specific about deploying. So here are just definitions that the model context protocol requires you to have where you're going to have uh the name, the description and the input schema. So this is all information that tells the server how is supposed to be get running. So all of this is just definitions. The schema as well as for whenever you're going to call a tool, especially if you're going to do something like deploying a contract, you usually have arguments that you need to pass along when calling a contract.
So that's where the schemas come in. Um the type is just uh basic interfaces. Uh here you will place whatever you need uh just to make sure that you have better handling of typing TypeScript stuff. And the real meat is here on the handlers. On the handlers is where you're going to be actually creating all of the code that gets run for your uh server configuration.
So for us uh here was where we do all the imports. Since we're going to be interacting with the polygon proof of stake chain, we need to uh connect VH. We will be using S for the schema validation. Um here are the schemas that we uh created. And here are some of the um imports for the chain and specifically for the different uh AIS and byte code because since we will be deploying smart contracts using beam, we need this information.
In case that you are for example we have created these contracts beforehand. So we have loaded them here in the in the contracts folder. So if if for example if you want to do something new and we can try it if we have enough time which we might not create a new contract and deploy it and share the API here. But what we need to do once we get it running and we have cloned it and installed the dependencies um really um off the shelf you can just run npm run build and this is the process that needs to run. So uh the server has an executable file that it can be uploaded into the client.
So the server is ready. We just run a build command and all of the code that we have generated before is ready to be accessed uh through a single entry point which is the in the build uh in the build folder here and we will enter this index.js uh file into our client. So who can remember me which is the client that we will be using the MCP client. Simple it's cursor.
So we go to the little cog on the top right and we select the MCP uh tab here and here's where you can add new uh MCP servers. So for example I added before this is like the basic example for weather uh the Brave search which is enabling uh web search through the Brave API and this is uh the Polygon MCP server that I actually had loaded before. So I'm going to delete it. Oh, you don't have to delete it. Um so yeah here uh here's how you configure the MCP server on your client.
So for cursor you need to enter this uh specific um how do you say a structure uh it's a JSON file. So basically you need to run the command that's going to execute the file depends on on which you're using. For example, for for the weather one, I use spawn as a different uh node uh runtime. Uh npx for another kind of uh search for the brave search. And for this one, we're going to be using node.
The arguments here once you run the build command, here's where you need to enter the full path that leads into your in the index.js file. So that's uh that's what we're doing here. Selecting let me open this again. Um the environments.
So here, okay, thankfully not all of my words are shown. See, four, five, six, seven, eight. It's almost all of them. Uh, still um it's already like um prepared for this. It only has enough poll to deploy some contracts.
So be be wary when using this. And once you enable this, let's say for example, if I even put disabled, I think you can put this true. So, I just want to put this so you can check that whatever I I make changes there. Um, cloud I think I might be on the wrong directory for this one. So, let me Yeah.
So, I'm going to copy this because it's the previous server and we will change polygonp global and this is the build one. All right. So now this one shouldn't be working. Let's polygon. Okay.
So shouldn't be working, but seems like it's loading the previous one. Anyways, so once we upload it and it's it should be looking like this. The little green means that the server is live and we have all of these tools that are already built into the code that we just cloned. So what happens when you want to start building on top of this? So let's say hey I want to deploy let's say the handlers.
So I want to get the address, right? Um, so I can just get the address for the current um the current wallet that we have enabled through the through the MCP um configuration uh and the seed phrase that we that was uh partially shown. So you know you see I already have access to this get address. So my cursor uh environment has access to the uh polygon proof of SEC chain. So now we can get information about the address.
We can check token balance. So um let's let's check another another tool that we have here which could be just get token balance. I think it's u price handler. I think it's just the name here 20 USC20 balance. So ideally you should use the proper tool called but the contract has 20.
So let's say balance. So now I'm enabling all of this information into my uh cursor and I know this is very basic this but it's already showing that you you have enabled access to the LLM to start quering and getting data from the onchain uh information. So now what we're going to do is we're going to access the deploy property NFT which is an ESC20 uh sorry an ESC 721 uh to uh NFT contract that has been created here. So you can just check it on the on the contracts file folder. Here's a a basic ERC 721 and we can just run this this tool and it's going to directly access our uh our wallet and it's going to deploy a contract that's been defined before and it's going to give us uh the transaction hash and the transaction details.
So here's a very simple way that we have shown how to get started building a polygon deploying an ERC 721 contract without you having to even touch a code like this is the power that enables and we want to build more and more of these uh templating contracts that you can just access and start building on top of them. Uh ERC 721 this one's uh related to RWA. So the next uh contract that we're going to deploy is a fractional reserve u token. So once you create uh maybe the uh yeah once you create uh the ERC 721 this is going to represent let's say a property a real world asset and now we are going to create tokens that are going to represent a fraction of each uh uh of this let's say this apartment in New York. So, we have deployed this and we need a part of the uh information that we're going to need.
It's going to say deploy um property token and we need the previous u the previous address. We're going to need a couple more um parameters. It's part of the ERC20 uh deployment. So, we're going to need the name. We're just going to call it uh RWA token.
We're going to put the symbol early and I think we need the property ID one and it's all coming from the from the proper um handler here. So let's see. So we're here on top going to run the tool. So this is the one that we're doing. So see it was as simple as that.
We didn't have to touch anything. We didn't have to deploy anything. We just downloaded the code, enabled it on top of our cursor client. If you're using client, which is an extension for VS code, which also allows you to run MCP servers or even on cloud desktop, you can just upload the this information and put it there and you can start deploying contracts directly from cloud desktop. So I think that's uh that's pos I'm going to give pause.
Anyone has a one question? I think it's only uh we only have time for one question. Yeah, sure. Okay. So, if you want to run an SDK, you would need to build the the the SDK configuration into the handlers like create a handler for that.
Let's say you want to create an SDK for um polygon transfers. So you need to create this function yourself. Build it like you run the build command and once you have it built and you have the the full path uh the working directory on of your build folder into the index.js if it runs and builds properly and you upload it should be enabled. But you have to build this SDK integration yourself first.
uh but we will be super happy to understand what you are looking for and maybe we can help you build it so you can have it enabled and uploaded it into a pull request for the GitHub. But yeah, no problem. Uh one more. Yes. Okay.
So the for this part the MCP servers are very specific about local uh development and deployments. So for an agent it wouldn't make a lot of sense to create an MCP server. I mean I think technically it will be feasible but it's oh for goats yeah you can use goat for for agent for agentic things. Um in our case we're just using beam uh creating a a wallet client uh on top of using the either the private key or the seed phrase. Uh and once you get loaded it's a very regular backend like experience where you just build on uh on top of beam whichever integration you need.
uh but if you're doing more like a agent using elysa using agent kit or this stuff I think uh I would suggest yeah use checking goat uh or crossment which are similar uh we actually have are running a grants program with crossment uh on polygon and we have community grants so I would suggest you to start deling into AI and any idea that you have bring it to us we'll help you like shape it so you can actually apply for the program and hey why not get an a grant and get building on polygon uh but Uh thanks for the time. Hope you you got some good insights on how to get started. You can just clone the repository and start uh deploying contracts on Polygon. Thank you. [Music]
Automatic transcript — names and jargon may be misspelled.