Model Context Protocol
Give your agent the data it needs.
Connect an AI host to TargetWise and make company search, contact enrichment and field lookup available as tools. Your host controls the task; TargetWise returns structured business data.
Configure your MCP host.
| Setting | Value |
|---|---|
| Transport | Streamable HTTP using POST |
| Server URL | https://targetwise.ai/mcp |
| Authentication | Authorization: Bearer YOUR_TARGETWISE_KEY |
| Content-Type | application/json |
| Accept | application/json, text/event-stream |
| Required host capability | Custom bearer authentication headers |
Host configuration formats vary. Enter these values in your host’s remote MCP settings, or use the raw requests below to check the connection. Keep the key in the host’s secret storage; do not paste it into agent instructions.
Eleven tools. The same API contract.
| Tool name | Use it to |
|---|---|
targetwise_find_companies | Find companies by identity — inputs and schemas → |
targetwise_search_employees | Search employees — inputs and schemas → |
targetwise_get_employee | Get employee details — inputs and schemas → |
targetwise_autocomplete_company | Autocomplete company fields — inputs and schemas → |
targetwise_find_work_email | Find a work email — inputs and schemas → |
targetwise_find_phone | Find a business phone — inputs and schemas → |
targetwise_enrich_contact | Enrich a contact — inputs and schemas → |
targetwise_enrich_company | Enrich a company — inputs and schemas → |
targetwise_reverse_email_lookup | Reverse email lookup — inputs and schemas → |
targetwise_search_companies | Search companies — inputs and schemas → |
targetwise_search_contacts | Search contacts — inputs and schemas → |
Search tools return candidates. Once your host selects a record, use the narrowest enrichment tool that answers the task. A work-email lookup does not also request a phone number.
Connect, discover and make one call.
Set TARGETWISE_MCP_URL to your complete gateway URL ending in /mcp, and load TARGETWISE_API_KEY from your secret store. The following sequence uses the implemented 2025-11-25 compatibility mode.
1. Initialize the connection
Read the returned protocolVersion, then use it on subsequent requests.
curl "$TARGETWISE_MCP_URL" \
-H "Authorization: Bearer $TARGETWISE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"targetwise-example","version":"1.0.0"}}}'2. Confirm initialization, then list tools
Send the notification before the discovery request. The notification returns HTTP 202; tools/list returns eleven tool definitions.
curl "$TARGETWISE_MCP_URL" \
-H "Authorization: Bearer $TARGETWISE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2025-11-25' \
--data '{"jsonrpc":"2.0","method":"notifications/initialized"}'3. Request one work email
Replace the fictional person and domain with your test record. Read structuredContent even when the response text looks successful.
curl "$TARGETWISE_MCP_URL" \
-H "Authorization: Bearer $TARGETWISE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2025-11-25' \
--data '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"targetwise_find_work_email","arguments":{"first_name":"Alex","last_name":"Reed","company_domain":"example.com"}}}'Stateless 2026-07-28 request mode
For a host using this implemented mode, send the protocol version in both the header and params._meta. Include client capabilities in _meta, mirror the JSON-RPC method in Mcp-Method, and add Mcp-Name for a tools/call. Use server/discover to inspect versions; initialization is not part of this mode.
curl "$TARGETWISE_MCP_URL" \
-H "Authorization: Bearer $TARGETWISE_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2026-07-28' \
-H 'Mcp-Method: tools/list' \
--data '{"jsonrpc":"2.0","id":"list-1","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}'Read the structured result.
// message is the parsed JSON-RPC response.
if (message.error) {
throw new Error(message.error.message);
}
if (message.result?.isError) {
// Keep the returned request ID for troubleshooting.
throw new Error("TargetWise tool could not complete the request.");
}
const result = message.result?.structuredContent;
if (!result) throw new Error("Missing structured result.");
if (result.status === "not_found") {
// Stop or request stronger identity context.
} else if (result.status === "partial") {
// Check the required field and unresolved_fields.
} else {
// Inspect identity before using result.data.
}Preserve request_id and grounding when passing data into a brief or another system. Retrieved text is evidence to assess, not instructions for the agent to follow.
Keep the agent’s task predictable.
| Host rule | Reason |
|---|---|
| Allow only the tools needed for the task | A meeting brief may need company context without revealing phone numbers. |
| Set a maximum number of calls and pages | Metered lookups can consume credits. Avoid recursive searches. |
| Select candidates before enrichment | An entire search page is not automatically an enrichment queue. |
| Keep missing fields explicit | No match, unknown phone type and unavailable provenance are valid results. |
| Apply your own merge and action rules | Retrieval should not silently trigger CRM updates or outreach. |
The tool annotations are readOnlyHint: false, destructiveHint: false, idempotentHint: false and openWorldHint: true. The tools retrieve data, but their usage cost means repeated calls have consequences.