Contact usTry for free
Developer documentation API keys
Developers/MCP server

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.

SettingValue
TransportStreamable HTTP using POST
Server URLhttps://targetwise.ai/mcp
AuthenticationAuthorization: Bearer YOUR_TARGETWISE_KEY
Content-Typeapplication/json
Acceptapplication/json, text/event-stream
Required host capabilityCustom 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.

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.

Initialize
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.

Confirm initialization
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.

Call a tool
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.

Stateless tools/list
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.

Host-side result handling · JavaScript
// 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 ruleReason
Allow only the tools needed for the taskA meeting brief may need company context without revealing phone numbers.
Set a maximum number of calls and pagesMetered lookups can consume credits. Avoid recursive searches.
Select candidates before enrichmentAn entire search page is not automatically an enrichment queue.
Keep missing fields explicitNo match, unknown phone type and unavailable provenance are valid results.
Apply your own merge and action rulesRetrieval 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.

Common questions