Skip to main content
Glama
index.ts1.04 kB
#!/usr/bin/env node import { FastMCP } from "fastmcp"; import { tools } from "./tools/index.js"; async function main() { console.error("Initializing MCP Server..."); const server = new FastMCP({ name: "Openocean MCP Server", version: "0.0.1", }); server.addTool(tools.chainList); server.addTool(tools.tokenList); server.addTool(tools.dexList); server.addTool(tools.gasPrice); server.addTool(tools.getTransaction); server.addTool(tools.quote); server.addTool(tools.swap); try { await server.start({ transportType: "stdio", }); // await server.start({ // transportType: "httpStream", // httpStream: { // port: 8080, // }, // }); console.error("✅ Openocean MCP Server started successfully over stdio."); console.error("You can now connect to it using an MCP client."); } catch (error) { console.error("❌ Failed to start Openocean MCP Server:", error); process.exit(1); } } main().catch((error) => { console.error("❌ An unexpected error occurred:", error); process.exit(1); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/openocean-finance/openocean-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server