Skip to main content
Glama
MCP Server Scaffold

MCP Server Scaffold

by vjouenne76

MCP Server Scaffold

A basic scaffolding project for building Model Context Protocol (MCP) servers.

What is MCP?

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). MCP enables secure, controlled interactions between AI systems and various data sources and tools.

Related MCP server: MCP Template

Features

This scaffold provides:

  • ✅ Basic MCP server implementation

  • ✅ Sample tools (echo, get_current_time)

  • ✅ TypeScript support with proper types

  • ✅ Error handling and logging

  • ✅ Standard MCP protocol compliance

  • ✅ Development and build scripts

Setup

  1. Install dependencies:

    npm install
  2. Build the project:

    npm run build
  3. Start the server:

    npm start

Development

For development with auto-rebuild and restart:

npm run dev

Available Tools

echo

Echoes back the provided message.

Parameters:

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

get_current_time

Returns the current date and time in ISO format.

Parameters: None

Project Structure

mcp-server-scaffold/
├── src/
│   └── index.ts          # Main server implementation
├── dist/                 # Compiled JavaScript (generated)
├── package.json          # Project configuration
├── tsconfig.json         # TypeScript configuration
└── README.md            # This file

Extending the Server

To add new tools:

  1. Add the tool definition in the ListToolsRequestSchema handler

  2. Add the tool implementation in the CallToolRequestSchema handler

  3. Rebuild and test

Example tool addition:

// In ListToolsRequestSchema handler
{
  name: 'my_new_tool',
  description: 'Description of what the tool does',
  inputSchema: {
    type: 'object',
    properties: {
      param1: {
        type: 'string',
        description: 'Description of parameter',
      },
    },
    required: ['param1'],
  },
}

// In CallToolRequestSchema handler
case 'my_new_tool':
  // Your tool implementation here
  return {
    content: [
      {
        type: 'text',
        text: `Result: ${args.param1}`,
      },
    ],
  };

Integration with Q CLI

To use this MCP server with Amazon Q CLI:

  1. Build and ensure the server runs correctly

  2. Configure the server in your Q CLI MCP settings

  3. The tools will be available as mcp-server-scaffold___tool-name

Error Handling

The server includes comprehensive error handling:

  • Tool execution errors are caught and returned as error responses

  • Server errors are logged to stderr

  • Graceful shutdown on SIGINT

License

MIT License - feel free to use this scaffold as a starting point for your own MCP servers.

Available Tools

2 tools
echoB

Echo back the provided message

Inputs: message (required).

get_current_timeB

Get the current date and time

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.2/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have completely distinct purposes: 'echo' handles message repetition while 'get_current_time' provides temporal information. There is no overlap in functionality, making it impossible to confuse them.

    Naming Consistency3/5

    The naming is mixed: 'echo' uses a simple verb form while 'get_current_time' follows a verb_noun pattern. Although both are readable, they lack a consistent convention, which could lead to unpredictability if more tools were added.

    Tool Count2/5

    With only 2 tools, this server feels thin for a 'scaffold' purpose, which typically implies a foundation for building more functionality. The count is too low to demonstrate meaningful coherence or coverage for most domains.

    Completeness3/5

    Given the vague 'scaffold' domain, it's hard to assess completeness, but the tools cover basic utility operations (echo and time). However, there are obvious gaps for a scaffold, such as file manipulation or configuration tools, limiting its usefulness as a foundation.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      D
      quality
      D
      maintenance
      A ready-to-use starter implementation of the Model Context Protocol (MCP) server that enables applications to provide standardized context for LLMs with sample resources, tools, and prompts.
      2
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A template repository for building Model Context Protocol (MCP) servers that enable LLM clients to interact with custom tools and services through standardized JSON-RPC communication.
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A starter project designed to quickly build and deploy Model Context Protocol (MCP) servers using the TypeScript SDK and Zod for schema validation. It features example implementations for tools and resources, providing a solid foundation for custom MCP development and integration.
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      A starter project designed to help developers quickly build and deploy Model Context Protocol servers using TypeScript and the official SDK. It includes example implementations of tools and resources, such as a calculator and greeting function, to provide a functional foundation for custom MCP development.
      ISC