UNPKG

claudeus-wp-mcp

Version:

The most comprehensive WordPress MCP server - 145 production-ready tools for complete WordPress management with AI

46 lines (45 loc) 1.79 kB
/** * WordPress Search & Discovery API Client * Handles universal search, oEmbed, and block directory */ import { AxiosInstance } from 'axios'; import { SiteConfig } from '../types/index.js'; import { SearchResult, SearchFilters, OEmbedResponse, URLDetails, BlockDirectoryItem } from '../types/search.js'; export declare class SearchApiClient { protected client: AxiosInstance; protected _site: SiteConfig; constructor(site: SiteConfig); get site(): SiteConfig; /** * Universal search across all content types * @param filters Search filters (search term, type, subtype, pagination) */ search(filters: SearchFilters): Promise<SearchResult[]>; /** * Get oEmbed data for a URL * @param url The URL to get oEmbed data for * @param maxwidth Optional maximum width * @param maxheight Optional maximum height */ getOEmbed(url: string, maxwidth?: number, maxheight?: number): Promise<OEmbedResponse>; /** * Get oEmbed data via proxy (for external URLs) * @param url The external URL to get oEmbed data for * @param maxwidth Optional maximum width * @param maxheight Optional maximum height */ getOEmbedProxy(url: string, maxwidth?: number, maxheight?: number): Promise<OEmbedResponse>; /** * Get URL details for block editor * Returns metadata about a URL for use in blocks (like link previews) * @param url The URL to get details for */ getURLDetails(url: string): Promise<URLDetails>; /** * Search the WordPress.org block directory * @param term Search term * @param page Page number * @param perPage Results per page */ searchBlockDirectory(term: string, page?: number, perPage?: number): Promise<BlockDirectoryItem[]>; }