@mambalabsdev/mcp-agent-brokerage-resolver 0.0.0-stage → 1.0.1
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/LICENSE +21 -0
- package/README.md +111 -2
- package/SECURITY.md +31 -0
- package/build/index.js +234 -0
- package/package.json +49 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mamba Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,112 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agent to Brokerage Resolver MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://smithery.ai/servers/mambabuilt/mcp-agent-brokerage-resolver) [](https://glama.ai/mcp/servers/mambalabsdev/mcp-agent-brokerage-resolver) [](https://registry.modelcontextprotocol.io/v0/servers?search=com.mambabuilt/mcp-agent-brokerage-resolver&limit=1) [](https://www.npmjs.com/package/@mambalabsdev/mcp-agent-brokerage-resolver) [](https://www.npmjs.com/package/@mambalabsdev/mcp-agent-brokerage-resolver) [](https://github.com/mambalabsdev/mcp-agent-brokerage-resolver/blob/main/LICENSE) [](https://mcpservers.org/servers/mambalabsdev/mcp-agent-brokerage-resolver)
|
|
4
|
+
|
|
5
|
+
An MCP server for the Mamba Labs Agent to Brokerage Resolver actor on Apify. Give it a licensed US real estate agent, by license number or by name and state, and get the brokerage of record from the official state license register, that brokerage's active agent count and size band, and the agent's license status and expiry. It can also list every active agent at a brokerage, or every brokerage office in a zip code.
|
|
6
|
+
|
|
7
|
+
## What's Inside
|
|
8
|
+
|
|
9
|
+
- [What it does](#what-it-does)
|
|
10
|
+
- [Quick start](#quick-start)
|
|
11
|
+
- [Prerequisites](#prerequisites)
|
|
12
|
+
- [Example prompts](#example-prompts)
|
|
13
|
+
- [Tool](#tool)
|
|
14
|
+
- [Inputs](#inputs)
|
|
15
|
+
- [Pricing](#pricing)
|
|
16
|
+
- [Your keys](#your-keys)
|
|
17
|
+
- [Full actor documentation](#full-actor-documentation)
|
|
18
|
+
- [License](#license)
|
|
19
|
+
|
|
20
|
+
## What it does
|
|
21
|
+
|
|
22
|
+
Look up a licensed US real estate agent on the official state license register and get the brokerage of record, the brokerage's active agent count and size band (1, 2-15, 16-50, 51+), and the agent's license status and expiry. Covers 19 states; brokerage data in CA, IA, MO, NV, NY, OH, OR, TX, and VT. Three modes: lookup (one agent or a list, by license number or by name), roster_firm (active agents at one brokerage), and roster_zip (brokerage offices in a zip code, NY, MO, OR, and VT). Returns no emails, phone numbers, or home addresses. Ambiguous or unmatched inputs return a free row with row_status explaining why. A run that does not succeed is returned as an error with its run ID.
|
|
23
|
+
|
|
24
|
+
All of the work runs on Apify. This package is a thin client that starts the actor run, waits for it, and hands back the dataset rows.
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
You need Node.js 18 or newer and an Apify account with an API token.
|
|
29
|
+
|
|
30
|
+
Add this to your Claude Desktop config (`claude_desktop_config.json`), Cursor, or any MCP client:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"mamba-agent-brokerage-resolver": {
|
|
36
|
+
"command": "npx",
|
|
37
|
+
"args": [
|
|
38
|
+
"-y",
|
|
39
|
+
"@mambalabsdev/mcp-agent-brokerage-resolver"
|
|
40
|
+
],
|
|
41
|
+
"env": {
|
|
42
|
+
"APIFY_TOKEN": "your-apify-token"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Restart the client. The `resolve_agent_brokerage` tool appears.
|
|
50
|
+
|
|
51
|
+
## Prerequisites
|
|
52
|
+
|
|
53
|
+
- Node.js 18 or newer.
|
|
54
|
+
- An Apify API token from [console.apify.com/account/integrations](https://console.apify.com/account/integrations), set as `APIFY_TOKEN`. The server lists its tool without a token; a call needs one.
|
|
55
|
+
|
|
56
|
+
## Example prompts
|
|
57
|
+
|
|
58
|
+
- "Which brokerage is Texas agent 134224-SA with, and how big is it?"
|
|
59
|
+
- "List the active agents at the brokerage with Texas license 566433-BB."
|
|
60
|
+
- "Which real estate brokerages have an office in zip 14201, and how many agents does each have?"
|
|
61
|
+
|
|
62
|
+
## Tool
|
|
63
|
+
|
|
64
|
+
`resolve_agent_brokerage`. One tool. Example arguments:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{ "mode": "lookup", "state": "TX", "license_number": "134224-SA" }
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Inputs
|
|
71
|
+
|
|
72
|
+
| Input | Type | Required | Description |
|
|
73
|
+
|---|---|---|---|
|
|
74
|
+
| `mode` | string | no | lookup, roster_firm, or roster_zip. Default lookup. |
|
|
75
|
+
| `state` | string | no | Two letter licensing state, for example TX. |
|
|
76
|
+
| `license_number` | string | no | Lookup mode. The agent's license number as the register prints it. |
|
|
77
|
+
| `agent_name` | string | no | Lookup mode, when there is no license number. First and last name. |
|
|
78
|
+
| `brokerage_name` | string | no | Narrows a name match; names the firm in roster_firm mode. |
|
|
79
|
+
| `city` | string | no | Narrows a name match by office city or license county. |
|
|
80
|
+
| `licenses` | string | no | Lookup batch, one per line: state then license number. |
|
|
81
|
+
| `agents` | string | no | Lookup batch, one per line: state, name, brokerage, city, separated by a vertical bar. |
|
|
82
|
+
| `brokerage_license_number` | string | no | roster_firm mode. The brokerage's license number. |
|
|
83
|
+
| `zip` | string | no | roster_zip mode. A five digit zip code. |
|
|
84
|
+
| `zips` | string | no | roster_zip batch, one zip per line. |
|
|
85
|
+
| `include_agents` | string | no | roster_zip mode. true also lists each office's active agents. |
|
|
86
|
+
| `active_only` | string | no | Roster modes. Active licenses only. Default true. |
|
|
87
|
+
| `max_results` | string | no | Roster modes. Rows per brokerage or zip, 1 to 1000. Default 100. |
|
|
88
|
+
| `max_charge_usd` | string | no | Optional. The run stops before the row that would take its charges over this amount. |
|
|
89
|
+
|
|
90
|
+
## Pricing
|
|
91
|
+
|
|
92
|
+
Pay per event on Apify, billed to your Apify account. Prices in USD.
|
|
93
|
+
|
|
94
|
+
| Event | Free plan | Bronze | Silver | Gold |
|
|
95
|
+
|---|---|---|---|---|
|
|
96
|
+
| `agent-resolved`, per matched lookup row | $0.005 | $0.00475 | $0.0045 | $0.00425 |
|
|
97
|
+
| `roster-row`, per roster row | $0.002 | $0.0019 | $0.0018 | $0.0017 |
|
|
98
|
+
| `apify-actor-start`, per run start | $0.0005 | $0.000475 | $0.00045 | $0.000425 |
|
|
99
|
+
|
|
100
|
+
Ambiguous, not found, unsupported state, and capped rows are never charged.
|
|
101
|
+
|
|
102
|
+
## Your keys
|
|
103
|
+
|
|
104
|
+
The actor needs no provider key. It reads MMG's own index of the state license registers through a Mamba Labs service and holds no key of its own. Each actor run sends its own Apify run token to that service, which reads the run from the Apify API on every request to confirm it is a live run of this actor. The service caches no result and never stores or logs the token.
|
|
105
|
+
|
|
106
|
+
## Full actor documentation
|
|
107
|
+
|
|
108
|
+
[apify.com/mambalabs/agent-brokerage-resolver](https://apify.com/mambalabs/agent-brokerage-resolver)
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
MIT. See [LICENSE](LICENSE).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
The latest published `1.x` release of
|
|
6
|
+
`@mambalabsdev/mcp-agent-brokerage-resolver` receives security updates.
|
|
7
|
+
|
|
8
|
+
| Version | Supported |
|
|
9
|
+
| ------- | ------------------ |
|
|
10
|
+
| 1.x | :white_check_mark: |
|
|
11
|
+
| < 1.0 | :x: |
|
|
12
|
+
|
|
13
|
+
## Reporting a vulnerability
|
|
14
|
+
|
|
15
|
+
Please do not open a public GitHub issue for security reports.
|
|
16
|
+
|
|
17
|
+
Email security reports to **labs@mambamindsetgrowth.com** with:
|
|
18
|
+
|
|
19
|
+
- a description of the issue and its impact,
|
|
20
|
+
- steps to reproduce, and
|
|
21
|
+
- any relevant logs or proof of concept.
|
|
22
|
+
|
|
23
|
+
We aim to acknowledge reports within 3 business days and to provide a remediation
|
|
24
|
+
timeline after triage. Coordinated disclosure is appreciated.
|
|
25
|
+
|
|
26
|
+
## Handling of credentials
|
|
27
|
+
|
|
28
|
+
This server reads an `APIFY_TOKEN` from the environment and uses it only to call
|
|
29
|
+
the Apify API on your behalf. The token is never logged or written to disk by this
|
|
30
|
+
package. Treat your `APIFY_TOKEN` as a secret and rotate it at
|
|
31
|
+
https://console.apify.com/account/integrations if you believe it has been exposed.
|
package/build/index.js
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const pkg = JSON.parse(readFileSync(join(here, "..", "package.json"), "utf8"));
|
|
10
|
+
// Distinctive UA so Apify run meta.userAgent marks MCP-originated runs.
|
|
11
|
+
const USER_AGENT = `mambalabs-mcp ${pkg.name}@${pkg.version}`;
|
|
12
|
+
// Drop undefined values so optional inputs are not sent to the actor.
|
|
13
|
+
function compact(obj) {
|
|
14
|
+
const out = {};
|
|
15
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
16
|
+
if (v !== undefined)
|
|
17
|
+
out[k] = v;
|
|
18
|
+
}
|
|
19
|
+
return out;
|
|
20
|
+
}
|
|
21
|
+
// How long the actor run itself is allowed to take, in seconds. The suite's
|
|
22
|
+
// slowest measured run on 2026-09-22 was 152 s on a seven platform search, so
|
|
23
|
+
// 1800 s is roughly twelve times that: headroom for a slow day without letting a
|
|
24
|
+
// hung run bill indefinitely.
|
|
25
|
+
const ACTOR_RUN_TIMEOUT_SECS = 1800;
|
|
26
|
+
// How long this wrapper waits for that run, in milliseconds. The actor's own
|
|
27
|
+
// timeout plus two minutes, so the run's own TIMED-OUT status is what the
|
|
28
|
+
// caller sees rather than the wrapper giving up first and reporting nothing.
|
|
29
|
+
const WRAPPER_WAIT_MS = (ACTOR_RUN_TIMEOUT_SECS + 120) * 1000;
|
|
30
|
+
const POLL_INTERVAL_MS = 3000;
|
|
31
|
+
const TERMINAL = new Set(["SUCCEEDED", "FAILED", "TIMED-OUT", "ABORTED", "ABORTING"]);
|
|
32
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
33
|
+
// Shared caller. actorPath is the actor's immutable Apify actor ID (a stable key
|
|
34
|
+
// that survives Store renames). The /v2/acts/{id} endpoint accepts it directly,
|
|
35
|
+
// so a Store rename never breaks these calls.
|
|
36
|
+
//
|
|
37
|
+
// START AND POLL, NOT RUN-SYNC. Apify's synchronous endpoints carry a platform
|
|
38
|
+
// ceiling of 300 seconds on the HTTP wait itself and answer 408 past it whatever
|
|
39
|
+
// the timeout parameter says, so a long run reads as a timeout even though the
|
|
40
|
+
// actor goes on to finish. Starting the run, polling it to a terminal status and
|
|
41
|
+
// then reading the dataset is the only way to wait as long as the actor needs.
|
|
42
|
+
//
|
|
43
|
+
// The token is read here rather than at module load, so the tool registers
|
|
44
|
+
// unconditionally and a server started without APIFY_TOKEN still advertises its
|
|
45
|
+
// capabilities instead of reporting none.
|
|
46
|
+
async function runActor(actorPath, actorLabel, input) {
|
|
47
|
+
const APIFY_TOKEN = process.env.APIFY_TOKEN;
|
|
48
|
+
if (!APIFY_TOKEN) {
|
|
49
|
+
return { isError: true, content: [{ type: "text", text: "APIFY_TOKEN is not set. Create a token at https://console.apify.com/account/integrations and set it as the APIFY_TOKEN environment variable." }] };
|
|
50
|
+
}
|
|
51
|
+
const headers = {
|
|
52
|
+
Authorization: `Bearer ${APIFY_TOKEN}`,
|
|
53
|
+
"Content-Type": "application/json",
|
|
54
|
+
"User-Agent": USER_AGENT,
|
|
55
|
+
};
|
|
56
|
+
const httpError = async (response) => {
|
|
57
|
+
let detail = "";
|
|
58
|
+
try {
|
|
59
|
+
const body = (await response.json());
|
|
60
|
+
if (body?.error?.message)
|
|
61
|
+
detail = ` ${body.error.message}`;
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
detail = "";
|
|
65
|
+
}
|
|
66
|
+
switch (response.status) {
|
|
67
|
+
case 400:
|
|
68
|
+
return `The ${actorLabel} run was rejected as invalid input.${detail}`;
|
|
69
|
+
case 401:
|
|
70
|
+
return "Invalid Apify token. Check your APIFY_TOKEN environment variable.";
|
|
71
|
+
case 402:
|
|
72
|
+
return "Insufficient Apify credits. Check your account balance at https://console.apify.com/billing";
|
|
73
|
+
default:
|
|
74
|
+
return `Apify request to ${actorLabel} failed with status ${response.status}.${detail}`;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
// 1. Start the run.
|
|
78
|
+
let started;
|
|
79
|
+
try {
|
|
80
|
+
started = await fetch(`https://api.apify.com/v2/acts/${actorPath}/runs?timeout=${ACTOR_RUN_TIMEOUT_SECS}`, { method: "POST", headers, body: JSON.stringify(input) });
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
84
|
+
return { isError: true, content: [{ type: "text", text: `Could not reach the Apify API: ${message}` }] };
|
|
85
|
+
}
|
|
86
|
+
if (!started.ok) {
|
|
87
|
+
return { isError: true, content: [{ type: "text", text: await httpError(started) }] };
|
|
88
|
+
}
|
|
89
|
+
let run;
|
|
90
|
+
try {
|
|
91
|
+
run = (await started.json()).data ?? {};
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
95
|
+
return { isError: true, content: [{ type: "text", text: `The ${actorLabel} run start returned a response that could not be parsed: ${message}` }] };
|
|
96
|
+
}
|
|
97
|
+
const runId = run.id;
|
|
98
|
+
if (!runId) {
|
|
99
|
+
return { isError: true, content: [{ type: "text", text: `The ${actorLabel} run start returned no run id, so there is nothing to wait for.` }] };
|
|
100
|
+
}
|
|
101
|
+
// 2. Poll to a terminal status.
|
|
102
|
+
const deadline = Date.now() + WRAPPER_WAIT_MS;
|
|
103
|
+
let status = run.status ?? "READY";
|
|
104
|
+
let datasetId = run.defaultDatasetId;
|
|
105
|
+
while (!TERMINAL.has(status)) {
|
|
106
|
+
if (Date.now() >= deadline) {
|
|
107
|
+
return {
|
|
108
|
+
isError: true,
|
|
109
|
+
content: [{ type: "text", text: `The ${actorLabel} run ${runId} was still ${status} after ${Math.round(WRAPPER_WAIT_MS / 1000)} seconds and this call stopped waiting. The run itself is still on Apify: read it at https://console.apify.com/actors/runs/${runId}` }],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
await sleep(POLL_INTERVAL_MS);
|
|
113
|
+
let poll;
|
|
114
|
+
try {
|
|
115
|
+
poll = await fetch(`https://api.apify.com/v2/actor-runs/${runId}`, { headers });
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
119
|
+
return { isError: true, content: [{ type: "text", text: `Lost contact with the Apify API while waiting for ${actorLabel} run ${runId}: ${message}` }] };
|
|
120
|
+
}
|
|
121
|
+
if (!poll.ok) {
|
|
122
|
+
return { isError: true, content: [{ type: "text", text: await httpError(poll) }] };
|
|
123
|
+
}
|
|
124
|
+
const body = (await poll.json());
|
|
125
|
+
status = body.data?.status ?? status;
|
|
126
|
+
datasetId = body.data?.defaultDatasetId ?? datasetId;
|
|
127
|
+
}
|
|
128
|
+
// 3. A run that did not succeed is a failure the caller must see, never an
|
|
129
|
+
// empty success. Surfacing it here is what keeps a crashed run from reading
|
|
130
|
+
// as "no results found".
|
|
131
|
+
if (status !== "SUCCEEDED") {
|
|
132
|
+
return {
|
|
133
|
+
isError: true,
|
|
134
|
+
content: [{ type: "text", text: `The ${actorLabel} run did not succeed (run ID: ${runId}, status: ${status}).` }],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
if (!datasetId) {
|
|
138
|
+
return { isError: true, content: [{ type: "text", text: `The ${actorLabel} run ${runId} succeeded but reported no dataset, so there is nothing to return.` }] };
|
|
139
|
+
}
|
|
140
|
+
// 4. Read the dataset.
|
|
141
|
+
let ds;
|
|
142
|
+
try {
|
|
143
|
+
ds = await fetch(`https://api.apify.com/v2/datasets/${datasetId}/items?format=json`, { headers });
|
|
144
|
+
}
|
|
145
|
+
catch (err) {
|
|
146
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
147
|
+
return { isError: true, content: [{ type: "text", text: `Could not read the ${actorLabel} dataset: ${message}` }] };
|
|
148
|
+
}
|
|
149
|
+
if (!ds.ok) {
|
|
150
|
+
return { isError: true, content: [{ type: "text", text: await httpError(ds) }] };
|
|
151
|
+
}
|
|
152
|
+
let items;
|
|
153
|
+
try {
|
|
154
|
+
items = await ds.json();
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
158
|
+
return { isError: true, content: [{ type: "text", text: `The ${actorLabel} run returned a response that could not be parsed: ${message}` }] };
|
|
159
|
+
}
|
|
160
|
+
if (!Array.isArray(items)) {
|
|
161
|
+
const asObj = items;
|
|
162
|
+
const detail = asObj?.error?.message
|
|
163
|
+
? `${asObj.error.message}`
|
|
164
|
+
: JSON.stringify(items);
|
|
165
|
+
return { isError: true, content: [{ type: "text", text: `The ${actorLabel} run did not return a dataset. ${detail}` }] };
|
|
166
|
+
}
|
|
167
|
+
return { content: [{ type: "text", text: JSON.stringify(items, null, 2) }] };
|
|
168
|
+
}
|
|
169
|
+
const server = new McpServer({
|
|
170
|
+
name: "mamba-agent-brokerage-resolver",
|
|
171
|
+
version: pkg.version,
|
|
172
|
+
});
|
|
173
|
+
// Agent to Brokerage Resolver (immutable actor ID ePRRGLxOGyaVHO4dI). Every buyer facing input of the
|
|
174
|
+
// actor is exposed. The actor takes every input as a string, so the tool does too.
|
|
175
|
+
server.registerTool("resolve_agent_brokerage", {
|
|
176
|
+
title: "Resolve agent brokerage",
|
|
177
|
+
description: "Look up a licensed US real estate agent on the official state license register and get the brokerage of record, the brokerage's active agent count and size band (1, 2-15, 16-50, 51+), and the agent's license status and expiry. Covers 19 states; brokerage data in CA, IA, MO, NV, NY, OH, OR, TX, and VT. Three modes: lookup (one agent or a list, by license number or by name), roster_firm (active agents at one brokerage), and roster_zip (brokerage offices in a zip code, NY, MO, OR, and VT). Returns no emails, phone numbers, or home addresses. Ambiguous or unmatched inputs return a free row with row_status explaining why. A run that does not succeed is returned as an error with its run ID. Read-only; requires an APIFY_TOKEN and consumes Apify credits per matched row.",
|
|
178
|
+
annotations: {
|
|
179
|
+
title: "Resolve agent brokerage",
|
|
180
|
+
readOnlyHint: true,
|
|
181
|
+
destructiveHint: false,
|
|
182
|
+
idempotentHint: true,
|
|
183
|
+
openWorldHint: true,
|
|
184
|
+
},
|
|
185
|
+
inputSchema: {
|
|
186
|
+
mode: z.enum(["lookup", "roster_firm", "roster_zip"])
|
|
187
|
+
.optional()
|
|
188
|
+
.describe("lookup finds one agent or a list. roster_firm lists the active agents at one brokerage. roster_zip lists brokerage offices in a zip code (NY, MO, OR, VT). Default lookup."),
|
|
189
|
+
state: z.string()
|
|
190
|
+
.optional()
|
|
191
|
+
.describe("Two letter licensing state, for example TX. Used with license_number, agent_name, or the brokerage fields."),
|
|
192
|
+
license_number: z.string()
|
|
193
|
+
.optional()
|
|
194
|
+
.describe("Lookup mode. The agent's license number as the state register prints it, for example 134224-SA. The most reliable lookup."),
|
|
195
|
+
agent_name: z.string()
|
|
196
|
+
.optional()
|
|
197
|
+
.describe("Lookup mode, when there is no license number. First and last name. Add brokerage_name or city to narrow a common name."),
|
|
198
|
+
brokerage_name: z.string()
|
|
199
|
+
.optional()
|
|
200
|
+
.describe("Lookup mode: narrows a name match. roster_firm mode: the brokerage to list, by its exact registered name."),
|
|
201
|
+
city: z.string()
|
|
202
|
+
.optional()
|
|
203
|
+
.describe("Lookup mode: narrows a name match by the brokerage office city or the license county."),
|
|
204
|
+
licenses: z.string()
|
|
205
|
+
.optional()
|
|
206
|
+
.describe("Lookup mode, many at once. One per line: state then license number, for example TX 0123456."),
|
|
207
|
+
agents: z.string()
|
|
208
|
+
.optional()
|
|
209
|
+
.describe("Lookup mode, many at once. One per line: state | name | brokerage (optional) | city (optional)."),
|
|
210
|
+
brokerage_license_number: z.string()
|
|
211
|
+
.optional()
|
|
212
|
+
.describe("roster_firm mode. The brokerage's license number."),
|
|
213
|
+
zip: z.string()
|
|
214
|
+
.optional()
|
|
215
|
+
.describe("roster_zip mode. A five digit zip code."),
|
|
216
|
+
zips: z.string()
|
|
217
|
+
.optional()
|
|
218
|
+
.describe("roster_zip mode, many at once. One zip code per line."),
|
|
219
|
+
include_agents: z.enum(["true", "false"])
|
|
220
|
+
.optional()
|
|
221
|
+
.describe("roster_zip mode. true also lists the active agents at each office. Default false."),
|
|
222
|
+
active_only: z.enum(["true", "false"])
|
|
223
|
+
.optional()
|
|
224
|
+
.describe("Roster modes. List only agents with an active license. Default true."),
|
|
225
|
+
max_results: z.string()
|
|
226
|
+
.optional()
|
|
227
|
+
.describe("Roster modes. Most rows one brokerage or zip returns, 1 to 1000. Default 100."),
|
|
228
|
+
max_charge_usd: z.string()
|
|
229
|
+
.optional()
|
|
230
|
+
.describe("Optional. The run stops before the row that would take its charges over this amount."),
|
|
231
|
+
},
|
|
232
|
+
}, async (args) => runActor("ePRRGLxOGyaVHO4dI", "Agent to Brokerage Resolver", compact(args)));
|
|
233
|
+
const transport = new StdioServerTransport();
|
|
234
|
+
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mambalabsdev/mcp-agent-brokerage-resolver",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "MCP server for Agent to Brokerage Resolver. Look up a licensed US real estate agent on the official state register and get the brokerage of record, its active agent count and size band, and license status. 19 states; firm and zip rosters. No emails or phones. Runs on Apify. Clay-ready output.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"mcp-agent-brokerage-resolver": "./build/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"build",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"SECURITY.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc && chmod +x build/index.js",
|
|
17
|
+
"test": "npm run build && node --test test/*.test.js",
|
|
18
|
+
"prepublishOnly": "npm run build"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"mcp",
|
|
22
|
+
"model-context-protocol",
|
|
23
|
+
"real-estate",
|
|
24
|
+
"realtor",
|
|
25
|
+
"brokerage",
|
|
26
|
+
"license-lookup",
|
|
27
|
+
"real-estate-agents",
|
|
28
|
+
"apify",
|
|
29
|
+
"clay",
|
|
30
|
+
"lead-generation"
|
|
31
|
+
],
|
|
32
|
+
"author": "Mamba Labs <labs@mambamindsetgrowth.com>",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"homepage": "https://apify.com/mambalabs/agent-brokerage-resolver",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/mambalabsdev/mcp-agent-brokerage-resolver"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@modelcontextprotocol/sdk": "^1.32.0",
|
|
44
|
+
"zod": "^4.4.3"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^26.2.0",
|
|
48
|
+
"typescript": "5.9.3"
|
|
49
|
+
},
|
|
50
|
+
"mcpName": "com.mambabuilt/mcp-agent-brokerage-resolver"
|
|
51
|
+
}
|