mcpserver

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(_ any, downloads DownloadManager, logger *slog.Logger) *mcp.Server

New 保留构造参数位置以便嵌入方平滑升级;第一个参数不再被读取,所有 Pixiv 能力必须由 public SDK service 提供。

func NewWithSDK added in v0.2.0

func NewWithSDK(_ any, downloads DownloadManager, logger *slog.Logger, service application.SDKService, request application.SDKClientRequest) *mcp.Server

NewWithSDK 通过公共 SDK 为每个 MCP tool 建立独立 operation snapshot。 首个参数仅是已废弃的兼容占位,绝不构成内容、认证或资源调用链。

func NewWithSDKDownloadFactory added in v0.3.0

func NewWithSDKDownloadFactory(downloads DownloadManager, newDownloads func(application.SDKClient) DownloadManager, logger *slog.Logger, service application.SDKService, request application.SDKClientRequest) *mcp.Server

NewWithSDKDownloadFactory 为生产 MCP 注入 snapshot-scoped 下载器构造器。

Types

type App

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

type DownloadManager

type DownloadManager interface {
	SetDownloadPath(string) error
	Download(context.Context, application.DownloadRequest) ([]download.DownloadedArtwork, error)
}

Jump to

Keyboard shortcuts

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