mcpauthdiag

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package mcpauthdiag builds recovery-oriented MCP authentication reports.

Package mcpauthdiag diagnoses authentication state for configured MCP servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NextAction

type NextAction struct {
	Kind    string `json:"kind"`
	Label   string `json:"label"`
	Command string `json:"command"`
}

NextAction is a concrete command the user or model can run to repair MCP authentication or validate readiness.

type Report

type Report struct {
	mcp.AuthStatusResult
	OAuthProfile string              `json:"oauth_profile,omitempty"`
	OAuthStatus  *oauth.Status       `json:"oauth_status,omitempty"`
	NextActions  []NextAction        `json:"next_actions,omitempty"`
	Refreshed    bool                `json:"refreshed,omitempty"`
	RefreshError string              `json:"refresh_error,omitempty"`
	Cleared      bool                `json:"cleared,omitempty"`
	ClearError   string              `json:"clear_error,omitempty"`
	Logout       *oauth.LogoutResult `json:"logout,omitempty"`
	Token        *oauth.TokenView    `json:"token,omitempty"`
}

Report combines MCP lifecycle health with local OAuth readiness and safe recovery actions.

func Build

func Build(result mcp.AuthStatusResult, configHome string, profileName string, now time.Time) Report

Build returns a recovery-oriented report without mutating local state.

func Clear

func Clear(ctx context.Context, result mcp.AuthStatusResult, configHome string, profileName string, now time.Time) Report

Clear revokes when possible, deletes the saved OAuth token, and returns a fresh diagnostic report.

func Refresh

func Refresh(ctx context.Context, result mcp.AuthStatusResult, configHome string, profileName string, now time.Time) Report

Refresh refreshes the saved OAuth token when possible, then returns a fresh diagnostic report. The token view is redacted.

Jump to

Keyboard shortcuts

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