Skip to main content
Glama
soriat

MCP Elicitations Demo Server

by soriat
resources.ts772 B
import { Resource } from "@modelcontextprotocol/sdk/types.js"; // Shared function to generate all static resources (used across tools, prompts, and resources) export const generateAllResources = (): Resource[] => { return Array.from({ length: 100 }, (_, i) => { const uri = `test://static/resource/${i + 1}`; if (i % 2 === 0) { return { uri, name: `Resource ${i + 1}`, mimeType: "text/plain", text: `Resource ${i + 1}: This is a plaintext resource`, }; } else { const buffer = Buffer.from(`Resource ${i + 1}: This is a base64 blob`); return { uri, name: `Resource ${i + 1}`, mimeType: "application/octet-stream", blob: buffer.toString("base64"), }; } }); };

Implementation Reference

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/soriat/soria-mcp'

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