Skip to main content
Glama

Simple MCP

A simple TypeScript library for creating MCP (Model Context Protocol) servers.

Features

  • Simple API: Create MCP servers with minimal code

  • Type Safety: Full TypeScript integration

  • Parameter Validation: Built-in validation with Zod

  • MCP Compatible: Fully implements the Model Context Protocol

Related MCP server: easy-mcp

Installation

npm install simple-mcp

Quickstart

import { McpServer } from 'simple-mcp';
import { z } from 'zod';

// Create a server instance
const server = new McpServer({ name: 'my-server' });

// Register the tool with the server
server.tool({
  name: 'greet',
  parameters: {
    name: z.string().describe('Person\'s name')
  },
  execute: async ({ name }) => {
    return {
      content: [
        {
          type: 'text',
          text: `Hello, ${name}! Nice to meet you.`
        }
      ]
    };
  }
});

// Start the server
server.start({ transportType: 'stdio' });

Class-based Implementation

You can also implement MCP tools using classes:

import { McpServer, type McpTool } from 'simple-mcp';
import { z, ZodObject } from 'zod';

const parameters = {
  name: z.string().describe('The name is required'),
};

class GreetTool implements McpTool<typeof parameters> {
  public readonly name = 'greet';
  public readonly parameters = parameters;

  public async execute({ name }: z.infer<ZodObject<typeof this.parameters>>) {
    return {
      content: [
        {
          type: 'text',
          text: `Hello, ${name}! Nice to meet you.`,
        },
      ],
    };
  }
}

// Initialize a new MCP server with the name 'greet-server'
const server = new McpServer({ name: 'greet-server' });

// Create an instance of the GreetTool class
const greetTool = new GreetTool();

// Register the tool with the server
server.tool(greetTool);

// Start the server using stdio as the transport method
server.start({ transportType: 'stdio' });

Examples

Check out the examples directory for more complete examples:

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

MIT

Available Tools

1 tool
greetD
ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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. 1 tool update
    • First observedgreet

TDQS

D1.7/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'greet' stands alone without any competing or confusing alternatives.

Naming Consistency5/5

A single tool inherently exhibits perfect naming consistency as there are no other tools to compare against. The name 'greet' follows a simple verb pattern, and with no other tools, there is no inconsistency.

Tool Count2/5

One tool is generally too few for a server's purpose unless it is extremely narrow, but without a description for 'greet', the scope is unclear. Typically, servers with a single tool feel thin and may not justify a full MCP server, suggesting a mismatch unless the domain is trivial.

Completeness1/5

With only one tool and no description provided, it is impossible to assess coverage of any domain. The tool surface is severely incomplete as there are no details to infer a purpose or evaluate missing operations, leading to dead ends for agents.

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
    Not graded
    quality
    D
    maintenance
    A TypeScript wrapper library for the Model Context Protocol SDK that provides a simplified interface for creating MCP servers with tools, resources, and prompts without needing to work directly with the protocol.
    23
    AGPL 3.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Simplifies creating MCP servers in TypeScript with an Express-like API and experimental decorators, enabling quick definition of tools, resources, and prompts.
    26
    196
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A lightweight SDK for building Model Context Protocol (MCP) servers with zero-config setup, automatic TypeScript type inference, and Zod runtime validation.
    12
    3
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Turn your typed TypeScript functions into an MCP server — tool, resource, and prompt schemas inferred from your types and JSDoc. No schema library, no decorators, no boilerplate.
    27
    MIT

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

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