findymail-mcp 0.1.10 → 0.1.12

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 CHANGED
@@ -13,7 +13,9 @@ This MCP server exposes the following tools:
13
13
  | `verify_email` | Verify if an email is deliverable |
14
14
  | `enrich_company` | Get company data from domain, LinkedIn URL, or name |
15
15
  | `reverse_email_lookup` | Find person info from an email |
16
+ | `lookalike_search` | Find similar companies from a seed domain using vector similarity |
16
17
  | `generate_lead_list` | AI-powered lead list generation with natural language |
18
+ | `get_lead_list_results` | Retrieve results from a previously generated lead list |
17
19
 
18
20
  ## Prerequisites
19
21
 
@@ -89,7 +91,7 @@ In HTTP mode, each client passes their Findymail API key via the `Authorization`
89
91
 
90
92
  ```bash
91
93
  claude mcp add findymail https://your-server.com/mcp -t http -H "Authorization: Bearer your-api-key"
92
- claude mcp add findymail https://mcp.findylabs.com/mcp -t http -H "Authorization: Bearer your-api-key"
94
+ claude mcp add findymail https://mcp.findymail.com/mcp -t http -H "Authorization: Bearer your-api-key"
93
95
  ```
94
96
 
95
97
  #### Running the HTTP server
@@ -110,6 +112,7 @@ Once configured, you can ask your AI assistant:
110
112
  - "Verify if john@example.com is a valid email"
111
113
  - "Get company information for stripe.com"
112
114
  - "Find me 10 marketing managers at SaaS companies in San Francisco"
115
+ - "Find companies similar to stripe.com in the same country"
113
116
 
114
117
  ## API Key
115
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "findymail-mcp",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "MCP server for Findymail - Find verified B2B emails, phone numbers, and company data",
5
5
  "type": "module",
6
6
  "main": "src/stdio.js",
package/src/http.js CHANGED
@@ -1,10 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { createRequire } from "node:module";
3
4
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
5
  import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
5
6
  import { log } from "./api.js";
6
7
  import { registerTools } from "./tools.js";
7
8
 
9
+ const require = createRequire(import.meta.url);
10
+ const { version } = require("../package.json");
11
+
8
12
  // Express is an optional dependency for HTTP mode
9
13
  let express;
10
14
  try {
@@ -88,7 +92,7 @@ app.post("/token", (req, res) => {
88
92
  function createMcpServer() {
89
93
  const server = new McpServer({
90
94
  name: "findymail-mcp",
91
- version: "0.1.0",
95
+ version,
92
96
  });
93
97
 
94
98
  registerTools(server);
package/src/stdio.js CHANGED
@@ -1,13 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { createRequire } from "node:module";
3
4
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
5
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
6
  import { log } from "./api.js";
6
7
  import { registerTools } from "./tools.js";
7
8
 
9
+ const require = createRequire(import.meta.url);
10
+ const { version } = require("../package.json");
11
+
8
12
  const server = new McpServer({
9
13
  name: "findymail-mcp",
10
- version: "0.1.0",
14
+ version,
11
15
  });
12
16
 
13
17
  registerTools(server);
package/src/tools.js CHANGED
@@ -145,6 +145,50 @@ export function registerTools(server) {
145
145
  }
146
146
  );
147
147
 
148
+ // ===========================================================================
149
+ // Tool: lookalike_search
150
+ // ===========================================================================
151
+ server.tool(
152
+ "lookalike_search",
153
+ "Find companies similar to a given seed company. Given a company domain (e.g. \"stripe.com\"), returns a list of lookalike companies that share similar business characteristics using semantic vector similarity search. Results can be filtered by same country and/or same company size. Exclusion lists can be provided to remove already-known companies from results. Costs 1 Finder credit per 10 results returned.",
154
+ {
155
+ seed: z.string().describe("The domain or URL of the seed company to find lookalikes for (e.g. \"stripe.com\" or \"https://www.stripe.com/pricing\"). URLs are automatically resolved to their root domain."),
156
+ same_country: z.boolean().optional().default(false).describe("When true, only return companies located in the same country as the seed company"),
157
+ same_size: z.boolean().optional().default(false).describe("When true, only return companies with a similar employee count range as the seed company"),
158
+ limit: z.number().optional().default(100).describe("Maximum number of results to return (min: 1, max: 10,000)"),
159
+ exclusion_list_ids: z.array(z.number()).optional().default([]).describe("IDs of exclusion lists whose domains should be removed from results"),
160
+ },
161
+ async (params, extra) => {
162
+ const {
163
+ seed,
164
+ same_country = false,
165
+ same_size = false,
166
+ limit = 100,
167
+ exclusion_list_ids = [],
168
+ } = params;
169
+
170
+ log(`lookalike_search: seed="${seed}" (limit: ${limit})`);
171
+
172
+ const validatedLimit = Math.min(Math.max(1, limit), 10000);
173
+
174
+ try {
175
+ const apiKey = resolveApiKey(extra);
176
+
177
+ const data = await apiPost("/lookalike/search", {
178
+ seed,
179
+ same_country,
180
+ same_size,
181
+ limit: validatedLimit,
182
+ exclusion_list_ids,
183
+ }, apiKey);
184
+
185
+ return formatResponse(data);
186
+ } catch (error) {
187
+ return formatError(error.message);
188
+ }
189
+ }
190
+ );
191
+
148
192
  // ===========================================================================
149
193
  // Tool: generate_lead_list
150
194
  // ===========================================================================
@@ -153,7 +197,7 @@ export function registerTools(server) {
153
197
  "Lead list generation tool. Searches a B2B database of 100M+ companies and contacts to build targeted lead lists. Returns structured data including verified email addresses, phone numbers, company details, and LinkedIn profiles — data that web search cannot provide. This is the ONLY way to get verified contact emails and phone numbers. Use this for any request to find, search, list, or generate lists of companies, leads, contacts, or prospects. Accepts natural language queries (e.g., 'SaaS companies in the USA with 50+ employees', 'Marketing managers at tech startups in NYC'). Returns a hash — you MUST then call `get_lead_list_results` with that hash to retrieve results.",
154
198
  {
155
199
  query: z.string().describe("Natural language description of what you're looking for (max 1000 characters)"),
156
- limit: z.number().optional().default(100).describe("Maximum number of results (default: 100, max: 500)"),
200
+ limit: z.number().optional().default(100).describe("Maximum number of results (default: 100, max: 5000)"),
157
201
  mode: z.enum(["broad", "targeted"]).optional().default("broad").describe("'broad' = fast export (1 credit/10 companies), 'targeted' = AI-qualified results (1 credit/company)"),
158
202
  find_contact: z.boolean().optional().default(true).describe("Search for contacts at each company (+1 credit/contact found)"),
159
203
  target_job_titles: z.array(z.string()).optional().default(["CEO"]).describe("Job titles to target when find_contact is true (e.g., ['CEO', 'CTO', 'VP Sales'])"),
@@ -173,7 +217,7 @@ export function registerTools(server) {
173
217
 
174
218
  log(`generate_lead_list: "${query}" (limit: ${limit}, mode: ${mode})`);
175
219
 
176
- const validatedLimit = Math.min(Math.max(1, limit), 500);
220
+ const validatedLimit = Math.min(Math.max(1, limit), 5000);
177
221
 
178
222
  try {
179
223
  const apiKey = resolveApiKey(extra);
@@ -214,13 +258,15 @@ export function registerTools(server) {
214
258
  // ===========================================================================
215
259
  server.tool(
216
260
  "get_lead_list_results",
217
- "Retrieve results from a lead list search started with `generate_lead_list`. Takes the hash returned by `generate_lead_list`. Polls the search status for up to 90 seconds. If the search completes within that time, returns the full data. If still processing after 90s, returns the current progress — call again to continue waiting.",
261
+ "Retrieve results from a lead list search started with `generate_lead_list`. Takes the hash returned by `generate_lead_list`. Polls the search status for up to 60 seconds. If the search completes within that time, returns the full data. If still processing after 60s, returns the current progress — call again to continue waiting.",
218
262
  {
219
263
  hash: z.string().describe("The hash returned by generate_lead_list"),
220
264
  },
221
265
  async ({ hash }, extra) => {
222
266
  log(`get_lead_list_results: hash=${hash}`);
223
267
 
268
+ const progressToken = extra._meta?.progressToken;
269
+
224
270
  try {
225
271
  const apiKey = resolveApiKey(extra);
226
272
 
@@ -232,6 +278,14 @@ export function registerTools(server) {
232
278
  log(`get_lead_list_results: status=${statusResult.status}, attempt ${attempt + 1}/${maxAttempts}`);
233
279
 
234
280
  if (statusResult.status === "success") {
281
+ // Send 100% progress before fetching data
282
+ if (progressToken !== undefined) {
283
+ await extra.sendNotification({
284
+ method: "notifications/progress",
285
+ params: { progressToken, progress: 100, total: 100, message: "Search complete, fetching results..." },
286
+ });
287
+ }
288
+
235
289
  log(`get_lead_list_results: completed, fetching data...`);
236
290
 
237
291
  const allData = [];
@@ -265,9 +319,21 @@ export function registerTools(server) {
265
319
  return formatError("Search was cancelled");
266
320
  }
267
321
 
268
- if (statusResult.progress !== undefined) {
269
- log(`get_lead_list_results: progress ${statusResult.progress}%`);
322
+ // Send progress notification if the client requested it
323
+ if (progressToken !== undefined) {
324
+ if (statusResult.progress !== undefined) {
325
+ await extra.sendNotification({
326
+ method: "notifications/progress",
327
+ params: { progressToken, progress: statusResult.progress, total: 100, message: `Search in progress (${statusResult.progress}%)` },
328
+ });
329
+ } else {
330
+ await extra.sendNotification({
331
+ method: "notifications/progress",
332
+ params: { progressToken, progress: 0, total: 100, message: "In preparation — Search starting..." },
333
+ });
334
+ }
270
335
  }
336
+ log(`get_lead_list_results: progress ${statusResult.progress ?? "in preparation"}`);
271
337
 
272
338
  // Don't sleep after the last attempt
273
339
  if (attempt < maxAttempts - 1) {
@@ -275,11 +341,11 @@ export function registerTools(server) {
275
341
  }
276
342
  }
277
343
 
278
- // Still processing after 90s — return progress so the model can call again
344
+ // Still processing after 60s — return progress so the model can call again
279
345
  return formatResponse({
280
346
  status: "processing",
281
347
  hash,
282
- message: "Search is still processing after 90 seconds. Call get_lead_list_results again to continue waiting.",
348
+ message: "Search is still processing after 60 seconds. Call get_lead_list_results again to continue waiting.",
283
349
  });
284
350
  } catch (error) {
285
351
  return formatError(error.message);