mlc_mcptester

module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: MIT

README

MCP-Tester

Ein Command-Line Tool zum Testen, Debuggen und Validieren von Model Context Protocol (MCP) Servern nach der Spezifikation vom 2025-03-26.

English Version

Kern-Features

  • Multi-Transport: Unterstützt lokale Prozesse (stdio) und Remote-Server (sse).
  • Full Spec Support: Testet Tools, Resources (statisch & Templates), Subscriptions sowie Prompts.
  • Pagination Support: Unterstützt das Durchblättern langer Listen (list) mittels Cursor.
  • Scripting Engine: Automatisierte Test-Abläufe mit Variablen, Typ-Konvertierung und Assertions.
  • Server Inspector: Analysiert Server auf Best Practices und gibt einen Quality-Score aus.
  • Raw Mode: Umgeht SDK-Validierungen für tiefgreifendes Debugging.
  • Profile: Einfache Verwaltung verschiedener Server in einer mcp-tester.yml.

Der "Everything" Test-Server

Im Projekt ist ein Referenz-Server (cmd/test-server) enthalten, der alle Möglichkeiten des MCP-Protokolls ausschöpft (Tools, Resources, Prompts, Logging, Progress, Output-Schemata).


Benutzung

1. Installation

Über Go (Direkt von GitHub):

go install github.com/hmsoft0815/mlc_mcptester/cmd/mcp-tester@latest

Hinweis: Stellt sicher, dass $GOPATH/bin (meist ~/go/bin) in eurem PATH liegt.

Erste Schritte: Nach der Installation könnt ihr euren ersten Server hinzufügen und sofort testen:

# Server-Profil hinzufügen
mcp-tester profile add my-server -c "npx -y @modelcontextprotocol/server-everything"

# Verfügbare Tools auflisten
mcp-tester tools list -p my-server

Über Curl (Linux/macOS):

curl -sSL https://raw.githubusercontent.com/hmsoft0815/mlc_mcptester/main/scripts/install.sh | bash

Manueller Build:

task all            # Baut den Tester und Referenz-Server in den bin/ Ordner
2. Kommandos (Auszug)
Profilverwaltung

Verwaltet verschiedene Server-Konfigurationen direkt über die CLI:

mcp-tester profile add my-server -c "npx -y @modelcontextprotocol/server-everything"
mcp-tester profile list
mcp-tester profile disable my-server
mcp-tester profile delete my-server
Server Inspektion

Analysiere einen Server auf Qualität (Metadaten, Prompts, Struktur):

# Mit Profil aus mcp-tester.yml
mcp-tester inspect --profile local

# Direktaufruf ohne Konfigurationsdatei
mcp-tester inspect -c "npx -y @modelcontextprotocol/server-everything"
Tools, Resources & Prompts
mcp-tester tools list -p local
mcp-tester resources list --cursor "NEXT_TOKEN" -p local
mcp-tester prompts get code_review --args '{"file_path": "main.go"}' -p local
Test-Skripte (Automatisierung)

Führe komplexe Test-Szenarien aus:

./bin/mcp-tester test --script tests/03_variables_and_math.mcp --profile local

Dokumentation


Lizenz


Copyright Michael Lechner - 2026-03-09

Directories

Path Synopsis
cmd
mcp-tester command
Package main is the entry point for the mcp-tester CLI.
Package main is the entry point for the mcp-tester CLI.
test-server command
internal
scripting
Package scripting provides a simple script runner for testing MCP tools.
Package scripting provides a simple script runner for testing MCP tools.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL