@extenshi/mcp
Version:
Extenshi MCP server — bring the extension catalog (search, security, market research) and pre-publish scanning into your AI tools
35 lines • 1.66 kB
TypeScript
/**
* Configuration loading for the Extenshi MCP server.
*
* The MCP server runs locally (stdio) inside the developer's AI client, so the
* API key comes from the environment — never from a request header. We
* deliberately reuse the SAME key sources as `@extenshi/cli` so a developer who
* already ran `extenshi login` is set up with zero extra steps:
*
* 1. Environment variable EXTENSHI_API_KEY (set in the client's mcp config)
* 2. A `.env` in the current working directory (does NOT override real env)
* 3. Config file ~/.extenshi/config.json (written by `extenshi login`)
*
* Base URLs are baked into the package at build time and are NOT configurable:
* every install talks to the production backend. There is intentionally no env
* var or config-file override for them (was EXTENSHI_BFF_URL / EXTENSHI_API_URL
* / EXTENSHI_DOCS_URL) — only the API key is read from the environment.
*
* - https://bff.extenshi.io (read tools)
* - https://scan.extenshi.io (scan)
* - https://docs.extenshi.io (search_docs)
*
* stdout is the MCP protocol channel — this module must NEVER write to it.
*/
export interface ResolvedConfig {
/** The `ek_…` developer API key, or null if none is configured. */
apiKey: string | null;
/** Base URL of the catalog BFF (read tools), no trailing slash. */
bffUrl: string;
/** Base URL of the scan backend (scan_extension tool), no trailing slash. */
scanUrl: string;
/** Base URL of the docs site (search_docs tool), no trailing slash. */
docsUrl: string;
}
export declare function loadConfig(): ResolvedConfig;
//# sourceMappingURL=config.d.ts.map