Skip to main content
Glama

My JavaScript MCP Server

A Model Context Protocol (MCP) server built with JavaScript that provides basic tools and resources.

Features

Tools

  • echo: Echo back any message

  • calculate: Perform basic arithmetic operations (add, subtract, multiply, divide)

  • get_system_info: Get basic system information

Resources

  • package.json: Access to the server's package configuration

Related MCP server: @profullstack/mcp-server

Installation

  1. Make sure you have Node.js installed

  2. Install dependencies:

    npm install

Usage

Running the Server

npm start

Development Mode

npm run dev

Testing with MCP Inspector

You can test your server using the MCP Inspector:

npx @modelcontextprotocol/inspector node server.js

Configuration

This server runs on stdio transport, which means it communicates through standard input/output. This is the most common way to run MCP servers.

Example Usage

Once connected to an MCP client, you can:

  1. Echo a message:

    • Tool: echo

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

  2. Perform calculations:

    • Tool: calculate

    • Parameters: {"operation": "add", "a": 5, "b": 3}

  3. Get system information:

    • Tool: get_system_info

    • Parameters: {}

  4. Read resources:

    • Resource: file://package.json

Extending the Server

To add new tools or resources:

  1. Add tool definitions to the ListToolsRequestSchema handler

  2. Add tool logic to the CallToolRequestSchema handler

  3. Add resource definitions to the ListResourcesRequestSchema handler

  4. Add resource reading logic to the ReadResourceRequestSchema handler

Error Handling

The server includes proper error handling for:

  • Division by zero in calculations

  • Unknown tools and resources

  • File reading errors

  • Graceful shutdown on SIGINT

Available Tools

3 tools
calculateC

Perform basic arithmetic calculations

Inputs: operation (required), a (required), b (required).

echoB

Echo back the input message

Inputs: message (required).

get_system_infoC

Get basic system information

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: calculate handles arithmetic, echo returns input, and get_system_info retrieves system data. An agent can easily differentiate between these three unrelated functions.

    Naming Consistency4/5

    The naming is mostly consistent with a verb-based pattern (calculate, echo, get_system_info), though 'echo' is less descriptive than the others. There are no mixed conventions, making the set readable and predictable.

    Tool Count3/5

    With only 3 tools, the server feels thin for a general utility purpose like 'mcp-flyin', which might imply broader functionality. While each tool is distinct, the count is borderline low for typical server scopes.

    Completeness2/5

    The toolset is severely incomplete for a utility server, lacking common operations like file handling, data transformation, or network requests. It covers only basic arithmetic, echoing, and system info, leaving significant gaps for agent workflows.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A simple MCP server implementation that demonstrates streaming capabilities with tools for greetings and notifications, accessible through an interactive command-line client.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An implementation of the Model Context Protocol (MCP) server that enables multiple clients to connect simultaneously and handles basic context management and messaging with an extendable architecture.
      MIT