@caelaralabs/mcp 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -2
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +51 -0
- package/dist/registry.d.ts +39 -0
- package/dist/registry.js +101 -0
- package/dist/snapshot.json +2165 -0
- package/package.json +48 -4
package/README.md
CHANGED
|
@@ -1,3 +1,81 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @caelaralabs/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One MCP server for all ten Caelara Labs API suites: 100 tools for web intelligence, social analytics, agent safety, compliance, e-commerce, SEO, documents, on-chain intelligence, locale and media.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npx -y @caelaralabs/mcp
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Works with any MCP client that runs a stdio server: Cursor, Windsurf, Cline, Zed and desktop assistants. Node 18 or newer.
|
|
10
|
+
|
|
11
|
+
**Where calls go:** every tool call is sent to the matching Caelara Labs edge API at `https://<suite>.caelaralabs.com`, through that suite's `/mcp` endpoint. Only this thin server runs locally, and it does not log or store requests.
|
|
12
|
+
|
|
13
|
+
## Configure
|
|
14
|
+
|
|
15
|
+
Print a ready-to-paste config:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
npx -y @caelaralabs/mcp --print-config
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"caelara": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["-y", "@caelaralabs/mcp"],
|
|
27
|
+
"env": { "CAELARA_API_KEY": "<your Caelara key>" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- **Cursor:** `.cursor/mcp.json` in a project, or `~/.cursor/mcp.json`.
|
|
34
|
+
- **Windsurf:** `~/.codeium/windsurf/mcp_config.json`.
|
|
35
|
+
- **Desktop assistants and other stdio clients:** add the same `mcpServers` entry to the client's MCP configuration.
|
|
36
|
+
- **Command-line agents:** register the command `npx -y @caelaralabs/mcp` with `CAELARA_API_KEY` in its environment.
|
|
37
|
+
|
|
38
|
+
Load only some suites with `--suites=compliance,seo,geo` or `CAELARA_SUITES=compliance,seo,geo`.
|
|
39
|
+
|
|
40
|
+
## Keys and payment
|
|
41
|
+
|
|
42
|
+
| Variable | Purpose |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `CAELARA_API_KEY` | Your Caelara key, sent as `X-Caelara-Key`. Free 50-call trial key: https://caelaralabs.com/shield/#trial |
|
|
45
|
+
| `CAELARA_X402_PAYMENT` | Optional pre-signed x402 payment header, forwarded as `X-PAYMENT`. This server never holds a wallet or signs payments. |
|
|
46
|
+
| `CAELARA_SUITES` | Optional suite list (default: all ten). |
|
|
47
|
+
| `CAELARA_OFFLINE=1` | Optional. Skip the live refresh and use the bundled tool list only. |
|
|
48
|
+
|
|
49
|
+
Without a key or a payment, a tool call returns the suite's x402 terms (HTTP 402, USDC on Base) as the tool result, so an agent sees the price before paying. List prices: 0.005 USDC per call for most tools, 0.025 USDC for composite tools.
|
|
50
|
+
|
|
51
|
+
## Tools
|
|
52
|
+
|
|
53
|
+
Tool names are `caelara_<suite>_<tool>`. The server starts from a bundled tool list, so it starts at once and works offline, then refreshes from the live suites. When a suite has benchmark data, its measured p50 and p95 latency (from https://benchmarks.caelaralabs.com) is added to the tool descriptions.
|
|
54
|
+
|
|
55
|
+
| Suite | Host | Tools |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| Web Intelligence | `api.caelaralabs.com` | `caelara_api_company_intel_composite`, `caelara_api_lead_verify_composite`, `caelara_api_url_to_markdown`, `caelara_api_seo_xray`, `caelara_api_email_mx_forensics`, `caelara_api_social_card_extractor`, `caelara_api_sitemap_crawler`, `caelara_api_html_table_parser`, `caelara_api_rss_json_normalizer`, `caelara_api_prompt_firewall_structurer` |
|
|
58
|
+
| Social Analytics | `social.caelaralabs.com` | `caelara_social_video_viral_audit_composite`, `caelara_social_creator_profile_composite`, `caelara_social_tiktok_oembed`, `caelara_social_youtube_metadata`, `caelara_social_reels_hook_scorer`, `caelara_social_thumbnail_analyzer`, `caelara_social_caption_hashtag_extractor`, `caelara_social_bio_link_auditor`, `caelara_social_transcript_cleaner`, `caelara_social_engagement_rate_calc` |
|
|
59
|
+
| Agent Safety | `agent.caelaralabs.com` | `caelara_agent_agent_input_firewall`, `caelara_agent_agent_output_validator`, `caelara_agent_pii_redactor`, `caelara_agent_prompt_injection_scanner`, `caelara_agent_token_compressor`, `caelara_agent_json_auto_repair`, `caelara_agent_schema_enforcer`, `caelara_agent_hallucination_diff`, `caelara_agent_citation_extractor`, `caelara_agent_context_chunker` |
|
|
60
|
+
| Compliance & Trust | `compliance.caelaralabs.com` | `caelara_compliance_domain_trust_composite`, `caelara_compliance_entity_kyb_composite`, `caelara_compliance_spf_dmarc_grader`, `caelara_compliance_ssl_cert_inspector`, `caelara_compliance_ip_asn_reputation`, `caelara_compliance_disposable_email_db`, `caelara_compliance_iban_bic_validator`, `caelara_compliance_vat_ein_checkdigit`, `caelara_compliance_sanctions_fuzzy_screen`, `caelara_compliance_security_headers_audit` |
|
|
61
|
+
| E-Commerce Intelligence | `ecom.caelaralabs.com` | `caelara_ecom_product_intel_composite`, `caelara_ecom_storefront_xray_composite`, `caelara_ecom_jsonld_product_parser`, `caelara_ecom_shopify_feed_extractor`, `caelara_ecom_gtin_upc_validator`, `caelara_ecom_price_drop_comparator`, `caelara_ecom_ad_pixel_detector`, `caelara_ecom_currency_margin_calc`, `caelara_ecom_review_sentiment_parser`, `caelara_ecom_sku_normalizer` |
|
|
62
|
+
| SEO & GEO Readiness | `seo.caelaralabs.com` | `caelara_seo_geo_readiness_composite`, `caelara_seo_technical_seo_composite`, `caelara_seo_llms_txt_auditor`, `caelara_seo_ai_bot_robots_check`, `caelara_seo_redirect_chain_tracer`, `caelara_seo_schema_org_validator`, `caelara_seo_serp_pixel_preview`, `caelara_seo_keyword_ngrams_extractor`, `caelara_seo_hreflang_validator`, `caelara_seo_broken_link_scanner` |
|
|
63
|
+
| Document Utilities | `docs.caelaralabs.com` | `caelara_docs_invoice_json_composite`, `caelara_docs_universal_data_bridge`, `caelara_docs_csv_to_typed_json`, `caelara_docs_xml_to_json_clean`, `caelara_docs_markdown_to_sanitized_html`, `caelara_docs_html_to_clean_text`, `caelara_docs_regex_entity_extractor`, `caelara_docs_address_normalizer`, `caelara_docs_phone_e164_formatter`, `caelara_docs_dedupe_fuzzy_matcher` |
|
|
64
|
+
| On-Chain Intelligence | `crypto.caelaralabs.com` | `caelara_crypto_token_safety_composite`, `caelara_crypto_wallet_portfolio_composite`, `caelara_crypto_solana_mint_auditor`, `caelara_crypto_base_erc20_inspector`, `caelara_crypto_dex_liquidity_depth`, `caelara_crypto_stablecoin_depeg_monitor`, `caelara_crypto_gas_fee_estimator`, `caelara_crypto_tx_hash_decoder`, `caelara_crypto_address_checksum_validator`, `caelara_crypto_token_price_aggregator` |
|
|
65
|
+
| Global Locale | `geo.caelaralabs.com` | `caelara_geo_global_scheduling_composite`, `caelara_geo_cross_border_checkout_composite`, `caelara_geo_timezone_converter`, `caelara_geo_business_hours_calc`, `caelara_geo_public_holiday_lookup`, `caelara_geo_live_fx_rates`, `caelara_geo_vat_gst_rate_lookup`, `caelara_geo_postal_code_validator`, `caelara_geo_country_iso_enricher`, `caelara_geo_distance_haversine_calc` |
|
|
66
|
+
| Dynamic Media | `media.caelaralabs.com` | `caelara_media_brand_kit_composite`, `caelara_media_dynamic_social_card_composite`, `caelara_media_edge_og_svg_generator`, `caelara_media_qr_code_svg_builder`, `caelara_media_color_palette_extractor`, `caelara_media_favicon_hd_resolver`, `caelara_media_avatar_initials_svg`, `caelara_media_badge_shield_generator`, `caelara_media_aspect_ratio_calc`, `caelara_media_image_meta_inspector` |
|
|
67
|
+
|
|
68
|
+
Full input schemas: `https://<suite>.caelaralabs.com/openapi.json`, or the suite's `/mcp` `tools/list`.
|
|
69
|
+
|
|
70
|
+
## Develop
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
npm install
|
|
74
|
+
npm run build
|
|
75
|
+
npm test
|
|
76
|
+
npm run snapshot # refresh the bundled tool list from the live suites
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
MIT. Caelara Labs, ops@caelaralabs.com.
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// caelara-mcp: stdio MCP server exposing the Caelara Labs suites as tools (caelara_<suite>_<tool>).
|
|
3
|
+
// npx -y @caelaralabs/mcp [--suites=compliance,seo] [--print-config]
|
|
4
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
5
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { buildTools, callTool, printConfig, refresh, selectSuites, snapshotTools } from './registry.js';
|
|
8
|
+
const VERSION = '1.0.0';
|
|
9
|
+
async function main() {
|
|
10
|
+
const argv = process.argv.slice(2);
|
|
11
|
+
let suites;
|
|
12
|
+
try {
|
|
13
|
+
suites = selectSuites(argv, process.env);
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
process.stderr.write(`${e instanceof Error ? e.message : String(e)}\n`);
|
|
17
|
+
process.exit(2);
|
|
18
|
+
}
|
|
19
|
+
if (argv.includes('--print-config')) {
|
|
20
|
+
process.stdout.write(printConfig(suites) + '\n');
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (argv.includes('--version')) {
|
|
24
|
+
process.stdout.write(VERSION + '\n');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
// Instant start from the bundled snapshot; refreshed from the live suites in the background.
|
|
28
|
+
let tools = buildTools(suites, snapshotTools());
|
|
29
|
+
const server = new Server({ name: 'caelara', version: VERSION }, { capabilities: { tools: { listChanged: true } } });
|
|
30
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
31
|
+
tools: tools.map((t) => ({ name: t.name, description: t.description, inputSchema: t.inputSchema })),
|
|
32
|
+
}));
|
|
33
|
+
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
34
|
+
const t = tools.find((x) => x.name === req.params.name);
|
|
35
|
+
if (!t)
|
|
36
|
+
return { content: [{ type: 'text', text: JSON.stringify({ error: 'unknown_tool', name: req.params.name }) }], isError: true };
|
|
37
|
+
const r = await callTool(t, (req.params.arguments ?? {}), process.env);
|
|
38
|
+
return { content: [{ type: 'text', text: r.text }], isError: r.isError };
|
|
39
|
+
});
|
|
40
|
+
await server.connect(new StdioServerTransport());
|
|
41
|
+
if (process.env.CAELARA_OFFLINE !== '1') {
|
|
42
|
+
refresh(suites).then((live) => {
|
|
43
|
+
tools = buildTools(suites, live.tools, live.telemetry);
|
|
44
|
+
server.sendToolListChanged().catch(() => undefined);
|
|
45
|
+
}).catch(() => undefined);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
main().catch((e) => {
|
|
49
|
+
process.stderr.write(`caelara-mcp: ${e instanceof Error ? e.message : String(e)}\n`);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const ALL_SUITES: readonly ["api", "social", "agent", "compliance", "ecom", "seo", "docs", "crypto", "geo", "media"];
|
|
2
|
+
export type SuiteId = (typeof ALL_SUITES)[number];
|
|
3
|
+
export declare const SUITE_NAMES: Record<SuiteId, string>;
|
|
4
|
+
export interface UpstreamTool {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface Telemetry {
|
|
10
|
+
p50Ms: number | null;
|
|
11
|
+
p95Ms: number | null;
|
|
12
|
+
measuredAt: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface RegisteredTool {
|
|
15
|
+
name: string;
|
|
16
|
+
suite: SuiteId;
|
|
17
|
+
upstreamName: string;
|
|
18
|
+
description: string;
|
|
19
|
+
inputSchema: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
export declare function selectSuites(argv: string[], env: NodeJS.ProcessEnv): SuiteId[];
|
|
22
|
+
export declare const host: (s: SuiteId) => string;
|
|
23
|
+
export declare const toolNameFor: (s: SuiteId, upstream: string) => string;
|
|
24
|
+
export declare function describe(s: SuiteId, t: UpstreamTool, tel: Telemetry | undefined): string;
|
|
25
|
+
export declare function buildTools(suites: SuiteId[], tools: Partial<Record<SuiteId, UpstreamTool[]>>, telemetry?: Partial<Record<SuiteId, Telemetry>>): RegisteredTool[];
|
|
26
|
+
export declare const snapshotTools: () => Partial<Record<SuiteId, UpstreamTool[]>>;
|
|
27
|
+
export declare const snapshotTakenAt: () => string;
|
|
28
|
+
type Fetch = typeof fetch;
|
|
29
|
+
export declare function refresh(suites: SuiteId[], f?: Fetch): Promise<{
|
|
30
|
+
tools: Partial<Record<SuiteId, UpstreamTool[]>>;
|
|
31
|
+
telemetry: Partial<Record<SuiteId, Telemetry>>;
|
|
32
|
+
live: SuiteId[];
|
|
33
|
+
}>;
|
|
34
|
+
export declare function callTool(t: RegisteredTool, args: Record<string, unknown>, env: NodeJS.ProcessEnv, f?: Fetch, ms?: number): Promise<{
|
|
35
|
+
text: string;
|
|
36
|
+
isError: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
export declare function printConfig(suites: SuiteId[]): string;
|
|
39
|
+
export {};
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Tool registry for the ten Caelara Labs suites.
|
|
2
|
+
// Startup uses the bundled snapshot (instant, works offline). A background refresh then reads each suite's live
|
|
3
|
+
// tool list (POST /mcp tools/list) and its agent card (GET /.well-known/agent.json) for live p50/p95 latency.
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import snapshot from './snapshot.json' with { type: 'json' };
|
|
6
|
+
export const ALL_SUITES = ['api', 'social', 'agent', 'compliance', 'ecom', 'seo', 'docs', 'crypto', 'geo', 'media'];
|
|
7
|
+
export const SUITE_NAMES = {
|
|
8
|
+
api: 'Web Intelligence', social: 'Social Analytics', agent: 'Agent Safety', compliance: 'Compliance & Trust',
|
|
9
|
+
ecom: 'E-Commerce Intelligence', seo: 'SEO & GEO Readiness', docs: 'Document Utilities', crypto: 'On-Chain Intelligence',
|
|
10
|
+
geo: 'Global Locale', media: 'Dynamic Media',
|
|
11
|
+
};
|
|
12
|
+
const SuiteList = z.array(z.enum(ALL_SUITES)).min(1);
|
|
13
|
+
// --suites=a,b or CAELARA_SUITES=a,b; default all ten. Unknown names are rejected with a clear message.
|
|
14
|
+
export function selectSuites(argv, env) {
|
|
15
|
+
const flag = argv.find((a) => a.startsWith('--suites='))?.slice('--suites='.length);
|
|
16
|
+
const raw = (flag ?? env.CAELARA_SUITES ?? '').trim();
|
|
17
|
+
if (!raw)
|
|
18
|
+
return [...ALL_SUITES];
|
|
19
|
+
const parsed = SuiteList.safeParse(raw.split(',').map((s) => s.trim().toLowerCase()).filter(Boolean));
|
|
20
|
+
if (!parsed.success)
|
|
21
|
+
throw new Error(`Unknown suite in "${raw}". Valid suites: ${ALL_SUITES.join(', ')}`);
|
|
22
|
+
return [...new Set(parsed.data)];
|
|
23
|
+
}
|
|
24
|
+
export const host = (s) => `https://${s}.caelaralabs.com`;
|
|
25
|
+
export const toolNameFor = (s, upstream) => `caelara_${s}_${upstream}`;
|
|
26
|
+
export function describe(s, t, tel) {
|
|
27
|
+
const latency = tel && tel.p50Ms !== null ? ` Measured p50 ${Math.round(tel.p50Ms)} ms, p95 ${tel.p95Ms !== null ? Math.round(tel.p95Ms) : '?'} ms${tel.measuredAt ? ` (${tel.measuredAt.slice(0, 10)}, benchmarks.caelaralabs.com)` : ''}.` : '';
|
|
28
|
+
return `[${SUITE_NAMES[s]}] ${t.description}${latency} Calls ${host(s)}.`;
|
|
29
|
+
}
|
|
30
|
+
export function buildTools(suites, tools, telemetry = {}) {
|
|
31
|
+
return suites.flatMap((s) => (tools[s] ?? []).map((t) => ({
|
|
32
|
+
name: toolNameFor(s, t.name), suite: s, upstreamName: t.name,
|
|
33
|
+
description: describe(s, t, telemetry[s]),
|
|
34
|
+
inputSchema: t.inputSchema && typeof t.inputSchema === 'object' ? t.inputSchema : { type: 'object', properties: {} },
|
|
35
|
+
})));
|
|
36
|
+
}
|
|
37
|
+
export const snapshotTools = () => snapshot.suites;
|
|
38
|
+
export const snapshotTakenAt = () => snapshot.takenAt;
|
|
39
|
+
const timeout = (ms) => AbortSignal.timeout(ms);
|
|
40
|
+
async function liveTools(s, f) {
|
|
41
|
+
try {
|
|
42
|
+
const r = await f(`${host(s)}/mcp`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'User-Agent': 'CaelaraLabs-Engine/1.0' }, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/list' }), signal: timeout(3000) });
|
|
43
|
+
const j = (await r.json());
|
|
44
|
+
return Array.isArray(j.result?.tools) && j.result.tools.length ? j.result.tools : null;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async function liveTelemetry(s, f) {
|
|
51
|
+
try {
|
|
52
|
+
const r = await f(`${host(s)}/.well-known/agent.json`, { headers: { Accept: 'application/json', 'User-Agent': 'CaelaraLabs-Engine/1.0' }, signal: timeout(3000) });
|
|
53
|
+
const j = (await r.json());
|
|
54
|
+
const t = j.telemetry;
|
|
55
|
+
return t && t.available && typeof t.p50Ms === 'number' ? { p50Ms: t.p50Ms, p95Ms: t.p95Ms ?? null, measuredAt: t.measuredAt ?? null } : null;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Live refresh: per suite, keeps the snapshot when the live call fails.
|
|
62
|
+
export async function refresh(suites, f = fetch) {
|
|
63
|
+
const base = snapshotTools();
|
|
64
|
+
const tools = {};
|
|
65
|
+
const telemetry = {};
|
|
66
|
+
const live = [];
|
|
67
|
+
await Promise.all(suites.map(async (s) => {
|
|
68
|
+
const [t, tel] = await Promise.all([liveTools(s, f), liveTelemetry(s, f)]);
|
|
69
|
+
tools[s] = t ?? base[s] ?? [];
|
|
70
|
+
if (t)
|
|
71
|
+
live.push(s);
|
|
72
|
+
if (tel)
|
|
73
|
+
telemetry[s] = tel;
|
|
74
|
+
}));
|
|
75
|
+
return { tools, telemetry, live };
|
|
76
|
+
}
|
|
77
|
+
// Forward a tool call to the suite's MCP endpoint. Your key goes as X-Caelara-Key; an optional pre-signed x402
|
|
78
|
+
// payment header goes as X-PAYMENT. Without either, the suite answers with its x402 payment terms.
|
|
79
|
+
export async function callTool(t, args, env, f = fetch, ms = 15000) {
|
|
80
|
+
const headers = { 'Content-Type': 'application/json', 'User-Agent': 'CaelaraLabs-Engine/1.0' };
|
|
81
|
+
if (env.CAELARA_API_KEY)
|
|
82
|
+
headers['X-Caelara-Key'] = env.CAELARA_API_KEY;
|
|
83
|
+
if (env.CAELARA_X402_PAYMENT)
|
|
84
|
+
headers['X-PAYMENT'] = env.CAELARA_X402_PAYMENT;
|
|
85
|
+
try {
|
|
86
|
+
const r = await f(`${host(t.suite)}/mcp`, { method: 'POST', headers, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: t.upstreamName, arguments: args } }), signal: timeout(ms) });
|
|
87
|
+
const j = (await r.json());
|
|
88
|
+
if (j.error)
|
|
89
|
+
return { text: JSON.stringify({ error: 'upstream_error', message: j.error.message ?? '' }), isError: true };
|
|
90
|
+
const text = (j.result?.content ?? []).map((c) => c.text ?? '').join('\n');
|
|
91
|
+
return { text, isError: j.result?.isError === true };
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
const name = e instanceof Error ? e.name : '';
|
|
95
|
+
return { text: JSON.stringify({ error: name === 'TimeoutError' || name === 'AbortError' ? 'timeout' : 'network_error' }), isError: true };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export function printConfig(suites) {
|
|
99
|
+
const args = ['-y', '@caelaralabs/mcp', ...(suites.length === ALL_SUITES.length ? [] : [`--suites=${suites.join(',')}`])];
|
|
100
|
+
return JSON.stringify({ mcpServers: { caelara: { command: 'npx', args, env: { CAELARA_API_KEY: '<your Caelara key>' } } } }, null, 2);
|
|
101
|
+
}
|