mermaid-mcp
Click on "Deploy 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., "@mermaid-mcp say hello to Alice"
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 Básico
Servidor Model Context Protocol (MCP) de exemplo, escrito em TypeScript e Node.js, usando o SDK oficial @modelcontextprotocol/sdk.
📖 Nunca usou MCP? Siga o Guia de Uso passo a passo — do zero até usar no Claude Desktop, sem precisar saber programar.
Capacidades
Tipo | Nome | Descrição |
Tool |
| Recebe |
Resource |
|
|
Prompt |
| Recebe |
Related MCP server: FastMCP Demo
Estrutura do projeto
mermaid MCP/
├── src/
│ ├── index.ts # Ponto de entrada: cria o servidor e conecta via stdio
│ ├── tools/
│ │ └── hello.ts # Tool "hello"
│ ├── resources/
│ │ └── info.ts # Resource "info" (resource://info)
│ └── prompts/
│ └── assistant.ts # Prompt "assistant"
├── package.json
├── tsconfig.json
└── README.mdArquitetura
graph TD
Claude["Cliente Claude<br/>(Claude Desktop)"]
Server["MCP Server<br/>(index.ts — stdio / JSON-RPC 2.0)"]
Tools["Tools<br/>(src/tools/)"]
Resources["Resources<br/>(src/resources/)"]
Prompts["Prompts<br/>(src/prompts/)"]
Hello["hello<br/>name → 'Olá, name!'"]
Info["info<br/>resource://info"]
Assistant["assistant<br/>topic → prompt de sistema"]
Claude -- "tools/call" --> Server
Claude -- "resources/read" --> Server
Claude -- "prompts/get" --> Server
Server --> Tools
Server --> Resources
Server --> Prompts
Tools --> Hello
Resources --> Info
Prompts --> Assistant
Hello -. "resposta (content)" .-> Server
Info -. "resposta (contents)" .-> Server
Assistant -. "resposta (messages)" .-> Server
Server -. "resultado JSON-RPC" .-> ClaudeFluxo de uma chamada de Tool
sequenceDiagram
participant Claude as Cliente Claude
participant Server as MCP Server
participant Tool as Tool "hello"
Claude->>Server: initialize
Server-->>Claude: capabilities (tools, resources, prompts)
Claude->>Server: notifications/initialized
Claude->>Server: tools/call { name: "hello", arguments: { name: "Maria" } }
Server->>Tool: valida input (Zod) e executa handler
Tool-->>Server: { content: [{ type: "text", text: "Olá, Maria!" }] }
Server-->>Claude: resposta JSON-RPC com o resultadoRequisitos
Node.js 18 ou superior
Instalação
npm installDesenvolvimento
Executa direto do TypeScript, sem compilar (via tsx):
npm run devBuild e execução
npm run build # compila TypeScript para ./build
npm start # executa node build/index.jsO servidor se comunica por stdio (stdin/stdout com JSON-RPC 2.0). Ele não abre porta HTTP — quem o inicia é o cliente MCP (ex.: Claude Desktop).
Testando manualmente
Com o MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.jsConectando ao Claude Desktop
Compile o projeto:
npm run buildAbra o arquivo de configuração do Claude Desktop:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Adicione o servidor (ajuste o caminho absoluto):
{
"mcpServers": {
"mcp-server-basico": {
"command": "node",
"args": [
"C:\\CAMINHO\\ATE\\O\\PROJETO\\mermaid-mcp\\build\\index.js"
]
}
}
}Reinicie o Claude Desktop. O servidor aparecerá no menu de ferramentas (ícone 🔌 / "Search and tools").
Depois disso você pode pedir, por exemplo: "Use a tool hello com o nome Maria".
Adicionando novas Tools
Crie um arquivo em
src/tools/, exportando uma funçãoregisterXxxTool(server).Dentro dela, chame
server.registerTool(nome, config, handler).Importe e chame a função em
src/index.ts.Rode
npm run builde reinicie o cliente MCP.
Available Tools
1 toolhelloHelloA
Recebe um nome e retorna uma saudação personalizada.
Inputs: name (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no risk of confusion or overlapping purposes.
With a single tool, naming consistency is inherently perfect.
A server named 'mermaid-mcp' with just one trivial greeting tool is an extreme mismatch between scope and tool count.
The tool set is severely incomplete for the implied domain of mermaid diagram generation or manipulation, as it only offers a greeting function.
Related MCP Connectors
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA minimal demonstration server showcasing MCP protocol capabilities including tools, resources, and prompts with basic examples like hello world functionality.MIT
- AlicenseBqualityNot gradedmaintenanceA demonstration TypeScript MCP server that showcases basic MCP concepts with simple tools (greeting, calculator), text resources, and prompt templates for learning the Model Context Protocol.2MIT
- AlicenseNot gradedqualityDmaintenanceA simple demonstration MCP server that provides a basic 'say_hello' tool for greeting users by name, serving as a template for building MCP servers with TypeScript.1ISC
- AlicenseNot gradedqualityDmaintenanceA minimal template MCP server demonstrating basic tools, resources, and prompts functionality. Includes example implementations like a hello tool, history resource, and greet prompt for learning MCP development.ISC