← All guides

Locus product guide · Updated

MCP vs API vs SDK for AI Agent Tools

Use MCP when an agent client should discover and call tools dynamically. Use the HTTP API when application code needs direct control over requests. Use the Locus server SDK when you want typed application integration around that API. These are access interfaces; they do not replace account permissions, tool pricing, or billing attribution.

Compare the integration paths

Choose the interface around who selects the operation and where the credential lives. A client chat, an unattended runtime, and an application backend have different needs.

Compare the integration paths
DecisionHosted MCPHTTP APIServer SDK
Best fitInteractive or autonomous tool discoveryDirect requests in any HTTP-capable languageTyped server-side product integration
Operation selectionAgent discovers permitted toolsYour code selects a documented operationYour code selects a documented operation
CredentialBrowser OAuth or an authorized scoped Agent ConnectionCredential appropriate to the caller and accountServer-side secret or supported scoped credential
Customer billingUse a connection with the intended account attributionPass the supported end-user attributionPass the supported end-user attribution
Failure handlingAgent must inspect results and errorsYour code handles errors and retriesYour code handles errors and retries

MCP: let the agent select a capability

MCP is useful when a task may require different tools depending on what the agent learns. A research task might begin with web search, then need a page extraction or a company lookup. Locus provides a hosted connection and a searchable catalog rather than asking you to configure each managed provider separately.

Discovery is not a promise that every result is usable by the current credential. The catalog, enabled tools, scopes, balance, and operation-specific requirements determine what can execute. The agent should inspect the returned schema and authorization requirements before making a paid call.

API and SDK: make application behavior explicit

Direct HTTP access fits a backend that already knows the operation it needs, including services written outside JavaScript. The server SDK is useful when a JavaScript or TypeScript product wants a supported wrapper for requests and billing responses. Consult the API and SDK references for current method signatures rather than treating a provider API as a drop-in replacement.

For an enterprise product, establish the end-user identity before making the call. Pool-funded calls and customer-funded calls have different economics. An absent customer identifier must not accidentally shift a charge to the workspace when your product intended to bill an end user.

Keep the same acceptance checks across interfaces

Check useful response content, effective price, attribution, and recorded activity through the interface you plan to ship. Reuse the same idempotency key when retrying the same logical operation. A new key represents a new operation and may create another charge.

Test low balances, disallowed operations, upstream failure, and timeouts in addition to successful requests. Sandbox verification is useful for integration logic, but it cannot establish that an external provider currently returns useful data.

Frequently asked questions

Is MCP a billing protocol?

MCP connects clients to tools. Locus Pro supplies the account, credit balance, tool authorization, metering, and billing around supported calls.

Can I use MCP and an SDK in the same product?

Yes, when each caller uses the appropriate supported credential and attribution. Validate that both paths charge the intended account or end user.

Implementation references

Use these first-party references for current request contracts and account requirements. Tool availability, prices, and negotiated terms can change.

Related guides