Documentation
¶
Overview ¶
Package mcpserver exposes selected LedgerForge operations through the Model Context Protocol. It is intentionally transport-agnostic; cmd/ledgerforge-mcp runs it over standard input and output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server owns the MCP protocol server and the LedgerForge service it exposes.
type Service ¶
type Service interface {
GetLedgerByID(id string) (*model.Ledger, error)
GetAllLedgers(limit, offset int) ([]model.Ledger, error)
GetBalanceByID(ctx context.Context, id string, include []string, withQueued bool) (*model.Balance, error)
GetAllBalances(ctx context.Context, limit, offset int) ([]model.Balance, error)
GetBalanceAtTime(ctx context.Context, balanceID string, targetTime time.Time, fromSource bool) (*model.Balance, error)
GetBalanceByIndicator(ctx context.Context, indicator, currency string) (*model.Balance, error)
GetTransaction(ctx context.Context, id string) (*model.Transaction, error)
GetTransactionByRef(ctx context.Context, reference string) (model.Transaction, error)
GetAllTransactions(limit, offset int) ([]model.Transaction, error)
GetBalanceLineage(ctx context.Context, balanceID string) (*ledgerforge.BalanceLineage, error)
GetTransactionLineage(ctx context.Context, transactionID string) (*ledgerforge.TransactionLineage, error)
CreateLedger(ledger model.Ledger) (model.Ledger, error)
CreateBalance(ctx context.Context, balance model.Balance) (model.Balance, error)
QueueTransaction(ctx context.Context, transaction *model.Transaction) (*model.Transaction, error)
CommitInflightTransaction(ctx context.Context, transactionID string, amount *big.Int) (*model.Transaction, error)
VoidInflightTransaction(ctx context.Context, transactionID string) (*model.Transaction, error)
RefundTransaction(ctx context.Context, transactionID string, skipQueue bool) (*model.Transaction, error)
CreateBulkTransactions(ctx context.Context, request *model.BulkTransactionRequest) (*model.BulkTransactionResult, error)
}
Service is the LedgerForge capability surface available to MCP tools. Keeping this narrow makes the transport independently testable and prevents tools from reaching persistence internals directly.
Click to show internal directories.
Click to hide internal directories.