consulti-mcp 2.6.1 → 2.6.3
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 +3 -3
- package/dist/constants.d.ts +5 -0
- package/dist/constants.js +7 -0
- package/dist/index.js +5 -4
- package/dist/leads-search.js +7 -6
- package/dist/list-registered-tools.d.ts +5 -0
- package/dist/list-registered-tools.js +5 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +11 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,7 +102,7 @@ Resolve whether a specific mailbox on a catch-all domain actually exists — the
|
|
|
102
102
|
|
|
103
103
|
Enrich a lead's full profile using their email address. The response includes a `company` object (funding stage, total funding, monthly web visits, operating status, HQ, LinkedIn followers, specialties) when the lead is linked to a company; `company` is null when unlinked.
|
|
104
104
|
|
|
105
|
-
**Cost:** 1 lead credit
|
|
105
|
+
**Cost:** 1 lead credit, only deducted on a successful match. On a 404 the reserved credit is refunded, but the refund is not verified.
|
|
106
106
|
|
|
107
107
|
| Input | Type | Description |
|
|
108
108
|
| ------- | ------ | --------------------------------------- |
|
|
@@ -147,8 +147,8 @@ Search a database of 500M+ B2B leads with filters like job title, industry, loca
|
|
|
147
147
|
| `company` | string | Company name to search for |
|
|
148
148
|
| `empMin` | number | Minimum employee count |
|
|
149
149
|
| `empMax` | number | Maximum employee count |
|
|
150
|
-
| `revenueMin` | number | Minimum annual revenue in USD, whole dollars.
|
|
151
|
-
| `revenueMax` | number | Maximum annual revenue in USD, whole dollars.
|
|
150
|
+
| `revenueMin` | number | Minimum annual revenue in USD, whole dollars. Leads with no revenue on file, or a corrupt stored value, are excluded when either bound is set. |
|
|
151
|
+
| `revenueMax` | number | Maximum annual revenue in USD, whole dollars. Leads with no revenue on file, or a corrupt stored value, are excluded when either bound is set. |
|
|
152
152
|
| `excludeTitles` | string[] | Job titles to exclude. Leads matching any of these are removed. |
|
|
153
153
|
| `excludeListId` | string | UUID of a **lead-kind** saved list owned by the API key holder — leads in this list are excluded from results before billing. Business, podcast, YouTube and Instagram lists return HTTP 400. Canonical singular field name; `exclude_list_id` and other variants also return HTTP 400. |
|
|
154
154
|
| `page` | number | Page number (default: 1) |
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const DEFAULT_BASE_URL = "https://www.consulti.ai/api/v1";
|
|
2
|
+
export declare const SITE_URL = "https://www.consulti.ai";
|
|
3
|
+
export declare const SETTINGS_URL = "https://www.consulti.ai/settings?tab=integrations#api-keys";
|
|
4
|
+
export declare const PACKAGE_NAME = "consulti-mcp";
|
|
5
|
+
export declare const ENV_VAR = "CONSULTI_API_KEY";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Generated by `npm run generate` (scripts/generate/registry.ts) from lib/developer/public-api.ts
|
|
2
|
+
// and lib/developer/cli-install.ts. Do not edit: change those files and regenerate.
|
|
3
|
+
export const DEFAULT_BASE_URL = "https://www.consulti.ai/api/v1";
|
|
4
|
+
export const SITE_URL = "https://www.consulti.ai";
|
|
5
|
+
export const SETTINGS_URL = "https://www.consulti.ai/settings?tab=integrations#api-keys";
|
|
6
|
+
export const PACKAGE_NAME = "consulti-mcp";
|
|
7
|
+
export const ENV_VAR = "CONSULTI_API_KEY";
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { DEFAULT_BASE_URL, ENV_VAR, PACKAGE_NAME } from "./constants.js";
|
|
3
4
|
import { VERSION, createConsultiMcpServer } from "./server.js";
|
|
4
5
|
import { createApi } from "./transport.js";
|
|
5
6
|
if (process.argv.includes("--version") || process.argv.includes("-v")) {
|
|
6
7
|
console.log(VERSION);
|
|
7
8
|
process.exit(0);
|
|
8
9
|
}
|
|
9
|
-
const CONSULTI_API_KEY = process.env
|
|
10
|
+
const CONSULTI_API_KEY = process.env[ENV_VAR];
|
|
10
11
|
if (!CONSULTI_API_KEY) {
|
|
11
|
-
console.error(
|
|
12
|
+
console.error(`Error: ${ENV_VAR} environment variable is required.`);
|
|
12
13
|
process.exit(1);
|
|
13
14
|
}
|
|
14
|
-
const BASE_URL = process.env.MCP_BASE_URL ||
|
|
15
|
-
const USER_AGENT =
|
|
15
|
+
const BASE_URL = process.env.MCP_BASE_URL || DEFAULT_BASE_URL;
|
|
16
|
+
const USER_AGENT = `${PACKAGE_NAME}/${VERSION}`;
|
|
16
17
|
const { apiPost, apiGet } = createApi({ baseUrl: BASE_URL, apiKey: CONSULTI_API_KEY, userAgent: USER_AGENT });
|
|
17
18
|
const server = createConsultiMcpServer({ apiPost, apiGet });
|
|
18
19
|
async function main() {
|
package/dist/leads-search.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { DEFAULT_BASE_URL } from "./constants.js";
|
|
2
3
|
/**
|
|
3
4
|
* Field validators for `search_b2b_leads`.
|
|
4
5
|
*
|
|
@@ -16,17 +17,17 @@ import { z } from "zod";
|
|
|
16
17
|
export const searchB2bLeadsInputShape = {
|
|
17
18
|
q: z.string().optional().describe("Free text search across job title, company, and industry"),
|
|
18
19
|
titles: z.array(z.string()).optional().describe("Job titles to filter by (e.g. [\"CEO\", \"VP Marketing\"])"),
|
|
19
|
-
industries: z.array(z.string()).optional().describe(
|
|
20
|
-
technologies: z.array(z.string()).optional().describe(
|
|
20
|
+
industries: z.array(z.string()).optional().describe(`Industries to filter by (case-sensitive exact match). Get the canonical list: GET ${DEFAULT_BASE_URL}/meta/industries`),
|
|
21
|
+
technologies: z.array(z.string()).optional().describe(`Technologies the company's website uses, exact Wappalyzer-style names (e.g. ["Shopify", "HubSpot", "WordPress"]). OR-matched: a lead matches if it uses ANY listed technology. Canonical list: GET ${DEFAULT_BASE_URL}/meta/technologies`),
|
|
21
22
|
excludeTechnologies: z.array(z.string()).optional().describe("Technologies to EXCLUDE, same Wappalyzer-style names. A lead is dropped if its company uses ANY listed technology; leads with no technology data are kept."),
|
|
22
|
-
countries: z.array(z.string()).optional().describe(
|
|
23
|
-
states: z.array(z.string()).optional().describe(
|
|
23
|
+
countries: z.array(z.string()).optional().describe(`Countries to filter by. Alias-group members are equivalent (e.g. "United States" and "US"). Accepted values: GET ${DEFAULT_BASE_URL}/meta/countries`),
|
|
24
|
+
states: z.array(z.string()).optional().describe(`States/regions to filter by. Alias-group members are equivalent (e.g. "Ontario" and "ON"). Accepted values: GET ${DEFAULT_BASE_URL}/meta/states`),
|
|
24
25
|
cities: z.array(z.string()).optional().describe("Cities to filter by (e.g. [\"San Francisco\", \"London\"])"),
|
|
25
26
|
company: z.string().optional().describe("Company name to search for"),
|
|
26
27
|
empMin: z.number().optional().describe("Minimum employee count"),
|
|
27
28
|
empMax: z.number().optional().describe("Maximum employee count"),
|
|
28
|
-
revenueMin: z.number().int().nonnegative().optional().describe("Minimum annual revenue in USD, whole dollars."),
|
|
29
|
-
revenueMax: z.number().int().nonnegative().optional().describe("Maximum annual revenue in USD, whole dollars."),
|
|
29
|
+
revenueMin: z.number().int().nonnegative().optional().describe("Minimum annual revenue in USD, whole dollars. Leads with no revenue on file, or a corrupt stored value, are excluded when either bound is set."),
|
|
30
|
+
revenueMax: z.number().int().nonnegative().optional().describe("Maximum annual revenue in USD, whole dollars. Leads with no revenue on file, or a corrupt stored value, are excluded when either bound is set."),
|
|
30
31
|
excludeTitles: z
|
|
31
32
|
.array(z.string().trim().min(1))
|
|
32
33
|
.max(25)
|
|
@@ -3,3 +3,8 @@
|
|
|
3
3
|
* round-trip over InMemoryTransport. Import-safe: no stdio, no env reads.
|
|
4
4
|
*/
|
|
5
5
|
export declare function listConsultiMcpToolNames(): Promise<string[]>;
|
|
6
|
+
/** Name and description of every registered tool, so the site's tests can check descriptions against the endpoint registry. */
|
|
7
|
+
export declare function listConsultiMcpTools(): Promise<{
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}[]>;
|
|
@@ -6,6 +6,10 @@ import { createConsultiMcpServer } from "./server.js";
|
|
|
6
6
|
* round-trip over InMemoryTransport. Import-safe: no stdio, no env reads.
|
|
7
7
|
*/
|
|
8
8
|
export async function listConsultiMcpToolNames() {
|
|
9
|
+
return (await listConsultiMcpTools()).map((tool) => tool.name);
|
|
10
|
+
}
|
|
11
|
+
/** Name and description of every registered tool, so the site's tests can check descriptions against the endpoint registry. */
|
|
12
|
+
export async function listConsultiMcpTools() {
|
|
9
13
|
const server = createConsultiMcpServer({
|
|
10
14
|
apiPost: async () => "{}",
|
|
11
15
|
apiGet: async () => "{}",
|
|
@@ -18,7 +22,7 @@ export async function listConsultiMcpToolNames() {
|
|
|
18
22
|
]);
|
|
19
23
|
try {
|
|
20
24
|
const listed = await client.listTools();
|
|
21
|
-
return listed.tools.map((tool) => tool.name);
|
|
25
|
+
return listed.tools.map((tool) => ({ name: tool.name, description: tool.description ?? "" }));
|
|
22
26
|
}
|
|
23
27
|
finally {
|
|
24
28
|
await Promise.all([client.close(), server.close()]);
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
export declare const VERSION = "2.6.
|
|
2
|
+
export declare const VERSION = "2.6.3";
|
|
3
3
|
export type ConsultiMcpApiPost = (path: string, body: Record<string, unknown>) => Promise<string>;
|
|
4
4
|
export type ConsultiMcpApiGet = (path: string) => Promise<string>;
|
|
5
5
|
/**
|
package/dist/server.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { DEFAULT_BASE_URL, PACKAGE_NAME } from "./constants.js";
|
|
3
4
|
import { handleSearchB2bLeads, searchB2bLeadsInputObjectSchema } from "./leads-search.js";
|
|
4
|
-
export const VERSION = "2.6.
|
|
5
|
+
export const VERSION = "2.6.3";
|
|
5
6
|
/**
|
|
6
7
|
* Build the Consulti MCP server with every stable tool registered.
|
|
7
8
|
* Import-safe: does not connect a transport, read env, or start stdio.
|
|
@@ -9,7 +10,7 @@ export const VERSION = "2.6.1";
|
|
|
9
10
|
export function createConsultiMcpServer(options) {
|
|
10
11
|
const { apiPost, apiGet } = options;
|
|
11
12
|
const server = new McpServer({
|
|
12
|
-
name:
|
|
13
|
+
name: PACKAGE_NAME,
|
|
13
14
|
version: VERSION,
|
|
14
15
|
});
|
|
15
16
|
server.tool("verify_email", "Verify if an email address is valid and deliverable. Cost: 1 verification credit per call.", { email: z.string().describe("The email address to verify") }, async ({ email }) => ({
|
|
@@ -18,14 +19,14 @@ export function createConsultiMcpServer(options) {
|
|
|
18
19
|
server.tool("verify_catchall", "Resolve whether a specific mailbox on a catch-all domain actually exists — the ESP-engine probe that plain SMTP (verify_email) cannot do. Use it on addresses verify_email returns with is_catch_all=true. Cost: 5 verification credits per call; requires a plan with catch-all verification enabled (Pro or higher). A call usually answers within about 50 seconds and can run for up to 300; this client waits longer than that. A 503 verifier_unavailable means no verdict in time and the credits were refunded; a 500 refund_unconfirmed means the refund could not be confirmed, so check get_credits before retrying.", { email: z.string().describe("The email address on a catch-all domain to resolve") }, async ({ email }) => ({
|
|
19
20
|
content: [{ type: "text", text: await apiPost("/verify/catchall", { email }) }],
|
|
20
21
|
}));
|
|
21
|
-
server.tool("enrich_lead", "Enrich a lead's full profile using their email address, including company-level funding, traffic, HQ, followers, and specialties when the lead is linked to a company. Cost: 1 lead credit
|
|
22
|
+
server.tool("enrich_lead", "Enrich a lead's full profile using their email address, including company-level funding, traffic, HQ, followers, and specialties when the lead is linked to a company. Cost: 1 lead credit, only deducted on a successful match. On a 404 the reserved credit is refunded, but the refund is not verified, so check get_credits if it matters.", { email: z.string().describe("The email address of the lead to enrich") }, async ({ email }) => ({
|
|
22
23
|
content: [{ type: "text", text: await apiPost("/leads/enrich", { email }) }],
|
|
23
24
|
}));
|
|
24
25
|
server.tool("enrich_linkedin", "Enrich a person by their LinkedIn profile URL → a verified work email plus their US mobile phone (free add-on). Cache-first: served instantly when we already hold a verified email for that profile, otherwise enriched live and cached. Cost: 1 lead credit — charged ONLY when an email is returned; phone-only or no-match responses are free.", { linkedin_url: z.string().describe("The LinkedIn profile URL, e.g. https://linkedin.com/in/johndoe") }, async ({ linkedin_url }) => ({
|
|
25
26
|
content: [{ type: "text", text: await apiPost("/enrich/linkedin", { linkedin_url }) }],
|
|
26
27
|
}));
|
|
27
28
|
server.registerTool("search_b2b_leads", {
|
|
28
|
-
description: "Search a database of B2B leads with filters like job title, industry, location, and company size. Country and state/region alias-group members are equivalent, so names and codes return identical populations. Results are always restricted to leads carrying our verified email label (there is no option to include unverified leads). Cost: 1 lead credit per result returned — reserved up to `size` then refunded down to the actual row count; 0 results = 0 credits. Call get_credits first before large `size` values.",
|
|
29
|
+
description: "Search a database of B2B leads with filters like job title, industry, location, and company size. Country and state/region alias-group members are equivalent, so names and codes return identical populations. Results are always restricted to leads carrying our verified email label (there is no option to include unverified leads). Cost: 1 lead credit per result returned — reserved up to `size` then refunded down to the actual row count; 0 results = 0 credits. Call get_credits first before large `size` values. `annual_revenue` in each result is a number or null: null when no revenue is on file or the stored value is corrupt (corrupt values are excluded when revenueMin or revenueMax is set).",
|
|
29
30
|
inputSchema: searchB2bLeadsInputObjectSchema,
|
|
30
31
|
}, async (params) => handleSearchB2bLeads(params, apiPost));
|
|
31
32
|
server.tool("search_instagram_profiles", "Search a database of Instagram profiles with filters like follower count, category, location, and data quality. Cost: 1 lead credit per result returned — reserved up to `size` then refunded down to the actual row count; 0 results = 0 credits. Call get_credits first before large operations.", {
|
|
@@ -39,14 +40,14 @@ export function createConsultiMcpServer(options) {
|
|
|
39
40
|
followingMax: z.number().optional().describe("Maximum following count"),
|
|
40
41
|
postsMin: z.number().optional().describe("Minimum post count"),
|
|
41
42
|
postsMax: z.number().optional().describe("Maximum post count"),
|
|
42
|
-
categories: z.array(z.string()).optional().describe(
|
|
43
|
-
accountTypes: z.array(z.string()).optional().describe(
|
|
44
|
-
emailStatus: z.array(z.string()).optional().describe(
|
|
43
|
+
categories: z.array(z.string()).optional().describe(`Categories to filter by (e.g. ["Digital creator", "Photographer"]). Canonical list: GET ${DEFAULT_BASE_URL}/meta/instagram-categories`),
|
|
44
|
+
accountTypes: z.array(z.string()).optional().describe(`Account types to filter by (e.g. ["business", "personal"]). Canonical list: GET ${DEFAULT_BASE_URL}/meta/instagram-account-types`),
|
|
45
|
+
emailStatus: z.array(z.string()).optional().describe(`Email verification status to filter by (e.g. ["good", "risky", "bad", "catch_all"]). Canonical list: GET ${DEFAULT_BASE_URL}/meta/instagram-email-statuses`),
|
|
45
46
|
verified: z.boolean().optional().describe("Filter to only verified accounts"),
|
|
46
47
|
hasEmail: z.boolean().optional().describe("Filter to only accounts with an email on file"),
|
|
47
48
|
hasPhone: z.boolean().optional().describe("Filter to only accounts with phone number"),
|
|
48
49
|
hasWebsite: z.boolean().optional().describe("Filter to only accounts with website"),
|
|
49
|
-
countries: z.array(z.string()).optional().describe(
|
|
50
|
+
countries: z.array(z.string()).optional().describe(`Countries to filter by (exact match). Canonical list: GET ${DEFAULT_BASE_URL}/meta/instagram-countries`),
|
|
50
51
|
excludeListId: z.string().optional().describe("UUID of an INSTAGRAM-kind saved list owned by the API key holder. Profiles on it are removed before billing, so they cost nothing. Another kind, an unknown list or someone else's list returns HTTP 400, a list over 100,000 members returns 422, and a temporary lookup failure returns 503, all before anything is charged (get_lists reports each list's kind). With it the response adds `total_after_exclusion`; both totals then count up to 10001 and can be null on a timeout, so paginate on has_more."),
|
|
51
52
|
sortBy: z.string().optional().describe("Field to sort by (followers, posts, engagement, username)"),
|
|
52
53
|
sortOrder: z.string().optional().describe("Sort order (asc or desc)"),
|
|
@@ -106,10 +107,10 @@ export function createConsultiMcpServer(options) {
|
|
|
106
107
|
content: [{ type: "text", text: await apiPost("/instagram/search", body) }],
|
|
107
108
|
};
|
|
108
109
|
});
|
|
109
|
-
server.tool("get_lists", "Get all saved lists for the authenticated user, with member counts and each list's kind", {}, async () => ({
|
|
110
|
+
server.tool("get_lists", "Get all saved lists for the authenticated user, with member counts and each list's kind. Free.", {}, async () => ({
|
|
110
111
|
content: [{ type: "text", text: await apiGet("/lists") }],
|
|
111
112
|
}));
|
|
112
|
-
server.tool("create_list", "Create a new saved list. A list holds exactly one entity kind. Use kind='lead' to store B2B lead emails and kind='business' to store local business IDs. Choose the kind that matches what you plan to add,
|
|
113
|
+
server.tool("create_list", "Create a new saved list. A list holds exactly one entity kind. Use kind='lead' to store B2B lead emails and kind='business' to store local business IDs. Choose the kind that matches what you plan to add: an empty list takes the kind of its first payload, and once it has members a payload of the other kind is rejected with LIST_KIND_MISMATCH. Free.", {
|
|
113
114
|
name: z.string().describe("Name of the list"),
|
|
114
115
|
description: z.string().optional().describe("Optional description of the list"),
|
|
115
116
|
// Only the two kinds add_leads_to_list can actually populate. Offering
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "consulti-mcp",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "Consulti.ai MCP server — 14 stable tools for email verification (incl. catch-all mailbox resolution), B2B lead search/enrichment, LinkedIn-URL enrichment, Instagram profile search, list management, inbox placement tests, and credit-balance checks. Stable surface only; beta endpoints are not exposed via MCP. Compatible with Claude Desktop, Cursor, and any MCP client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|