Skip to main content
Glama
AnIayana

high-performance-mcp-server

by AnIayana

Hochleistungs-MCP-Server

Ein Hochleistungs-, modularer Model-Context-Protocol-Server (MCP), erstellt mit TypeScript und dem modernen MCP-v2-SDK (@modelcontextprotocol/server). Enthält standardmäßig sichere Sicherheitsprofile, profilbewusste Serveranweisungen, modulare MCP-Prompts, schreibgeschützten Workspace-Zugriff mit Such- und Host-Pfad-Privatsphäre, Streamable HTTP, Stdio-Transport, wiederverwendbare Worker-Thread-Pools, Produktions-LRU-Caching mit Single-Flight-Stampede-Schutz und strukturierte Telemetrie.


Projektstatus: Public Preview (v0.1.0)

[!HINWEIS] Status: 0.1.0 Public Preview. Dieses Paket bietet standardmäßig sichere MCP-Tools, schreibgeschützte Workspace-Inspektion und Hochleistungs-Worker-Ausführung. Erfordert Node.js >= 22.0.0.


Related MCP server: VSCode LSP MCP Server

Funktionen

  • Moderne MCP-v2-Architektur: Nativ auf @modelcontextprotocol/server aufgebaut, mit standardmäßiger JSON-Schema-Validierung (Draft 2020-12) und vollständiger Protokollunterstützung vom 2026-07-28.

  • Dualer Transport-Support: Nahtloser Betrieb über Standard-Eingabe/Ausgabe (stdio) oder modernes Streamable HTTP (node:http + /mcp).

  • Profilbewusste Serveranweisungen: Dynamische Serveranweisungen, die verbundene LLMs über empfohlene Workflows, Tool-Reihenfolge und Sicherheitsgrenzen basierend auf dem aktiven Profil informieren.

  • Modulare MCP-Prompts: Wiederverwendbare Aufgaben-Prompts (explore_workspace, find_and_explain, review_file, trace_symbol), die ausschließlich in den Profilen workspace und all verfügbar sind.

  • Standardmäßig sichere Tool-Profile: Das Standardprofil safe setzt keinerlei Dateisystem- oder Hardware-Inspektion frei. Explizites Opt-in für workspace, diagnostics, benchmark, admin oder all.

  • Schreibgeschützter Workspace & Host-Pfad-Privatsphäre: Sicherer Zugriff auf eine Whitelist von Verzeichnissen mit Schutz vor Pfad-Traversal und Symlink-Escape, logischem Root-Mapping (root-1, root-2), harten 1-MiB-Grenzen und Schutz vor Binärdateien, ohne absolute Host-Pfade gegenüber Clients oder Modellen offenzulegen.

  • Workspace-Suche v1: Schnelle, begrenzte Literalsuche in Dateien und Texten (search_files, search_text) mit Standard-Ignorier-Verzeichnissen, begrenzter Nebenläufigkeit, Koordinaten-Mapping und Client-Abbruch.

  • Worker-Thread-Pool: Auslagerung CPU-intensiver Aufgaben aus der Node.js-Event-Loop mit automatischer Lebenszyklus-Wiederherstellung und Null-Drift-Invarianten.

  • Produktions-LRU-Cache: Speicherbegrenzter Cache mit TTL-Support und Single-Flight-Anfragekoaleszenz zur Vermeidung von Cache-Stampedes.

  • Interne strukturierte Protokollierung: Stdio-sicheres JSON-Logging ausschließlich auf stderr.


Schnellstart

MCP-Client-Konfiguration (Claude Desktop, Cursor usw.)

Fügen Sie Folgendes zu Ihrer MCP-Konfiguration hinzu (z. B. claude_desktop_config.json):

Standard-Sicherheitsprofil (Stdio)

{
  "mcpServers": {
    "high-performance-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "high-performance-mcp-server"
      ]
    }
  }
}

Schreibgeschütztes Workspace-Profil

{
  "mcpServers": {
    "workspace-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "high-performance-mcp-server",
        "--profile=workspace",
        "--root=/path/to/project"
      ]
    }
  }
}

Lokale Entwicklung / Quellcode-Ausführung

# Clone and build
git clone https://github.com/eminyilmz/high-performance-mcp-server.git
cd high-performance-mcp-server
npm install
npm run build

# Run default safe profile
node dist/index.js

# Run workspace profile with allowlisted root
node dist/index.js --profile=workspace --root=.

Standardmäßig sichere Profile

Zum Schutz von Host-Rechnern und zur Verhinderung unbeabsichtigter Ressourcennutzung oder Metadaten-Leaks werden Tools, Ressourcen, Anweisungen und Prompts in Sicherheitsprofile kategorisiert:

Profil

Enthaltene Kategorien

Verfügbare Tools

Prompts

Anwendungsfall

safe (Standard)

safe

echo, ping

(keine)

Keine Host-Inspektion, kein Dateisystemzugriff, keine Mutation. Sicher für öffentliche Nutzung.

workspace

safe, workspace

echo, ping, workspace_roots, list_directory, file_info, read_text_file, search_files, search_text

explore_workspace, find_and_explain, review_file, trace_symbol

Schreibgeschützte Datei- und Verzeichnisinspektion, streng auf --root-Verzeichnisse in der Whitelist beschränkt.

diagnostics

safe, diagnostics

echo, ping, cache_stats, server_metrics, system_stats, worker_pool_stats

(keine)

Prozess- und Systembeobachtbarkeit zur Überwachung von Gesundheit und Event-Loop-Verzögerung.

benchmark

safe, benchmark

echo, ping, cached_prime_count, heavy_compute_main, heavy_compute_worker

(keine)

CPU-intensive Primzahlberechnungs-Benchmarks und Worker-Pool-Tests.

admin

safe, diagnostics, admin

echo, ping, cache_stats, server_metrics, system_stats, worker_pool_stats, reset_cache, reset_metrics

(keine)

Beobachtbarkeit mit administrativer Mutation des Laufzeitzustands (Cache leeren, Metriken zurücksetzen).

all

safe, workspace, diagnostics, benchmark, admin

Alle 17 registrierten Tools

Alle 4 Workspace-Prompts

Vollständiger Tool- und Prompt-Katalog.


Serveranweisungen & Prompts

Profilbewusste Serveranweisungen

Wenn ein MCP-Client eine Verbindung herstellt, liefert der Server präzise, auf das Profil zugeschnittene Anweisungen über das MCP-Protokoll:

  • safe: Weist das Modell an, dass Dateisystem- und Hardware-Inspektion nicht verfügbar sind.

  • workspace: Beschreibt die empfohlene Untersuchungsreihenfolge (workspace_roots -> search_files / search_text -> file_info -> read_text_file), bekräftigt die Schreibschutz-Beschränkungen und betont die Verwendung root-relativer Pfade.

  • diagnostics & benchmark: Führt durch die Interpretation beobachtbarer Metriken und warnt vor unnötigen CPU-intensiven Berechnungsaufrufen.

  • admin: Weist darauf hin, dass Mutationsoperationen nur prozesslokale Caches und Telemetriezustände betreffen.

Modulare MCP-Prompts

Bei Ausführung im Profil workspace oder all stellt der Server modulare Prompts bereit, die strukturierte Workflows für gängige technische Aufgaben bieten:

Prompt

Argumente

Zweck

explore_workspace

rootId (erforderlich), goal (optional)

Führt das Modell durch eine strukturierte Erkundung eines in der Whitelist befindlichen Workspace-Roots mithilfe von Suche und Dateiinspektion.

find_and_explain

rootId (erforderlich), query (erforderlich)

Findet relevanten Code oder relevante Konfiguration mithilfe der Literalsuche und liest definierende Dateien, um eine Erklärung zu erstellen.

review_file

rootId (erforderlich), path (erforderlich), focus (optional)

Formuliert eine strukturierte, schreibgeschützte Überprüfung einer bestimmten Textdatei innerhalb des Workspace.

trace_symbol

rootId (erforderlich), symbol (erforderlich)

Verfolgt Deklarationen, Referenzen und Verwendungsstellen eines Symbols im gesamten Workspace.

[!HINWEIS] Prompt-Argumente werden als begrenzte Aufgabendaten behandelt und maskiert, bevor sie in wiederverwendbare MCP-Prompt-Vorlagen eingefügt werden. Prompts führen keine direkten Dateisystem-E/A-Vorgänge selbst aus; das eigentliche Lesen und Durchsuchen von Dateien erfolgt durch das Modell mithilfe standardmäßiger MCP-Tools und -Ressourcen unter strengen Root-Whitelist-Kontrollen.


Schreibgeschützter Workspace-Zugriff

Der Dateisystemzugriff ist standardmäßig deaktiviert. Um den schreibgeschützten Workspace-Zugriff zu aktivieren, geben Sie explizit --profile=workspace (oder --profile=all) und mindestens ein --root-Verzeichnis in der Whitelist an:

# POSIX / macOS / Linux
npx high-performance-mcp-server --profile=workspace --root=/home/user/my-project

# Windows
npx high-performance-mcp-server --profile=workspace --root="C:\Projects\app"

# Multiple roots
npx high-performance-mcp-server --profile=workspace --root=./packages/core --root=./packages/cli

Sicherheitsgarantien & Einschränkungen

  • Host-Pfad-Privatsphäre: Konfigurierte absolute Dateisystempfade bleiben intern im Server. Das Tool workspace_roots und die Ressource workspace://roots geben logische Root-Identifikatoren zurück (id: "root-1", name: "my-project") statt absoluter Host-Pfade:

    {
      "roots": [
        {
          "id": "root-1",
          "name": "my-project"
        }
      ]
    }
  • Strikte Whitelist: Nur explizit übergebene --root-Verzeichnisse können zugegriffen werden. Maximal 16 eindeutige Roots erlaubt (und maximal 64 Rohpfade vor Deduplizierung).

  • Schreibgeschützt: Keine Dateisystem-Mutationsfunktionen (writeFile, unlink, rm, mkdir, rename usw.) existieren in der Server-Codebasis.

  • Traversal- & Symlink-Schutz: Zielpfade werden mithilfe von fs.realpath kanonisiert und streng darauf geprüft, Root-Grenzen nie zu verlassen.

  • Bereinigte Fehler: Fehlerantworten verweisen nur auf logische Root-IDs, Root-Namen und angeforderte relative Pfade, sodass interne Verzeichnisstrukturen niemals preisgegeben werden.

  • Dateilese-Grenzen: Das Standard-Leselimit für Text beträgt 256 KiB; die harte Obergrenze liegt bei 1 MiB (MAX_TEXT_READ_BYTES).

  • Binärdatei-Erkennung: Dateien mit NUL-Bytes (\0) werden von read_text_file abgelehnt, um Kontextverschmutzung zu verhindern.

  • MCP-Ressourcen: Stellt workspace://roots (statische Liste der Roots) und workspace://file/{rootId}{?path} (dynamischer Textleser) bereit.

Durchsuchen des Workspace

Das Profil workspace bietet begrenzte, schreibgeschützte Suchtools:

  1. search_files:

    • Durchsucht Datei- und Verzeichnisnamen mithilfe von Literal-Substring-Abgleich.

    • Filtert nach Art (file, directory, all), Groß-/Kleinschreibung und Startpfad.

    • Überspringt standardmäßig gängige Build-/Vendor-Verzeichnisse (.git, node_modules, .next, dist, build, target usw.). Übergeben Sie includeIgnored: true, um diese zu durchsuchen.

    • Durchläuft niemals Symlink-/Junction-Verzeichnisse, um Rekursionsschleifen und Ausbrüche zu verhindern.

  2. search_text:

    • Durchsucht UTF-8-Textdateien mithilfe begrenzten Literal-Abgleichs mit fester Nebenläufigkeit (8 Worker).

    • Gibt 1-basierte Zeilen-, Spalten- und gekürzte Vorschauausschnitte (bis zu 300 Zeichen) zurück.

    • Unterstützt Dateierweiterungsfilter (z. B. extensions: [".ts", ".md"] oder extensions: ["ts", "md"]).

    • Überspringt automatisch Binärdateien (NUL-Bytes) und Dateien größer als 1 MiB (MAX_SEARCH_FILE_BYTES).

    • Grenzen: Harte Standardwerte (maxResults: 100 [max. 500], maxFiles: 5000 [max. 50000], timeoutMs: 10000 [max. 30000]).

    • Vollständig abbrechbar über das Client-AbortSignal.


Befehlszeilenschnittstelle (CLI)

Usage:
  high-performance-mcp-server [options]

Options:
  --transport=<stdio|http>   Transport protocol to run (default: stdio)
  --port=<number>            HTTP server port (default: 3000, only for http transport)
  --profile=<profile>        Security tool profile (default: safe)
  --root=<path>              Allowlisted read-only workspace root (repeatable, max 16)
  --list-tools               Display available tools for the active profile and exit
  --help, -h                 Show this help message and exit
  --version, -v              Show version and exit

Beispiele

# Start default safe server on stdio
high-performance-mcp-server

# List tools available under the workspace profile
high-performance-mcp-server --profile=workspace --list-tools

# Run Streamable HTTP transport on port 8080 with workspace profile
high-performance-mcp-server --transport=http --port=8080 --profile=workspace --root=./project

HTTP-Transportdetails

Bei Start mit --transport=http startet der Server einen Streamable-HTTP-Transport mithilfe des in Node.js integrierten node:http:

  • Endpunkt: http://127.0.0.1:<port>/mcp

  • Sicherheit: Der Server bindet streng an 127.0.0.1 und validiert Host- und Origin-Header zum Schutz vor DNS-Rebinding und Cross-Site-Request-Forgery.

  • Warnung: Setzen Sie den HTTP-Transport nicht direkt ungeschützten Netzwerken aus, ohne einen authentifizierenden Reverse-Proxy oder ein Gateway davorzuschalten.


Umgebungsvariablen

Variable

Typ

Standard

Beschreibung

MCP_PROFILE

string

safe

Standardüberschreibung des Toolprofils (safe, workspace, diagnostics, benchmark, admin, all)

PORT

number

3000

Standardüberschreibung des HTTP-Ports (strikte Ganzzahl 1-65535)

MCP_ROOTS_JSON

string

(keine)

JSON-Array der Workspace-Roots (z. B. ["/home/user/project", "/home/user/docs"])

MCP_WORKER_COUNT

number

4

Anzahl der im Pool erzeugten Worker-Threads (1 bis 16)

MCP_CACHE_MAX_ENTRIES

number

256

Maximale Anzahl der Einträge im LRU-Cache (1 bis 10000)

MCP_CACHE_TTL_MS

number

300000

Time-to-Live der LRU-Cache-Einträge in Millisekunden (5 Minuten)


Entwicklung

# Install dependencies
npm install

# Run code generator and TypeScript typecheck
npm run typecheck

# Execute unit, security, search, and modern protocol integration test suites
npm test

# Build production bundle
npm run build

# Validate npm package payload without publishing
npm run pack:check

# Run package payload security & privacy scan
npm run security:package

# Run end-to-end tarball installation smoke test
npm run smoke:package

Architektur

MCP Clients (Claude Desktop, Cursor, Custom SDK Clients)
                       │
       ┌───────────────┴───────────────┐
       ▼                               ▼
  Stdio Transport             Streamable HTTP Transport
(process.stdin / stdout)         (127.0.0.1:3000/mcp)
       │                               │
       └───────────────┬───────────────┘
                       ▼
                McpServer Instance
      (Profile-Aware Server Instructions)
                       │
       ┌───────────────┴───────────────┐
       ▼                               ▼
  Tool & Prompt Profiles       Internal Telemetry
(safe, workspace, diag, ...)    (Metrics & Stderr Logger)
       │                               │
       ├──────► Read-Only Workspace, Search, Resources & Prompts (Allowlisted Roots, Host Privacy)
       │
       ├──────► In-Memory LRU Cache (Single-Flight Stampede Protection)
       │
       └──────► Reusable Worker Thread Pool (CPU Offloading)

Sicherheit

  • Das Standard-Sicherheitsprofil (safe) stellt sicher, dass ohne ausdrückliche Zustimmung keine Dateisystem- oder Hardware-Inspektion offengelegt wird.

  • Der schreibgeschützte Workspace-Zugriff isoliert den Dateizugriff strikt auf die konfigurierten --root-Verzeichnisse, ohne absolute Pfade des Host-Dateisystems preiszugeben.

  • Serveranweisungen und Prompts verstärken sichere Tool-Abläufe und explizite Aufgabenbegrenzungen mit Zeichen-Escaping.

  • Der Stdio-Transport reserviert stdout ausschließlich für JSON-RPC-Nachrichten; alle internen Debug- und Telemetrie-Logs werden an stderr geleitet.

  • Der HTTP-Transport erzwingt eine strikte Validierung von localhost-Origin und Host-Header.

Details finden Sie in SECURITY.md.


Mitwirken & Releases

Beiträge und Feedback sind willkommen! Bitte lesen Sie CONTRIBUTING.md für Details zu Code-Stil, Tool-Entwicklungskonventionen, Testanforderungen und dem Release-Workflow für Maintainer.


Lizenz

Dieses Projekt ist unter der MIT-Lizenz lizenziert.

Available Tools

2 tools
echoEcho ToolA

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 provided, the description carries full responsibility for behavioral disclosure. It accurately states that the tool returns the provided message, which is the only meaningful behavioral trait. No side effects, auth, or rate limits are relevant for this simple operation.

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, front-loaded sentence that contains zero filler. Every word earns its place, and the structure is ideal for such a minimal tool.

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 extreme simplicity—one parameter, no output schema, no annotations—the description fully covers the operation. There is nothing missing that an agent would need to select and invoke this tool correctly.

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 description coverage is 100%, and the 'message' parameter is already fully documented in the schema. The tool description adds no additional semantic value beyond the schema, meeting the baseline for high coverage.

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

Purpose4/5

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

The description uses a specific verb 'Echoes' with a clear object 'the provided message', making the tool's function obvious. It distinguishes from sibling 'ping' by implication (echo vs. connectivity check), but does not explicitly differentiate.

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?

The use case is implied by the simple definition—'if you need to echo a message, use this tool'—but there is no explicit when-to-use guidance or mention of the sibling tool 'ping'. For such a trivial tool, the implication is adequate but not stated.

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

pingPingA

Checks whether the MCP server is responsive

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, and the description does not explicitly mention side effects or whether the operation is read-only. However, the nature of a ping implies a non-destructive check, so it is somewhat transparent.

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 that is easy to understand and directly conveys the purpose.

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

Completeness3/5

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

The description covers the primary purpose but does not specify the return value or output format, which might be ambiguous without a schema. It could be improved by indicating the type of response expected.

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

Parameters5/5

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

There are no parameters, so the schema covers all aspects. No additional parameter explanation is needed.

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's function as a server responsiveness check, distinguishing it from the sibling 'echo' tool which likely echoes input.

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 description implies when to use it (for health checks), and the context of only one sibling ('echo') makes the usage scenario unambiguous, though it does not explicitly state alternatives.

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

TDQS

A3.9/5.0
Disambiguation5/5

The two tools have entirely distinct purposes: echo returns a message, while ping checks server responsiveness. There is no overlap or ambiguity in their functionality.

Naming Consistency5/5

Both tool names are single, lowercase verbs (echo, ping) that clearly describe their actions. The naming style is perfectly consistent and predictable.

Tool Count3/5

With only 2 tools, the server is at the lower boundary of what feels minimal. While each tool serves a purpose, the set is extremely thin for a server named 'high-performance', which typically implies broader functionality.

Completeness2/5

The tool surface is almost nonexistent for a general-purpose server. While echo and ping are fully realized for their narrow functions, there are no operations that would support meaningful workflows, leaving significant gaps in coverage for any real domain.

Maintenance

ActivityMaintained
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
    A
    quality
    D
    maintenance
    A lightweight MCP server that provides 40 tools for TypeScript/JavaScript refactoring and code intelligence, directly mapping to TypeScript's tsserver protocol commands for accurate structural changes and workspace analysis.
    40
    34
    3
    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/AnIayana/high-performance-mcp-server'

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