Skip to main content
Glama
MCP Enhanced Server

MCP Enhanced Server

by 21967201

MCP Enhanced Server v2.0.0

Enhanced MCP (Model Context Protocol) Server with full 2025-03-26 specification support:

  • Tools - With annotations, outputSchema, structuredContent, resource_link

  • Resources - URI-identified data with subscriptions and list change notifications

  • Prompts - Templated messages and workflows with argument schemas

  • Elicitation - Server-initiated user input requests

  • Tasks - Async long-running operations with progress tracking

  • Streamable HTTP - Production-ready HTTP transport with session management

  • Auth - Bearer token authentication for remote deployments

  • Origin Validation - DNS rebinding attack prevention

Quick Start

npm install
npm run build
npm start

Related MCP server: maic-server-fs-mcp

Transport Modes

Stdio (default)

npm start

Streamable HTTP

MCP_TRANSPORT=http MCP_PORT=3000 npm start

Streamable HTTP with Auth

MCP_TRANSPORT=http MCP_PORT=3000 MCP_AUTH_TOKEN=your-secret-token npm start

Features

Resources

Resource

URI

Description

Server Info

mcp://server/info

Server name, version, features

Config Info

mcp://server/config

Transport, auth, environment

Project Files

file:///{path}

Template-based file access

Prompts

Prompt

Description

Arguments

code_review

Review code quality

code, language

explain_code

Explain code behavior

code, detail_level

generate_tests

Generate unit tests

code, framework

debug_error

Debug code errors

code, error

Tools

Tool

readOnly

destructive

idempotent

Description

read_file

✓

✗

✓

Read file contents

write_file

✗

✓

✓

Write file (overwrites)

list_directory

✓

✗

✓

List directory contents

delete_file

✗

✓

✗

Delete a file

search_code

✓

✗

✓

Regex search in code

run_command

✗

✓

✗

Execute shell command

confirm_action

✓

✗

✓

Request user confirmation

request_input

✓

✗

✓

Request user input

task_status

✓

✗

✓

Get async task status

task_cancel

✗

✓

✓

Cancel a running task

task_list

✓

✗

✓

List all tasks

batch_process

✗

✗

✗

Start batch processing

get_weather

✓

✗

✓

Weather data (structured output)

system_info

✓

✗

✓

System information (structured output)

list_available_resources

✓

✗

✓

List resources as resource links

Environment Variables

Variable

Default

Description

MCP_TRANSPORT

stdio

Transport: stdio or http

MCP_PORT

3000

HTTP port

MCP_HOST

127.0.0.1

HTTP host

MCP_AUTH_TOKEN

-

Bearer token for auth (optional)

Cloudflare Workers Deployment

Live deployment: https://mcp-enhanced-server.catnip-haze.workers.dev

  • Health: GET /health

  • MCP endpoint: POST /mcp (JSON-RPC 2.0)

  • MCP info: GET /mcp

See cloudflare/ directory for Workers deployment with D1 database.

cd cloudflare
npm install
wrangler d1 create mcp-enhanced-tasks
# Update database_id in wrangler.toml
wrangler d1 execute mcp-enhanced-tasks --file=src/schema.sql
wrangler deploy

Workers Environment Variables

Set via Cloudflare Dashboard or wrangler secret put:

  • MCP_AUTH_TOKEN - Authentication token

  • MCP_ALLOWED_ORIGINS - Comma-separated allowed origins

Architecture

src/
├── index.ts              # Main entry, server setup, all features
├── tools/
│   ├── annotations.ts    # Tool Annotation type definitions
│   └── registry.ts       # Tool registry with Zod validation
├── resources/
│   ├── manager.ts        # Resource lifecycle manager
│   └── tools.ts          # Resource tools
├── prompts/
│   ├── manager.ts        # Prompt lifecycle manager
│   └── builtin.ts        # Built-in prompt templates
├── elicitation/
│   ├── manager.ts        # Elicitation request/response manager
│   └── tools.ts          # Elicitation tools
└── tasks/
    ├── manager.ts        # Async task lifecycle manager
    └── tools.ts          # Task tools

Debug

npx @modelcontextprotocol/inspector node dist/index.js

Available Tools

15 tools
batch_processB

Start a batch processing task. Returns a task ID for polling.

Inputs: items (required), operation (required).

confirm_actionA
Read-onlyIdempotent

Request user confirmation before a destructive or important action.

Inputs: action (required), details, riskLevel.

delete_fileA
Destructive

Delete a file from the local filesystem. DESTRUCTIVE and NON-IDEMPOTENT.

Inputs: path (required).

get_weatherA
Read-onlyIdempotent

Get current weather data for a location

Inputs: location (required). Returns: humidity, conditions, temperature

list_available_resourcesA
Read-onlyIdempotent

List all available MCP resources as resource links

Inputs: no named parameters.

list_directoryA
Read-onlyIdempotent

List the contents of a directory

Inputs: path (required).

read_fileA
Read-onlyIdempotent

Read the contents of a file from the local filesystem

Inputs: path (required), encoding.

request_inputA
Read-onlyIdempotent

Request additional input from the user during tool execution.

Inputs: prompt (required), inputType (required), choices.

run_commandB
Destructive

Execute a shell command. DESTRUCTIVE operation with side effects.

Inputs: command (required), cwd, timeout.

search_codeB
Read-onlyIdempotent

Search for a pattern in code files using regex

Inputs: pattern (required), directory (required), maxResults, filePattern.

system_infoB
Read-onlyIdempotent

Get system information

Inputs: no named parameters. Returns: uptime, platform, nodeVersion, serverVersion

task_cancelA
DestructiveIdempotent

Cancel a running async task

Inputs: taskId (required).

task_listA
Read-onlyIdempotent

List all tasks and their statuses

Inputs: no named parameters.

task_statusB
Read-onlyIdempotent

Get the status of an async task

Inputs: taskId (required).

write_fileA
DestructiveIdempotent

Write content to a file on the local filesystem. DESTRUCTIVE - overwrites existing files.

Inputs: path (required), content (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 15 tools

    Disambiguation4/5

    Each tool has a clearly distinct purpose, but the presence of get_weather and system_info alongside file and task management tools creates ambiguity about the server's core domain, potentially confusing an agent.

    Naming Consistency3/5

    Most tools use a verb_noun pattern (e.g., read_file, list_directory), but several tools like task_status and system_info use noun_noun, breaking the pattern. The mix is readable but inconsistent.

    Tool Count3/5

    15 tools is a reasonable count, but the inclusion of get_weather and system_info seems extraneous for the implied focus on file and task management, making the set feel slightly over-scoped.

    Completeness2/5

    File operations lack create directory, move, and copy; task management lacks a create_task tool (tasks are only created via batch_process). These gaps could cause agent failures in common workflows.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides LLMs with local filesystem operations (read/write files, list directories) and command execution via MCP, enabling file management and task automation within AI clients.
      7
      4 npm
      ISC
    • A
      license
      C
      quality
      C
      maintenance
      A full-featured secure MCP server for local file system operations, with built-in image processing, OCR and media tools. Fully compliant with the official Model Context Protocol specification, offering standardized request/response schemas, large-file streaming I/O, multi-transport remote deployment, and comprehensive text search & replace functionality for LLM agent integration.
      22
      17 PyPI
      Apache 2.0