mcp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package mcp provides an MCP proxy that forwards requests to the Nylas MCP server.

Index

Constants

View Source
const (
	// NylasMCPEndpointUS is the US regional MCP endpoint.
	NylasMCPEndpointUS = "https://mcp.us.nylas.com"
	// NylasMCPEndpointEU is the EU regional MCP endpoint.
	NylasMCPEndpointEU = "https://mcp.eu.nylas.com"
)

Variables

View Source
var DefaultTimeout = domain.TimeoutMCP

DefaultTimeout for HTTP requests - uses centralized domain constant.

Functions

func GetMCPEndpoint

func GetMCPEndpoint(region string) string

GetMCPEndpoint returns the appropriate MCP endpoint for the given region.

Types

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy forwards MCP requests from STDIO to the Nylas MCP server.

func NewProxy

func NewProxy(apiKey, region string) *Proxy

NewProxy creates a new MCP proxy with the given API key and region.

func (*Proxy) Run

func (p *Proxy) Run(ctx context.Context) error

Run starts the proxy, reading from stdin and writing to stdout.

func (*Proxy) SetDefaultGrant

func (p *Proxy) SetDefaultGrant(grantID string)

SetDefaultGrant sets the default grant ID to use for requests. This helps the MCP server know which account to use by default.

func (*Proxy) SetGrantStore

func (p *Proxy) SetGrantStore(store ports.GrantStore)

SetGrantStore sets the grant store for local grant operations. This allows the proxy to respond to grant queries locally without requiring the AI to provide an email address.

Jump to

Keyboard shortcuts

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