Skip to main content
Glama

Phrases MCP Server

by ronniemh
testRequest.ts1.61 kB
/** * For testing, change compilerOptions from tsconfig.json to: * "compilerOptions": { * "target": "ES2020", * "module": "NodeNext", * "moduleResolution": "NodeNext", * "esModuleInterop": true, * "outDir": "build", * "strict": true * }, */ import {makeMockAPIRequest, Phrase} from "./helpers/makeMockAPIRequest.js"; async function test() { // 1. CREATE const newPhrase = await makeMockAPIRequest<Phrase>("POST", { body: { name: "Ronnie", phrase: "Esto es una prueba desde Node", }, }); console.log("✅ Created:", newPhrase); // 2. GET BY NAME const phrasesByRonnie = await makeMockAPIRequest<Phrase[]>("GET", { queryParams: { author: "Ronnie" }, }); console.log("🔍 Phrases by Ronnie:", phrasesByRonnie); // 3. GET ALL const all = await makeMockAPIRequest<Phrase[]>("GET"); console.log("📚 All phrases:", all); // 4. GET BY ID if (newPhrase?.id) { const byId = await makeMockAPIRequest<Phrase>("GET", { path: `/${newPhrase.id}`, }); console.log("🆔 Phrase by ID:", byId); // 5. UPDATE const updated = await makeMockAPIRequest<Phrase>("PATCH", { path: `/${newPhrase.id}`, body: { phrase: "Frase modificada 💪🏼" }, }); console.log("✏️ Updated:", updated); // 6. DELETE const deleted = await makeMockAPIRequest<null>("DELETE", { path: `/${newPhrase.id}`, }); console.log("🗑️ Deleted:", deleted); } } test();

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/ronniemh/phrases-MCP-server'

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