MCP Server Template
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server Templatecheck the health status of the server"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server Template
Template TypeScript para criacao de servidores MCP (Model Context Protocol) usando o SDK oficial @modelcontextprotocol/sdk.
Copie este repositorio como ponto de partida para qualquer novo servidor MCP. A estrutura ja esta pronta com contrato de tool, adaptador de registro e uma tool de exemplo.
Estrutura
.
├── src/
│ ├── core/
│ │ └── protocols/
│ │ └── McpTool.ts # Interface base para todas as tools
│ ├── adapters/
│ │ └── registerMcpTools.ts # Registra tools no McpServer
│ ├── tools/
│ │ └── HealthTool.ts # Tool de exemplo (health check)
│ └── main.ts # Bootstrap do servidor (stdio)
├── claude_desktop_config.example.json
├── package.json
└── tsconfig.jsonRelated MCP server: TypeScript MCP Server Boilerplate
Decisoes de arquitetura
core/protocols/McpTool.ts
Contrato que toda tool deve implementar. Desacopla as tools do SDK, tornando cada uma independente e testavel.
export interface McpTool<
TInput extends Record<string, unknown> = Record<string, unknown>,
> {
name: string;
description: string;
inputSchema: McpInputSchema; // Record<string, z.ZodTypeAny>
execute(input: TInput): Promise<string>;
}adapters/registerMcpTools.ts
Unico ponto que conhece o McpServer. Itera sobre as tools e faz o bind via server.registerTool, mantendo o resto do codigo desacoplado do SDK.
tools/
Cada tool e uma classe que implementa McpTool. O inputSchema usa tipos Zod para que o SDK valide e documente os parametros automaticamente.
main.ts
Bootstrap do processo. Instancia o servidor, registra as tools e conecta o transporte stdio.
Regra importante: nunca use
console.log— o canalstdoute reservado para o protocolo MCP. Use sempreconsole.errorpara logs.
Rodando localmente
npm install
npm run devScripts
Comando | Descricao |
| Modo desenvolvimento com hot reload (tsx) |
| Compila TypeScript para |
| Executa o servidor compilado |
| Valida tipos sem emitir arquivos |
Como usar este template
1. Copie o repositorio
cp -r mcp-server-template ../meu-novo-mcp
cd ../meu-novo-mcp
npm install2. Compile e execute
npm run build
node build/main.js3. Configure o cliente MCP
Use claude_desktop_config.example.json como base:
{
"mcpServers": {
"meu-novo-mcp": {
"command": "node",
"args": ["/caminho/absoluto/para/meu-novo-mcp/build/main.js"]
}
}
}Como adicionar uma nova tool
1. Crie a classe da tool em src/tools/
// src/tools/MinhaFerramenta.ts
import { z } from "zod";
import { McpTool } from "../core/protocols/McpTool.js";
export class MinhaFerramenta implements McpTool<{ mensagem: string }> {
name = "minha_ferramenta";
description = "Descricao do que esta tool faz.";
inputSchema = {
mensagem: z.string().describe("Texto de entrada"),
};
async execute(input: { mensagem: string }): Promise<string> {
return JSON.stringify({ resultado: input.mensagem.toUpperCase() });
}
}2. Registre em src/main.ts
import { MinhaFerramenta } from "./tools/MinhaFerramenta.js";
registerMcpTools(server, [new HealthTool(), new MinhaFerramenta()]);Dependencias
Pacote | Finalidade |
| SDK oficial para criacao de servidores MCP |
| Validacao e tipagem dos inputs das tools |
| Execucao de TypeScript sem build (dev) |
| Compilador TypeScript |
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- -licenseBquality-maintenanceA boilerplate project for quickly developing Model Context Protocol (MCP) servers using TypeScript SDK. Includes example tools for calculations and greetings, plus system information resources.23
- Flicense-qualityDmaintenanceA boilerplate project for quickly developing Model Context Protocol (MCP) servers using TypeScript SDK, with example implementations of tools (calculator, greetings) and resources (server info) using Zod schema validation.112
- Alicense-qualityDmaintenanceA starter kit for quickly building Model Context Protocol (MCP) servers using the TypeScript SDK. It includes a structured project setup with pre-configured examples for implementing tools, resources, and Zod-based schema validation.270MIT
- Flicense-qualityDmaintenanceA starter project designed to quickly build and deploy Model Context Protocol (MCP) servers using the TypeScript SDK and Zod for schema validation. It features example implementations for tools and resources, providing a solid foundation for custom MCP development and integration.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP (Model Context Protocol) server for Appwrite
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/gustta03/mcp-server-tamplate'
If you have feedback or need assistance with the MCP directory API, please join our Discord server