Tvijo wiki
Catalog

Topics

MCP vs API vs function calling: which does your AI integration need?

Use a direct API for fixed requests, function calling for model-selected actions, and MCP for tools shared across compatible clients. Learn the trade-offs and safe setup.

🎯 For Developers and technical leads choosing how an AI assistant should access external services, tools or editor workflows.

πŸ“š You will learn
  • Distinguish API access, function calling and MCP
  • Choose a direct request or shared MCP server
  • Connect and verify a tool with limited access
  • Recognize failure modes and Tvijo release boundaries

Use a direct REST API call for a fixed service request, function calling when a model must choose an operation, and MCP to expose reusable tools to compatible AI clients. You usually do not need MCP for a single API call. These mechanisms can work together.

What it can do

The useful comparison is about responsibilities. An API exposes a service interface. REST APIs organize access around resources and HTTP operations; Microsoft's REST design guidance explains that resource model. Function calling connects a model's structured request to an operation. The MCP specification defines communication between an AI application and servers offering tools and context.

Mechanism Responsibility Suitable example
Direct REST API call Your application selects the request Fetch the status of a known support ticket
Function calling A model requests a defined operation with structured arguments Decide whether a request needs a ticket lookup
MCP server Expose capabilities through a common client/server protocol Make ticket lookup available to compatible editor clients

Technical documentation linked here was checked on 30 Oct 2026. For background, see what MCP is and the AI agents explained category.

Direct API access for a fixed task

Suppose a scheduled job must retrieve the status of a known ticket and save it in a report. Prefer application code that calls the documented endpoint and checks the response. There is no decision for a model to make about which operation to run.

This is an architectural recommendation: start with the interface your task needs. Before introducing another service, name the recurring client requirement that it would solve. A script used by one application is a reasonable place to keep a direct integration.

Function calling for a model-selected action

Now suppose a user asks whether an issue is resolved, without supplying a ticket identifier. You might define ticket search and ticket lookup operations, with explicit input schemas, following the official tool-definition guidance. In the client-tool pattern, the model returns a structured request; application code executes it and returns the result. The official tool-use guide documents this loop and distinguishes client execution from provider-hosted tools.

For your own application, keep authorization and argument validation in the execution path. A correctly shaped request still needs a permission check. Design the assistant's response around the returned ticket evidence rather than treating its requested action as completed work.

MCP for capabilities shared across clients

Consider a team that wants the same ticket integration in different compatible AI editors. An MCP server can present a shared tool interface. The MCP tools specification defines tool discovery, input schemas and invocation; tool implementations can call APIs, query databases or perform calculations.

A possible design is:

user request β†’ model tool request β†’ host's MCP client β†’ MCP server β†’ service API

This is an illustrative architecture, not a requirement to include every component. Prefer MCP when reusing the interface across clients justifies maintaining a server. For a concrete integration target, see the Postgres database MCP guide.

How to connect it safely

  1. Define the allowed outcome. Start with a ticket lookup in a test workspace. Write down which account and records it may access, what it must return, and which changes are forbidden. Use the MCP security checklist to review the boundary.
  2. Choose the smallest suitable integration. Keep a fixed request in application code. Add a callable operation if the model must select it. Choose MCP if a compatible client needs the server's capabilities. For a direct integration, test the underlying request independently before involving the assistant.
  3. Review the connection before starting it. In an MCP-capable VS Code setup, run MCP: Add Server and select the publisher's endpoint or launch command. Inspect the publisher, arguments and configuration destination. Local servers execute code where they run; follow the official VS Code setup instructions, including runtime prerequisites.
  4. Authenticate with limited access. Use the publisher's documented sign-in method and permissions appropriate to the test; the MCP security guidance explains why permission scope matters. Keep credentials out of chat and committed configuration. Review startup and tool approvals; avoid granting broad access simply to get past a failed lookup.
  5. Verify the actual operation. Ask for an existing ticket's status without changes. Inspect the tool call, arguments and returned output. Confirm the intended server handled the request. A plausible answer is insufficient evidence that the connection worked, as the VS Code guide emphasizes.
  6. Test rejection before enabling writes. Try a lookup outside the permitted records and confirm it fails. For any later mutation, decide how approval and failure recovery work before authorizing it. The MCP tools specification requires input validation and access controls; it does not replace your acceptance criteria.

When this does not work

A shared protocol does not guarantee identical client support. Check the current documentation for the exact client, server and configuration method. The VS Code management guide distinguishes server trust, authentication, tool availability and action approval. Installing a server is therefore only part of setup, not proof that your chosen workflow can use it.

MCP is not a security boundary by itself. The MCP security guidance describes consent and authorization risks that implementations must address. Review what the host can share and what the server can execute. Do not treat a tool description as sufficient evidence of safe behavior.

Discovery and execution can fail separately. A listed tool may still return an API, validation or business-rule error. The tools specification distinguishes protocol errors from execution errors. Inspect that result before accepting the assistant's summary. If the service's behavior after a timeout is unclear, check the current documentation before repeating a write.

A server needs an owner. As a deployment decision, assign responsibility for authentication, compatibility changes and incident handling. If the only proposed benefit is wrapping a fixed request already maintained in your application, keep the direct API path until a concrete reuse requirement appears.

Where Tvijo fits

As of 30 Oct 2026, the DSHREM VS Code extension is an editor entry for Tvijo tasks. TvijoCode embeds the extension in a test build. These editor entry points do not establish general-purpose REST API connectivity or a released function-calling interface for arbitrary services.

Tvijo's technology map describes published MCP consultation: compatible external clients can call Tvijo. This does not automatically give the Tvijo editor access to other MCP servers. The MCP release-status article separates prepared supplied-diff review from package publication; editor MCP integration and delegation remain planned. An MCP server makes sense when another compatible client needs to call Tvijo. For a fixed external-service request inside a task, direct application code may suffice, provided that service's API and authorization are documented.

The Tvijo workspace offers, as of 30 Oct 2026, show Try at $0: up to 5 tasks, 50,000 tokens or $0.05 of sponsored usage, whichever is reached first, from a shared $1 daily pool funded by TVIJO. Service credit is shown as $10 for requesting prepaid credit, with metered provider usage plus an 8% service markup. Payment collection is not activated; creating an order is not a charge.

FAQ

Does MCP replace REST APIs?

No. An MCP tool can use a REST API underneath. Choose the service interface and the client-facing tool interface according to their separate responsibilities.

Is MCP the same as function calling?

No. Function calling expresses a model's request for an operation. MCP standardizes the client/server interface for discovering and invoking capabilities. A host can connect the two.

Do I need MCP for a single API request?

Usually not. Start with a direct request when application code already knows the operation. Reconsider MCP when a compatible client needs the capability or repeated integrations justify a shared server.

Sources

Source links and observation dates are recorded below. Review status is stated for each material.

  1. Model Context Protocol specification Β· Checked 2026-10-30 Β· Defines hosts, clients and servers, context and tool capabilities, and implementer responsibilities for consent and security.
  2. MCP specification: Tools Β· Checked 2026-10-30 Β· Confirms tool discovery and invocation, input schemas, API-backed tools, error types, validation and access-control requirements.
  3. Claude Platform Docs: Tool use overview Β· Checked 2026-10-30 Β· Official function/tool calling documentation confirming structured requests, application-executed client tools, returned results and the distinction from hosted tools. Used for mechanics; examples in the article are vendor-neutral.
  4. Microsoft Learn: RESTful web API design Β· Checked 2026-10-30 Β· Confirms REST resource interfaces, HTTP operations and resource representations.
  5. Visual Studio Code: Add MCP servers Β· Checked 2026-10-30 Β· Confirms MCP: Add Server, endpoint and command options, configuration review, runtime and authentication prerequisites, and verification through actual tool output.
  6. Claude Platform Docs: Define tools Β· Checked 2026-10-30 Β· Confirms that custom tool definitions describe operations and expected arguments using input schemas.
  7. Model Context Protocol: Security best practices Β· Checked 2026-10-30 Β· Confirms that implementations must address consent, authorization, local-server risk and permission scope.
  8. Visual Studio Code: Manage and troubleshoot MCP servers Β· Checked 2026-10-30 Β· Distinguishes server trust, authentication, tool availability and individual-action approval; documents configuration and troubleshooting controls.

πŸ”— Article connections

Open the full knowledge graph β†—

Published article links. Select a node to open its article at the heading.

100%
β†’ Linked articles← Linked fromβ‹― Same topic
Article links Β· keyboard / text view

πŸ’¬ Comments

Comments are public and moderated. Do not post personal data.
  • No comments yet. Be the first!

Next steps