Skip to main content
Glama
joeleesuh

mcp-simple-server

by joeleesuh

MCP Simple Server

A simple Model Context Protocol (MCP) server with three basic tools: echo, add numbers, and get timestamp.

Supports both stdio and HTTP/WebSocket transport modes for flexible deployment options.

Features

  • echo: Echoes back any message you provide

  • add: Adds two numbers together

  • get_timestamp: Returns the current timestamp in ISO 8601 format

  • Dual Mode Support: Run in stdio mode (local) or HTTP/WebSocket mode (remote)

  • HTTP REST API: Health checks and server info endpoints

  • WebSocket Support: Real-time MCP protocol communication

Related MCP server: sentiment-analyzer

Installation

npm install

Building

npm run build

Running the Server

stdio Mode (Default - Local Development)

npm start
# or
MCP_MODE=stdio node dist/index.js

HTTP/WebSocket Mode (Remote Access)

MCP_MODE=http PORT=3000 node dist/index.js

Once running in HTTP mode, access:

  • Health check: http://localhost:3000/health

  • Server info: http://localhost:3000/

  • WebSocket: ws://localhost:3000/

Tools

echo

Echoes back the provided message.

Arguments:

  • message (string, required): The message to echo back

Example:

{
  "message": "Hello, World!"
}

add

Adds two numbers together.

Arguments:

  • a (number, required): The first number

  • b (number, required): The second number

Example:

{
  "a": 5,
  "b": 3
}

get_timestamp

Returns the current timestamp in ISO 8601 format.

Arguments: None

Deployment

AWS EC2 Deployment

Deploy to AWS EC2 with automated setup using AWS CloudShell. See AWS_DEPLOYMENT.md for detailed instructions.

Quick Start:

# From AWS CloudShell
curl -O https://raw.githubusercontent.com/joeleesuh/mcp-simple-server/main/scripts/deploy-to-ec2.sh
chmod +x deploy-to-ec2.sh
./deploy-to-ec2.sh

Includes:

  • Automated EC2 instance provisioning (t3.micro - Free Tier eligible)

  • Auto-install Node.js and dependencies

  • Runs in HTTP mode on port 3000 with WebSocket support

  • Security group configured for port 3000 access

  • Systemd service setup with environment variables

  • AWS Session Manager access (no SSH keys required)

After deployment, access the server at:

  • http://<PUBLIC_IP>:3000/health - Health check

  • http://<PUBLIC_IP>:3000/ - Server info

  • ws://<PUBLIC_IP>:3000/ - WebSocket endpoint

Deployment to smithery.ai

This project is configured for deployment on Smithery.ai with:

  • Dockerfile - Multi-stage Docker build for optimized container image

  • smithery.yaml - Smithery configuration for stdio-based MCP server

  • .dockerignore - Excludes unnecessary files from Docker build

Prerequisites

  1. Create a GitHub repository for this project

  2. Push your code to GitHub (including Dockerfile and smithery.yaml)

  3. Create an account on smithery.ai

  4. (Optional) Test Docker build locally: docker build -t mcp-simple-server .

Steps to Deploy

  1. Push to GitHub (if not already done):

    git add .
    git commit -m "Add Smithery deployment configuration"
    git push
  2. Deploy on smithery.ai:

    • Go to smithery.ai

    • Sign in with your GitHub account

    • Click "New Server" or "Deploy Server"

    • Connect your GitHub repository

    • Select the mcp-simple-server repository

    • Smithery will automatically detect Dockerfile and smithery.yaml

    • Click "Deploy"

  3. Use Your Server:

    • Once deployed, Smithery will provide installation instructions

    • You can install it with: npx @smithery/cli install <your-server-name>

    • Or use it directly in Claude Desktop or other MCP clients

Example Claude Desktop Configuration

After deployment, add this to your Claude Desktop configuration:

{
  "mcpServers": {
    "simple-server": {
      "command": "npx",
      "args": ["-y", "@smithery/mcp-simple-server"]
    }
  }
}

Or if testing locally:

{
  "mcpServers": {
    "simple-server": {
      "command": "node",
      "args": ["C:/Users/User/mcp-simple-server/dist/index.js"]
    }
  }
}

Development

Project Structure

mcp-simple-server/
├── src/
│   └── index.ts              # Main server implementation
├── scripts/
│   ├── deploy-to-ec2.sh      # AWS CloudShell deployment script
│   └── user-data.sh          # EC2 instance initialization script
├── dist/                     # Compiled JavaScript (generated)
├── Dockerfile                # Docker container configuration
├── smithery.yaml             # Smithery deployment configuration
├── .dockerignore             # Docker build exclusions
├── package.json              # Dependencies and scripts
├── tsconfig.json             # TypeScript configuration
├── README.md                # This file
└── AWS_DEPLOYMENT.md        # AWS EC2 deployment guide

Adding New Tools

To add new tools, modify src/index.ts:

  1. Add the tool definition to the TOOLS array

  2. Add a new case in the CallToolRequestSchema handler switch statement

  3. Rebuild the project: npm run build

License

MIT

Available Tools

3 tools
addA

Adds two numbers together

ParametersJSON Schema
NameRequiredDescriptionDefault
aYesThe first number
bYesThe second number

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It accurately describes a pure, side-effect-free operation with no hidden state changes, permissions, or side effects. The behavior is fully captured by the statement 'Adds two numbers together', which is adequate for this trivial function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single six-word sentence that is front-loaded and to the point. Every word earns its place, and there is no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the extreme simplicity of the tool (two numeric parameters, no side effects, no output schema), the description is fully complete. It states the operation, and the return value (the sum) is logically implied. Additional context would be unnecessary and would not improve usability.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage with descriptions for both parameters ('The first number' and 'The second number'). The description reinforces that the operation is addition but adds no additional meaning beyond what the schema already specifies, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Adds two numbers together' uses a specific verb and resource, clearly stating the arithmetic operation. It immediately distinguishes itself from sibling tools like echo and get_timestamp, which serve entirely different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The context is unambiguous: this tool is for adding two numeric values. While no explicit alternatives or exclusion conditions are mentioned, the simplicity and clarity of the purpose make the appropriate usage obvious, and the sibling tools are disjoint in functionality.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

echoA

Echoes back the provided message

ParametersJSON Schema
NameRequiredDescriptionDefault
messageYesThe message to echo back

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of disclosing behavior. 'Echoes back the provided message' completely describes the tool's action and return value, making the behavior fully transparent for a trivial pure function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no filler words. It is front-loaded with the key verb and resource, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one fully-documented parameter and no output schema, the description is complete. 'Echoes back the provided message' fully conveys input and output behavior without needing further elaboration.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the parameter 'message' is already described as 'The message to echo back'. The description's 'provided message' is redundant and adds no additional semantic meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'echoes' with the resource 'provided message', clearly stating what the tool does. It is distinct from siblings 'add' and 'get_timestamp', leaving no ambiguity about its function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention any exclusions or conditions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_timestampA

Returns the current timestamp in ISO 8601 format

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description takes on the full burden and adequately discloses the tool's behavior: it returns a timestamp in a specified format. It does not mention edge cases like timezone or system clock, but for a simple read-only operation, the transparency is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, compact sentence that conveys all necessary information without repetition or filler. It is front-loaded and every word contributes value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's trivial nature (zero parameters, no output schema, no annotations), the description is complete. It fully explains the return value and format, leaving no critical gap in understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the description appropriately omits parameter details. Baseline of 4 is given because there is nothing to explain beyond what the schema already indicates (an empty object).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the current timestamp in ISO 8601 format, using a specific verb ('Returns') and a precise resource. It is distinct from sibling tools like echo and add, leaving no ambiguity about its function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is given on when to use this tool versus alternatives, but the tool's purpose is self-evident and siblings are unrelated. The usage context is implied rather than stated, so it does not fully meet the 'clear context' bar.

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. 3 tool updatesv1.0.0
    • First observedadd
    • First observedecho
    • First observedget_timestamp

TDQS

A4.4/5.0
Disambiguation5/5

Each tool performs a completely distinct function: echo returns input, add computes a sum, and get_timestamp returns time. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tool names are lowercase imperative verbs, with 'get_timestamp' following a verb_noun pattern while 'echo' and 'add' are single verbs. The style is coherent and predictable.

Tool Count5/5

Three tools is an appropriate size for a simple utility server. Each tool serves a clear purpose without unnecessary bloat or redundancy.

Completeness5/5

As a general-purpose simple server, there is no single domain requiring full CRUD coverage. The provided tools cover a reasonable set of basic operations for a lightweight utility.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A simple Model Context Protocol server providing basic utility tools including timezone-aware time retrieval and basic arithmetic calculations (add, subtract, multiply, divide).
    2
    18
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    A minimal MCP server providing basic tools for arithmetic, text echoing, and timezone-aware current time retrieval.
    -

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/joeleesuh/mcp-simple-server'

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