go-ai/mcp/transport_stdio.go
Snider dfe474a239
Some checks failed
Security Scan / security (push) Successful in 9s
Test / test (push) Failing after 3m8s
refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 12:35:42 +00:00

15 lines
399 B
Go

package mcp
import (
"context"
"forge.lthn.ai/core/go-log"
"github.com/modelcontextprotocol/go-sdk/mcp"
)
// ServeStdio starts the MCP server over stdin/stdout.
// This is the default transport for CLI integrations.
func (s *Service) ServeStdio(ctx context.Context) error {
s.logger.Info("MCP Stdio server starting", "user", log.Username())
return s.server.Run(ctx, &mcp.StdioTransport{})
}