Skip to content

feat(mcp): Add TCP transport #126

@Snider

Description

@Snider

Parent: #118

Complexity: Low - Similar to socket but simpler

Task

Add TCP transport for network MCP connections.

Implementation

// pkg/mcp/transport_tcp.go

type TCPTransport struct {
    addr     string
    listener net.Listener
}

func NewTCPTransport(addr string) (*TCPTransport, error) {
    listener, err := net.Listen("tcp", addr)
    if err != nil {
        return nil, err
    }
    return &TCPTransport{addr: addr, listener: listener}, nil
}

Configuration

  • Default: 127.0.0.1:9100 (localhost only)
  • Configurable via MCP_ADDR env var
  • Consider TLS for non-localhost

Security Considerations

  • Default to localhost binding
  • Warn if binding to 0.0.0.0
  • Future: mTLS support

Acceptance Criteria

  • TCP listener with configurable address
  • Localhost-only by default
  • Multiple concurrent connections
  • Graceful shutdown

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity:smallLess than 2 hoursenhancementNew feature or requestgeminiSimple tasks suitable for Gemini batch processinggoPull requests that update go codegood first issueGood for newcomersjulesFor Jules AI to work onlang:goGo/Golang

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions