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

How do MCP, API, and SDK access compare?

The difference is who picks the operation and where the credential lives. A client chat, an unattended runtime, and an application backend have different needs.

How do MCP, API, and SDK access compare?
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

When should an agent use MCP?

Use MCP when the right tool depends on what the agent learns mid-task. A research task might start with web search, then need a page extraction or a company lookup. Locus gives you one hosted connection and a searchable catalog, so you do not configure each managed provider.

Discovery does not mean the current credential can run every result. The catalog, enabled tools, scopes, balance, and operation requirements decide what executes. The agent should read the schema and authorization requirements before a paid call.

When should I use the HTTP API or server SDK?

Use the HTTP API when your backend already knows the operation it needs, in any language. Use the server SDK when a JavaScript or TypeScript product wants a supported wrapper for requests and billing responses. Check the API and SDK references for current method signatures; a provider API is not a drop-in replacement.

For an enterprise product, identify the end user before the call. Pool-funded and customer-funded calls have different economics. A missing customer identifier must not shift a charge to the workspace when you meant to bill an end user.

What should I test before shipping either path?

Test 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 is a new operation and may create another charge.

Also test low balances, disallowed operations, upstream failures, and timeouts. Sandbox tests check integration logic, but they cannot show that an external provider returns useful data today.

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