Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/mcptools/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ Available types:
- prompt <name> <description> <template>
- resource <uri> <description> <content>

Example:
Example:
mcp mock tool hello_world "when user says hello world, run this tool"
mcp mock tool hello_world "A greeting tool" \
prompt welcome "A welcome prompt" "Hello {{name}}, welcome to {{location}}!" \
Expand Down Expand Up @@ -1113,7 +1113,7 @@ Example:
}

// Run proxy server
fmt.Println("Starting proxy server...")
fmt.Fprintln(os.Stderr, "Starting proxy server...")
if err := proxy.RunProxyServer(config); err != nil {
log.Fatalf("Error running proxy server: %v", err)
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ func (s *Server) Start() error {
if err := decoder.Decode(&request); err != nil {
if err == io.EOF {
s.log("Client disconnected (EOF)")
} else {
s.log(fmt.Sprintf("Error decoding request: %v", err))
return nil
}
s.log(fmt.Sprintf("Error decoding request: %v", err))
fmt.Fprintf(os.Stderr, "Error decoding request: %v\n", err)
return fmt.Errorf("error decoding request: %w", err)
}
Expand Down Expand Up @@ -568,9 +568,9 @@ func RunProxyServer(toolConfigs map[string]map[string]string) error {
}

// Print registered tools
fmt.Println("Registered proxy tools:")
fmt.Fprintln(os.Stderr, "Registered proxy tools:")
for name, tool := range server.tools {
fmt.Printf("- %s: %s (script: %s)\n", name, tool.Description, tool.ScriptPath)
fmt.Fprintf(os.Stderr, "- %s: %s (script: %s)\n", name, tool.Description, tool.ScriptPath)
paramStr := ""
for i, param := range tool.Parameters {
if i > 0 {
Expand All @@ -579,7 +579,7 @@ func RunProxyServer(toolConfigs map[string]map[string]string) error {
paramStr += param.Name + ":" + param.Type
}
if paramStr != "" {
fmt.Printf(" Parameters: %s\n", paramStr)
fmt.Fprintf(os.Stderr, " Parameters: %s\n", paramStr)
}
}

Expand Down