mcp-server-base-nodejs
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-base-nodejswhat's the current UTC time?"
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-base-nodejs
Base de servidor MCP em TypeScript com a DX do FastMCP: você escreve um método de classe normal, com tipos normais e JSDoc, e ele vira uma tool com JSON Schema, outputSchema e validação — sem escrever schema à mão.
export class ClockService {
/**
* Retorna a hora atual do servidor em UTC.
*
* Use quando precisar do instante presente para datar um registro,
* calcular um intervalo ou resolver expressões como "hoje" e "agora".
*/
public async now(): Promise<IUtcNow> {
const date = new Date();
return { iso: date.toISOString(), epochMillis: date.getTime(), timeZone: "UTC" };
}
}O JSDoc do método vira a description da tool. O tipo do parâmetro vira o input schema. O tipo de retorno vira o outputSchema. Nada é duplicado.
Como funciona
Tipos TypeScript são apagados no build e JSDoc não existe em runtime, então a extração acontece em tempo de compilação, via o transform do typia rodando dentro do ttsc (drop-in do tsc).
src/tools/ClockService.ts → typia.llm.controller<ClockService>() → createMcpServer()
classe + JSDoc schemas gerados no build servidor MCPO @typia/mcp também valida os argumentos de cada chamada e, quando o modelo erra, devolve o erro de validação em formato que ele consegue corrigir sozinho.
Related MCP server: TypeSpec MCP Server
Requisitos
Node.js >= 20
Go instalado (o transform nativo do typia é compilado uma vez e fica em cache)
Uso
npm install
npm run build # ttsc
npm start # node dist/index.js (stdio)Durante o desenvolvimento:
npm run dev # ttsx src/index.ts
npm run typecheck # ttsc --project tsconfig.test.json
npm test # smoke test das tools
npm run inspect # MCP Inspector apontando para o build⚠️
tsc,ts-nodeetsxnão aplicam o transform. Use semprettsc/ttsx. Se o servidor subir e as tools vierem vazias, quase sempre é isso.
Registrando no cliente
{
"mcpServers": {
"base": {
"command": "node",
"args": ["/caminho/absoluto/mcp-server-base-nodejs/dist/index.js"]
}
}
}Adicionando uma tool
Crie um método público na classe de serviço (ou uma nova classe em
src/tools/).Documente com JSDoc — a primeira frase é o resumo que o modelo lê.
Tipe entrada e saída. Restrições viram schema:
import { tags } from "typia";
/** Converte um instante UTC para outro fuso horário. */
public async convert(props: {
/** Instante de origem, em ISO 8601. */
iso: string & tags.Format<"date-time">;
/** Fuso de destino, no formato IANA. Ex.: `America/Sao_Paulo`. */
timeZone: string & tags.MinLength<1>;
}): Promise<{ iso: string; timeZone: string }> {
// ...
}tags.Format<"date-time"> vira "format": "date-time", tags.MinLength<1> vira "minLength": 1, união de literais vira enum. Métodos recebem um único objeto de parâmetros.
Para uma nova classe, registre em src/server.ts.
Testes
npm test sobe o servidor via InMemoryTransport, lista as tools e verifica que a descrição veio do JSDoc e o outputSchema veio do tipo de retorno.
Isso existe por causa de um modo de falha específico: quando o build pula o ttsc, nada quebra — o servidor sobe normalmente, só que sem tool alguma. Uma compilação verde não pega isso; o teste pega.
Estrutura
src/
├── index.ts # entrypoint, conecta no transporte stdio
├── server.ts # monta o McpServer a partir das classes de tools
└── tools/
└── ClockService.ts # exemplo: hora atual em UTC
test/
└── tools.test.ts # prova que a inferência aconteceuTrade-offs
Vale saber antes de adotar em produção:
Depende do toolchain. Qualquer caminho de build que pule o
ttsc(SWC, Babel,nest build, bundler sem@ttsc/unplugin) gera um servidor sem schemas. É o atrito principal em monorepo.Sem decorator em função solta. Decorators só alcançam classe e método, por isso a classe funciona como namespace de tools.
Alternativa sem transform: Zod/Standard Schema no SDK oficial, com
.describe()no lugar do JSDoc. Inverte a direção — o schema vira a fonte da verdade e o tipo é inferido dele. Menos ergonômico, zero build mágico.
Licença
MIT
Available Tools
1 toolnowA
Retorna a hora atual do servidor em UTC.
Use quando precisar do instante presente para datar um registro, calcular um intervalo ou resolver expressões relativas como "hoje" e "agora". O valor não depende do fuso horário do cliente.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| iso | Yes | Data e hora em ISO 8601, sempre com sufixo `Z`. |
| timeZone | Yes | Fuso horário da resposta. Sempre `UTC`. |
| epochMillis | Yes | Milissegundos decorridos desde a época Unix (1970-01-01T00:00:00Z). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of disclosing behavior. It transparently states that the value is the server time in UTC and does not depend on the client's timezone, which is the key behavioral trait.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, each earning its place: what it returns, when to use it, and a key behavioral guarantee. The main result is front-loaded and there is no redundant text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is trivially simple, has no parameters, and has an output schema. The description covers purpose, use cases, and timezone behavior, leaving no meaningful gap for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. No parameter documentation is needed, and the description sensibly avoids inventing any.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Retorna'), resource ('hora atual do servidor'), and format ('em UTC'), making the tool's function unambiguous. There are no sibling tools, and the description clearly distinguishes server time from client-local time.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides explicit use cases: dating a record, calculating an interval, and resolving relative expressions like 'hoje' and 'agora'. Since there are no sibling tools, no alternative routing is needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v0.1.0- First observed
now
TDQS
There is only one tool, so there is no possibility of confusion or overlap with other tools. Its purpose is clearly described as returning the current UTC time.
The name 'now' is simple and matches its function, but it does not follow the typical verb_noun pattern seen in many MCP servers. With only one tool, there is no inconsistency, but the naming is a slight deviation from standard conventions.
A single tool that simply returns the current time is extremely thin for an MCP server. This falls into the 'single trivial tool' category, representing an extreme mismatch in scope.
The tool description mentions use cases like datestamping records, calculating intervals, and resolving relative expressions, but the server only provides a raw timestamp. There are no companion tools for calculations or conversions, making the surface severely incomplete for the implied domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
- typeshipOAuthdev.typeship
Generate a typed SDK, CLI, and MCP server from any OpenAPI or GraphQL spec, and keep them current.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAutomatically generates MCP tools, CLI, and web UI from TypeScript methods, enabling AI agents and chat clients to interact with custom capabilities defined once.12098MIT
- AlicenseNot gradedqualityDmaintenanceEnables building MCP servers using TypeSpec, with tools for learning, scaffolding projects, and compiling TypeSpec to generate server assets.31,8479MIT
- AlicenseNot gradedqualityCmaintenanceSimplifies creating MCP servers in TypeScript with an Express-like API and experimental decorators, enabling quick definition of tools, resources, and prompts.26196MIT
- AlicenseNot gradedqualityBmaintenanceTurn your typed TypeScript functions into an MCP server — tool, resource, and prompt schemas inferred from your types and JSDoc. No schema library, no decorators, no boilerplate.27MIT
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/mxrsoon/mcp-server-base-nodejs'
If you have feedback or need assistance with the MCP directory API, please join our Discord server