Example MCP Server
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., "@Example MCP Serversay hello to John"
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.
Example MCP Server
A simple Model Context Protocol (MCP) server built with TypeScript and Node.js. This server demonstrates how to create an MCP server that exposes tools for use in Claude Desktop and other MCP clients.
Features
Simple
say_hellotool that greets a person by nameBuilt with TypeScript for type safety
Uses the official MCP SDK for Node.js
STDIO transport for communication with MCP clients
Related MCP server: HelloWorld MCP Server
Prerequisites
Node.js (v16 or higher)
npm
Installation
Install the project dependencies:
npm installBuilding
Build the TypeScript source code:
npm run buildThis will compile the TypeScript files from src/ to build/ and make the output executable.
Running the Inspector
After building, you can test your server using the MCP Inspector:
npm run inspectorOr run it directly:
npx @modelcontextprotocol/inspector@latest node build/index.jsThe inspector provides a web-based interface where you can test your MCP tools interactively.
Development
For development with auto-reload, use:
npm run devImportant: When developing MCP servers that use STDIO transport, always use console.error() for logging, never console.log(). Writing to stdout will corrupt the JSON-RPC messages and break your server.
Project Structure
example-mcp-server/
├── src/
│ └── index.ts # Main server implementation
├── build/ # Compiled output (generated)
├── package.json
├── tsconfig.json
└── README.mdAdditional Resources
MCP Server Setup Gist - Additional information and walkthrough for setting up MCP STDIO servers, including project setup, configuration, and Claude Desktop integration
Official MCP Documentation - The official documentation for building MCP servers (Note: this documentation may not be up to date)
Claude Desktop Integration
To use this server with Claude Desktop, add it to your claude_desktop_config.json:
{
"mcpServers": {
"example_server": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/THIS/PROJECT/build/index.js"]
}
}
}Note: Use the absolute path to the built index.js file. After making changes, fully quit and restart Claude Desktop for the configuration to take effect.
This server cannot be installed
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 Servers
- AlicenseDqualityDmaintenanceA minimal Model Context Protocol server in TypeScript that demonstrates MCP-compliant resources and tools for LLMs, featuring simple resources and a basic tool that echoes messages or returns greetings.Last updated15Apache 2.0
- AlicenseBqualityDmaintenanceA simple TypeScript MCP server that provides two tools: one for greeting users with a customizable name and another for adding two numbers together.Last updated230MIT
- FlicenseDqualityDmaintenanceA sample MCP server implementation in TypeScript that demonstrates tool creation with a mock AI completion endpoint. Provides a basic example for developers to learn MCP server development patterns and tool registration.Last updated1
- FlicenseBqualityDmaintenanceA 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.Last updated2
Related MCP Connectors
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
Kickstart development with a customizable TypeScript template featuring sample tools for greeting,…
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/jherr/saw-mcp-intro'
If you have feedback or need assistance with the MCP directory API, please join our Discord server