mcpserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(api PixivAPI, downloads DownloadManager, logger *slog.Logger) *mcp.Server

func NewWithSDK added in v0.2.0

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

NewWithSDK 在保留旧 Source 工具的同时,为新增领域工具注入公共 SDK 接缝。 SDKService 会在每次 MCP tool 调用时建立独立的配置/认证 operation snapshot。

Types

type App

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

type DownloadManager

type DownloadManager interface {
	SetDownloadPath(string) error
	Enqueue(context.Context, []int64) int
	Download(context.Context, []int64) ([]download.DownloadedArtwork, error)
}

type PixivAPI

type PixivAPI interface {
	Refresh(context.Context) error
	SetRefreshToken(string)
	RefreshTokenValue() string
	UserID() int64
	UserName() string
	IsAuthenticated() bool
	SearchIllust(context.Context, string, string, string, string, int) (*pixiv.IllustList, error)
	IllustDetail(context.Context, int64) (*pixiv.IllustDetail, error)
	IllustRelated(context.Context, int64, int) (*pixiv.IllustList, error)
	IllustRanking(context.Context, string, string, int) (*pixiv.IllustList, error)
	SearchUser(context.Context, string, int) (*pixiv.UserPreviewList, error)
	IllustRecommended(context.Context, int) (*pixiv.IllustList, error)
	TrendingTagsIllust(context.Context) (*pixiv.TrendTags, error)
	IllustFollow(context.Context, string, int) (*pixiv.IllustList, error)
	UserBookmarks(context.Context, int64, string, string, int64) (*pixiv.IllustList, error)
	UserFollowing(context.Context, int64, string, int) (*pixiv.UserPreviewList, error)
	Download(context.Context, string, io.Writer) error
}

Jump to

Keyboard shortcuts

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