Developers › MCP
Developer Reference MCP — leadval-mcp (npm) A local MCP server that runs beside your own agent, authenticated with your ingestion key. It does the conversational half of the job: tell LeadLogiX a conversation finished, poll it, and ask whether the caller is someone you already know. The hosted server does the other half — reading scored leads and customer histories back.
How it differs from the hosted server It runs on your machine over stdio with your own ingestion key and acts on your own workspace; the hosted server runs at LeadLogiX and reads a customer's workspace over OAuth. The full comparison is on MCP → Hosted server . They are two halves of one flow: a returning-customer agent asks leadval_identity_lookup here, then reads the history back with the hosted server's get_customer_profile or get_lead — Recognise a returning customer . Install it in one line npx -y leadval-mcp resolves — the package is on npm and the block below uses it. Nothing to clone and nothing to build. If you would rather run a local checkout, point "command": "node" at the absolute path of packages/leadval-mcp/dist/index.js instead. Do not ship this to your customers It authenticates with an ingestion key, which is a workspace-wide credential. Asking a customer to paste one into their AI client hands you — and their client — more access than any OAuth grant would, with no consent screen and no way for them to see it later. For anything other people install, use the hosted server.
Configure it Two environment variables: LEADVAL_BASE_URL (your LeadLogiX host, https:// — plain http:// is accepted only for localhost ) and LEADVAL_API_KEY . Both are required; the server reports a clear configuration error rather than failing per call. MCP client configuration { "mcpServers": { "leadval": { "command": "npx", "args": ["-y", "leadval-mcp"], "env": { "LEADVAL_BASE_URL": "https://your-leadval-host", "LEADVAL_API_KEY": "val_key__…" } } } } That block goes in your MCP client's configuration file — the mcpServers section of a desktop AI assistant's configuration, or the equivalent in Cursor and other clients that speak stdio MCP.
The four tools Tool What it does leadval_notify_session Tells LeadLogiX a finished conversation is ready to score. Idempotent — re-notifying the same sessionId never re-queues. leadval_get_session_status Polls conformance and processing state. Never returns PII, score or price, so it is safe to log. leadval_process_and_wait Notifies, then polls until the session reaches a terminal state or the timeout expires. The convenience path while you are developing. leadval_identity_lookup Asks, mid-conversation , whether this workspace has spoken to this person before. Returns pointers — a lead id, and a customer profile id where their conversations have been merged — never customer data. ⚠ Read nameUse on the row you act on: PERMITTED or WITHHOLD , with nameUseReason . It is the same field get_customer_profile returns per conversation, so one rule covers both. corroboratedBy is evidence and tone, never permission. It notifies; it does not upload The conversation must already be in your workspace's raw lead storage under that sessionId , written by your AI Agent. These tools are the same notify-then-poll flow as the Quickstart , wrapped so an assistant can drive it. It submits real sessions: sandbox runs need a login handshake, so test in the API Playground .