Connect using VSCode

Using Copilot, we can set it to Agent mode to import existing Solidity contracts and edit them

1. Add MCP Server

Hit Ctrl + Shift + P and type "Add MCP"

Select HTTP or Server Side Events

For the server URL, add

https://mcp.etherscan.io/mcp

2. Manually Add Bearer Auth

Since VSCode doesn't prompt to add auth anywhere, we need to edit the config to add it

In mcp.json, edit the server config to include your Bearer token.

{
   "servers":{
      "etherscan":{
         "url":"https://mcp.etherscan.io/mcp",
         "type":"http",
         "headers":{
            "Authorization":"Bearer YourMcpKeyToken"
         }
      }
   },
   "inputs":[
      
   ]
}

Last updated