MCP or an API: how should you connect your AI tools?
Understand when to use an agent plugin or MCP connection and when to integrate the Xava Inference API directly into your application.
Use an agent plugin or MCP connection when you want an existing AI assistant to discover and call tools. Use the API directly when your own application controls requests, responses, and the user experience. Xava Inference supports both paths; choose the one that matches where your workflow runs.
There are two common starting points for an AI workflow: an assistant you already use, or an application you are building. The connection you choose should fit that starting point.
An agent connection helps an assistant use available tools. A direct API integration gives your application control over each request. You can use both in the same project for different jobs.
When should you use an agent connection?
Choose this path when you work inside a supported coding agent or assistant and want to ask it to perform tasks using Xava Inference models. The agent setup page provides the install instructions for supported clients.
An agent can discover tools for finding models, checking prices, and generating supported content. Your client determines how it asks for permission and presents tool results. Read the setup instructions for the client you actually use.
This can be useful for tasks such as exploring image-generation options during development or testing model behavior while building an application. You can describe the goal in your existing workspace without writing a separate user interface for each trial.
What role does MCP play?
MCP gives compatible assistants a way to discover and call tools exposed by a server. Xava Inference offers a remote MCP server alongside agent plugins. The MCP documentation explains the connection and available tools.
The assistant's underlying conversation model and the models it calls through tools are separate choices. Connecting a generation tool does not, by itself, change the model that runs your assistant's conversation.
Use the agent guide for setup details, sign-in instructions, and client-specific behavior. Keep authentication in the client's supported sign-in flow rather than pasting credentials into a prompt or a shared document.
When should you use the API directly?
Use the API when your application needs to control the inputs, output handling, and user experience. Your backend chooses a model, submits a request, and processes the result.
This is a natural fit for a customer-facing feature, an automated processing workflow, or an evaluation that runs the same requests repeatedly. The quickstart shows how to connect. The API reference describes the supported endpoints.
| Your workflow | A useful starting point |
|---|---|
| Ask a coding assistant to generate an asset | Agent plugin or MCP connection. |
| Add model output to your application's interface | Direct API integration. |
| Explore tools inside an existing assistant | Agent setup instructions for that client. |
| Run repeatable tests from a script | Direct API integration and an evaluation set. |
These are starting points, not restrictions. An application can include an agent and also call models directly for a well-defined processing step.
What should you verify before using either path?
Confirm that the selected model supports your task, that your account has the required balance, and that you know how to handle failures. Check the model catalog for current options and the billing guide for payment details.
For an agent connection, verify which tools the client exposes and how it handles tool approvals. For an API integration, keep the key on the server and test authentication, request parameters, output parsing, and errors.
If your goal is to compare models first, use our model selection guide. If you are moving an existing OpenAI-style integration, read what OpenAI compatibility means.
Frequently asked questions
Does connecting MCP replace my assistant's model?
No. An MCP connection exposes tools for the assistant to call. The model running the assistant's conversation is configured separately from the models a tool can invoke.
Do I need to build an MCP server to use Xava Inference?
No. Use a supported agent plugin or connect to the provided remote server using the MCP setup guide. For your own application, you can integrate the API directly.
Can the same project use both MCP and the API?
Yes. You might use an agent connection during development and a direct API integration in the application. Verify each path independently and use the documented authentication flow for it.



