import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { z } from 'zod'; /** * Create and configure an MCP server with profile data and plugins. */ declare function createMcpMeServer(profileDir: string): Promise; declare const PROFILE_CATEGORIES: readonly ["identity", "career", "skills", "interests", "personality", "goals", "projects", "faq"]; type ProfileCategory = (typeof PROFILE_CATEGORIES)[number]; declare const profileSchemaMap: Record; interface LoadResult { category: ProfileCategory; data: unknown; valid: boolean; errors?: string[]; } interface ProfileBundle { results: LoadResult[]; data: Record; valid: boolean; errors: string[]; } /** * Load all profile YAML files from a directory. */ declare function loadProfile(profileDir: string): Promise; /** * The unified config file format (.mcp-me.yaml). * Separates configuration (how mcp-me behaves) from data (profile YAMLs). */ interface McpMeConfig { generators: Record; plugins: Record>; } /** * Load the unified .mcp-me.yaml config file from the profile directory. */ declare function loadConfig(profileDir: string): Promise; /** * Load plugins config from .mcp-me.yaml. */ declare function loadPluginsConfig(profileDir: string): Promise>>; /** * Load generator sources from .mcp-me.yaml. * Returns a map of flag → value (e.g. { github: "octocat", devto: "myuser" }). */ declare function loadGeneratorsConfig(profileDir: string): Promise>; /** * Search across all loaded profile data for a keyword. */ declare function searchProfile(data: Record, query: string): string[]; /** * A resource provided by a plugin, registered on the MCP server. */ interface PluginResource { /** Unique name for this resource, e.g. "github-repos" */ name: string; /** URI for the resource, e.g. "me://github/repos" */ uri: string; /** Human-readable title */ title: string; /** Description of what this resource provides */ description: string; /** MIME type of the resource content */ mimeType?: string; /** Function that returns the resource content as a string */ read: () => Promise; } /** * A tool provided by a plugin, registered on the MCP server. */ interface PluginTool { /** Unique name for this tool, e.g. "get_github_repos" */ name: string; /** Human-readable title */ title: string; /** Description of what this tool does */ description: string; /** Zod schema for input parameters */ inputSchema: z.ZodType; /** Tool annotations for hinting behavior */ annotations?: { readOnlyHint?: boolean; destructiveHint?: boolean; idempotentHint?: boolean; }; /** Function that executes the tool and returns a text result */ execute: (input: Record) => Promise; } /** * A prompt provided by a plugin, registered on the MCP server. */ interface PluginPrompt { /** Unique name for this prompt */ name: string; /** Human-readable title */ title: string; /** Description of what this prompt does */ description: string; /** Zod schema for prompt arguments */ argsSchema?: z.ZodType; /** Function that generates prompt messages */ generate: (args: Record) => { role: "user" | "assistant"; content: string; }[]; } /** * The core plugin interface. Every mcp-me plugin must implement this contract. * * Plugins can be: * 1. Built-in — shipped with mcp-me in src/plugins/ * 2. npm packages — community plugins named `mcp-me-plugin-*` * 3. Local files — custom .ts/.js files referenced by path in .mcp-me.yaml */ interface McpMePlugin { /** Unique plugin identifier, e.g. "github", "spotify" */ name: string; /** Human-readable description */ description: string; /** Plugin version (semver) */ version: string; /** Initialize the plugin with user-provided config from .mcp-me.yaml */ initialize(config: Record): Promise; /** MCP Resources this plugin provides */ getResources(): PluginResource[]; /** MCP Tools this plugin provides */ getTools(): PluginTool[]; /** MCP Prompts this plugin provides (optional) */ getPrompts?(): PluginPrompt[]; /** Cleanup on shutdown (optional) */ destroy?(): Promise; } /** * Factory function type for creating a plugin instance. * npm and local plugins must export a default function matching this signature. */ type McpMePluginFactory = () => McpMePlugin; /** * Discover and load all enabled plugins based on the .mcp-me.yaml config. * * Loading order: * 1. Built-in plugins from src/plugins/ * 2. npm packages named mcp-me-plugin-* * 3. Local files referenced by path */ declare function discoverPlugins(pluginsConfig: Record>): Promise; /** * Partial profile data produced by a single data source (GitHub, SO, DEV.to, npm). * Multiple PartialProfile objects get merged into the final YAML files. */ interface PartialProfile { identity?: { name?: string; bio?: string; location?: { city?: string; country?: string; }; contact?: { email?: string; website?: string; social?: { platform: string; url: string; username?: string; }[]; }; }; skills?: { languages?: { name: string; category?: string; proficiency?: string; description?: string; }[]; technical?: { name: string; category?: string; proficiency?: string; description?: string; }[]; tools?: { name: string; category?: string; }[]; }; projects?: { name: string; description: string; url?: string; repo_url?: string; status?: string; technologies?: string[]; start_date?: string; stars?: number; category?: string; }[]; career?: { experience?: { title: string; company: string; current?: boolean; start_date?: string; description?: string; }[]; }; interests?: { hobbies?: string[]; topics?: string[]; }; faq?: { question: string; answer: string; category?: string; }[]; plugins?: Record>; } interface GenerateOptions { directory: string; force?: boolean; [source: string]: string | boolean | undefined; } interface GenerateResult { filesCreated: string[]; warnings: string[]; sources: string[]; summary: { name?: string; skills?: number; projects?: number; sources: string[]; }; } /** * Generate a profile from multiple data sources. * Sources run in parallel when possible. Results are merged into unified YAML files. * * Usage: * generateProfile({ directory: "./profile", github: "user", stackoverflow: "123", devto: "user" }) */ declare function generateProfile(options: GenerateOptions): Promise; /** * Deep-merge multiple PartialProfile objects into one unified profile. * Arrays are concatenated and deduplicated by name. Objects are merged. */ declare function mergeProfiles(profiles: PartialProfile[]): PartialProfile; /** Environment variable override for the profile directory. */ declare const PROFILE_DIR_ENV = "MCP_ME_PROFILE_DIR"; /** Default profile path: `~/.mcp-me`. */ declare function getDefaultProfileDir(): string; /** * Resolve the profile directory. * Priority: CLI argument → MCP_ME_PROFILE_DIR env var → ~/.mcp-me */ declare function resolveProfileDir(cliArg?: string): string; export { type GenerateOptions, type GenerateResult, type McpMeConfig, type McpMePlugin, type McpMePluginFactory, PROFILE_CATEGORIES, PROFILE_DIR_ENV, type PluginPrompt, type PluginResource, type PluginTool, type ProfileCategory, createMcpMeServer, discoverPlugins, generateProfile, getDefaultProfileDir, loadConfig, loadGeneratorsConfig, loadPluginsConfig, loadProfile, mergeProfiles, profileSchemaMap, resolveProfileDir, searchProfile };