Skip to main content
Glama
mjmorales

simple-mcp-runner

by mjmorales
server_args_test.go1.13 kB
package server import ( "testing" "github.com/mjmorales/simple-mcp-runner/pkg/config" "github.com/mjmorales/simple-mcp-runner/internal/logger" ) func TestConfigCommandWithAllowArgs(t *testing.T) { cfg := &config.Config{ App: "test-server", Transport: "stdio", Commands: []config.Command{ { Name: "echo_test", Description: "Test echo with args", Command: "echo", Args: []string{"base"}, AllowArgs: true, }, { Name: "echo_no_args", Description: "Test echo without args", Command: "echo", Args: []string{"fixed"}, AllowArgs: false, }, }, } // Create server s, err := New(Options{ Config: cfg, Logger: logger.Default(), }) if err != nil { t.Fatalf("failed to create server: %v", err) } // This test verifies that the server properly registers commands // with AllowArgs support. The actual execution would require // running the full MCP server, which is tested in integration tests. if s == nil { t.Error("server should not be nil") } t.Log("Server created successfully with AllowArgs commands") }

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

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