findymail-mcp 0.1.1 → 0.1.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 +27 -3
- package/package.json +1 -1
- package/src/http.js +16 -44
- package/src/tools.js +0 -14
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ 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
|
-
| `
|
|
16
|
+
| `generate_lead_list` | AI-powered lead list generation with natural language |
|
|
17
17
|
|
|
18
18
|
## Prerequisites
|
|
19
19
|
|
|
@@ -34,7 +34,11 @@ npx findymail-mcp
|
|
|
34
34
|
|
|
35
35
|
## Configuration
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### Stdio mode (local)
|
|
38
|
+
|
|
39
|
+
Each user provides their API key via environment variable.
|
|
40
|
+
|
|
41
|
+
#### Claude Code
|
|
38
42
|
|
|
39
43
|
```bash
|
|
40
44
|
claude mcp add findymail -e FINDYMAIL_API_KEY=your-api-key -- npx findymail-mcp
|
|
@@ -56,7 +60,7 @@ Or manually edit `~/.claude.json`:
|
|
|
56
60
|
}
|
|
57
61
|
```
|
|
58
62
|
|
|
59
|
-
|
|
63
|
+
#### Claude Desktop
|
|
60
64
|
|
|
61
65
|
Edit your Claude Desktop config file:
|
|
62
66
|
|
|
@@ -77,6 +81,26 @@ Edit your Claude Desktop config file:
|
|
|
77
81
|
}
|
|
78
82
|
```
|
|
79
83
|
|
|
84
|
+
### HTTP mode (remote server)
|
|
85
|
+
|
|
86
|
+
In HTTP mode, each client passes their Findymail API key via the `Authorization` header. No environment variable is needed on the server.
|
|
87
|
+
|
|
88
|
+
#### Claude Code
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
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"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### Running the HTTP server
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npm install express
|
|
99
|
+
PORT=3456 node src/http.js
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Requests to `/mcp` without a valid `Authorization: Bearer <token>` header will be rejected with a 401 error.
|
|
103
|
+
|
|
80
104
|
## Usage Examples
|
|
81
105
|
|
|
82
106
|
Once configured, you can ask your AI assistant:
|
package/package.json
CHANGED
package/src/http.js
CHANGED
|
@@ -33,51 +33,16 @@ app.use((req, res, next) => {
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
// =============================================================================
|
|
36
|
-
//
|
|
36
|
+
// RFC 9728: Protected Resource Metadata
|
|
37
37
|
// =============================================================================
|
|
38
38
|
|
|
39
|
-
app.get("/.well-known/oauth-
|
|
40
|
-
log("
|
|
39
|
+
app.get("/.well-known/oauth-protected-resource", (req, res) => {
|
|
40
|
+
log("Protected resource metadata requested");
|
|
41
41
|
res.json({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
response_types_supported: ["code"],
|
|
47
|
-
grant_types_supported: ["authorization_code", "refresh_token"],
|
|
48
|
-
code_challenge_methods_supported: ["S256"],
|
|
49
|
-
token_endpoint_auth_methods_supported: ["none"],
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
app.post("/register", (req, res) => {
|
|
54
|
-
log("Client registration");
|
|
55
|
-
const clientId = `client_${Date.now()}`;
|
|
56
|
-
res.status(201).json({
|
|
57
|
-
client_id: clientId,
|
|
58
|
-
client_id_issued_at: Math.floor(Date.now() / 1000),
|
|
59
|
-
redirect_uris: req.body?.redirect_uris || [],
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
app.get("/authorize", (req, res) => {
|
|
64
|
-
log(`Authorization requested for client: ${req.query.client_id}`);
|
|
65
|
-
const code = `code_${Date.now()}`;
|
|
66
|
-
const redirectUri = new URL(req.query.redirect_uri);
|
|
67
|
-
redirectUri.searchParams.set("code", code);
|
|
68
|
-
if (req.query.state) {
|
|
69
|
-
redirectUri.searchParams.set("state", req.query.state);
|
|
70
|
-
}
|
|
71
|
-
log("Auto-approving authorization");
|
|
72
|
-
res.redirect(redirectUri.toString());
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
app.post("/token", (req, res) => {
|
|
76
|
-
log("Token exchange");
|
|
77
|
-
res.json({
|
|
78
|
-
access_token: `access_${Date.now()}`,
|
|
79
|
-
token_type: "Bearer",
|
|
80
|
-
expires_in: 3600,
|
|
42
|
+
resource: BASE_URL,
|
|
43
|
+
authorization_servers: ["https://app.findymail.com"],
|
|
44
|
+
scopes_supported: ["mcp:full"],
|
|
45
|
+
bearer_methods_supported: ["header"],
|
|
81
46
|
});
|
|
82
47
|
});
|
|
83
48
|
|
|
@@ -101,13 +66,20 @@ function createMcpServer() {
|
|
|
101
66
|
// =============================================================================
|
|
102
67
|
|
|
103
68
|
app.use("/mcp", (req, res, next) => {
|
|
69
|
+
const wwwAuth = `Bearer resource_metadata="${BASE_URL}/.well-known/oauth-protected-resource"`;
|
|
104
70
|
const authHeader = req.headers.authorization;
|
|
105
71
|
if (!authHeader || !authHeader.startsWith("Bearer ")) {
|
|
106
|
-
return res
|
|
72
|
+
return res
|
|
73
|
+
.status(401)
|
|
74
|
+
.set("WWW-Authenticate", wwwAuth)
|
|
75
|
+
.json({ error: "Authorization header with Bearer token is required" });
|
|
107
76
|
}
|
|
108
77
|
const token = authHeader.slice(7).trim();
|
|
109
78
|
if (!token) {
|
|
110
|
-
return res
|
|
79
|
+
return res
|
|
80
|
+
.status(401)
|
|
81
|
+
.set("WWW-Authenticate", wwwAuth)
|
|
82
|
+
.json({ error: "Bearer token is empty" });
|
|
111
83
|
}
|
|
112
84
|
req.auth = { token, clientId: "", scopes: [] };
|
|
113
85
|
next();
|
package/src/tools.js
CHANGED
|
@@ -159,9 +159,6 @@ export function registerTools(server) {
|
|
|
159
159
|
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'])"),
|
|
160
160
|
find_email: z.boolean().optional().default(true).describe("Enrich contacts with email (+1 credit/email found). Requires find_contact: true"),
|
|
161
161
|
find_phone: z.boolean().optional().default(false).describe("Enrich contacts with phone (+10 credits/phone found). Requires find_contact: true"),
|
|
162
|
-
add_to_exclusion_list: z.boolean().optional().default(false).describe("Add exported domains to an exclusion list"),
|
|
163
|
-
exclusion_list_id: z.number().optional().describe("ID of exclusion list to add domains to (required if add_to_exclusion_list is true)"),
|
|
164
|
-
exclusion_filter_list_ids: z.array(z.number()).optional().describe("Exclusion list IDs to filter against. [0] = all excluded domains (default), [-1] = disable filtering"),
|
|
165
162
|
},
|
|
166
163
|
async (params, extra) => {
|
|
167
164
|
const {
|
|
@@ -172,9 +169,6 @@ export function registerTools(server) {
|
|
|
172
169
|
target_job_titles = ["CEO"],
|
|
173
170
|
find_email = true,
|
|
174
171
|
find_phone = false,
|
|
175
|
-
add_to_exclusion_list = false,
|
|
176
|
-
exclusion_list_id,
|
|
177
|
-
exclusion_filter_list_ids,
|
|
178
172
|
} = params;
|
|
179
173
|
|
|
180
174
|
log(`intellimatch_search: "${query}" (limit: ${limit}, mode: ${mode})`);
|
|
@@ -192,16 +186,8 @@ export function registerTools(server) {
|
|
|
192
186
|
target_job_titles,
|
|
193
187
|
find_email,
|
|
194
188
|
find_phone,
|
|
195
|
-
add_to_exclusion_list,
|
|
196
189
|
};
|
|
197
190
|
|
|
198
|
-
if (exclusion_list_id !== undefined) {
|
|
199
|
-
config.exclusion_list_id = exclusion_list_id;
|
|
200
|
-
}
|
|
201
|
-
if (exclusion_filter_list_ids !== undefined) {
|
|
202
|
-
config.exclusion_filter_list_ids = exclusion_filter_list_ids;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
191
|
// 1. Start the search
|
|
206
192
|
const startResult = await apiPost("/intellimatch/search", {
|
|
207
193
|
query,
|