Skip to main content
Glama

Gyazo MCP Server

by nota
index.ts1.75 kB
#!/usr/bin/env node /** * This is an MCP server that provides access to Gyazo images. * It offers functionalities such as listing images, reading specific image contents, and retrieving the latest images. * The server uses the Gyazo API to fetch image metadata and content. * It uses stdio transport to communicate via standard input/output streams. * The server is implemented using the MCP SDK. */ import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { SERVER_CONFIG } from "./config.js"; import { listResourcesHandler, readResourceHandler, } from "./handlers/resources.js"; import { listToolsHandler, callToolHandler } from "./handlers/tools.js"; /** * Create MCP server * Provides functionality for resources (listing/getting image content) and tools (getting image metadata) */ const server = new Server( { name: SERVER_CONFIG.name, version: SERVER_CONFIG.version, }, { capabilities: { resources: {}, tools: {}, }, } ); /** * Set up request handlers */ server.setRequestHandler( listResourcesHandler.schema, listResourcesHandler.handler ); server.setRequestHandler( readResourceHandler.schema, readResourceHandler.handler ); server.setRequestHandler(listToolsHandler.schema, listToolsHandler.handler); server.setRequestHandler(callToolHandler.schema, callToolHandler.handler); /** * Start the server using stdio transport * Communicate via standard input/output streams */ async function main() { const transport = new StdioServerTransport(); await server.connect(transport); } main().catch((error) => { console.error("Server error:", error); process.exit(1); });

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/nota/gyazo-mcp-server'

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