File size: 2,297 Bytes
b051a1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import sys
import asyncio
from mcp.server.mcpserver import MCPServer
from warppay402_mcp.tools import (
    ArcDexOracleTool,
    WebScraperTool,
    BrowserScraperTool,
    BaseAnalyticsTool,
    ArcAnalyticsTool,
    ArcNetworkQueryTool,
    PdfExtractorTool,
    RenderScreenshotTool,
    ExtractJsonTool,
    SmartContractVerifierTool,
    AerodromeYieldsTool,
    AerodromeSwapTool,
    AerodromeClammTool,
    AerodromeVeaeroTool,
    DeployBaseContractTool,
    DeploySolanaContractTool,
    DeployArcContractTool,
    ArcCctpBridgeTool,
    PublicDataFeedTool,
    DataFeedsTool,
    RealEstateCalculatorTool,
    AddressNormalizerTool,
    WeatherOracleTool,
    OutageOracleTool,
    ForexOracleTool,
    ShippingRateEstimatorTool,
    GithubHealthAnalyzerTool,
    PropertyCompsEstimatorTool,
    UcpDealsOracleTool,
    DefiExecutorAgentTool,
    DeepResearchAgentTool,
)

# Initialize MCPServer (mcp 2.x)
mcp = MCPServer("WarpPay402 MCP Gateway")

# Instantiate all tools
tools = [
    ArcDexOracleTool(), WebScraperTool(), BrowserScraperTool(), BaseAnalyticsTool(),
    ArcAnalyticsTool(), ArcNetworkQueryTool(), PdfExtractorTool(), RenderScreenshotTool(),
    ExtractJsonTool(), SmartContractVerifierTool(), AerodromeYieldsTool(), AerodromeSwapTool(),
    AerodromeClammTool(), AerodromeVeaeroTool(), DeployBaseContractTool(), DeploySolanaContractTool(),
    DeployArcContractTool(), ArcCctpBridgeTool(), PublicDataFeedTool(), DataFeedsTool(),
    RealEstateCalculatorTool(), AddressNormalizerTool(), WeatherOracleTool(), OutageOracleTool(),
    ForexOracleTool(), ShippingRateEstimatorTool(), GithubHealthAnalyzerTool(), PropertyCompsEstimatorTool(),
    UcpDealsOracleTool(), DefiExecutorAgentTool(), DeepResearchAgentTool()
]

def register_tool(tool_instance):
    """Factory helper to capture unique closure scope for each tool."""
    def handler(*args, **kwargs):
        return tool_instance._run(*args, **kwargs)
    
    handler.__name__ = tool_instance.name
    return mcp.tool(name=tool_instance.name, description=tool_instance.description)(handler)

# Properly register each tool with MCPServer
for tool in tools:
    register_tool(tool)

def main():
    """Main CLI entry point for warppay402-mcp server process."""
    mcp.run()

if __name__ == "__main__":
    main()