Skip to main content
Glama
kelvis-santos

MCP Server

controller.ts712 B
// MCP Controller Pattern Example // Exemplo fictício de Controller MCP (autocontido para apresentação) type Request = { params: { id: string } }; type Response = { status: (code: number) => Response; json: (body: any) => void }; // Service fictício class UserService { async findById(id: string) { // Simula busca de usuário if (id === '1') return { id: '1', name: 'Alice' }; return null; } } export class UserController { private userService = new UserService(); async getUser(req: Request, res: Response) { const user = await this.userService.findById(req.params.id); if (!user) return res.status(404).json({ message: 'User not found' }); return res.json(user); } }

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/kelvis-santos/MCP-vscode-examples'

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