Decision guide

MCP vs In-App Tool Calling

Should your agent's tools be defined in your app, served over MCP, or not be model tools at all?

Side by side

CriterionIn-app tool definitionsLocal MCP server (stdio)Remote MCP server (HTTP)Plain API call in code
Who decides to call itThe modelThe modelThe modelYour code
Reuse across appsCopy per appAny MCP host on the machineAny authorised MCP clientLibrary or service reuse
Auth and permissionsYour app's sessionLocal credentials; sandbox the processOAuth resource server; per-client scopesYour app's session
Latency and moving partsLowestProcess hopNetwork hop, another serviceLowest
Security riskYour code onlyThird-party servers run locally: review themNetwork exposure; token handlingLowest

When to choose each

In-app tool definitions

Define tools (name, description, JSON schema) in your application and run them in-process when the model asks.

Choose when

  • One app uses the tools
  • Tools need the app's own context (user session, permissions)
  • Lowest latency and fewest moving parts

Avoid when

  • Several apps need the same integrations

Local MCP server (stdio)

Wrap a system in an MCP server that the host app starts as a subprocess and talks to over stdio.

Choose when

  • Developer tools and desktop apps (IDEs, coding agents)
  • Reusing community or vendor MCP servers locally

Avoid when

  • Shared servers for many users (each user runs their own)

Remote MCP server (HTTP)

Run the MCP server as a network service (Streamable HTTP) with OAuth, used by many clients.

Choose when

  • Many AI apps or teams need the same system
  • Central auth, rate limits, auditing and versioning per integration

Avoid when

  • A single app where a network hop adds no value

Plain API call in code

Your code calls the API itself at a fixed step; the model never decides whether to call it.

Choose when

  • The step always happens (fetch the user's profile before answering)
  • Deterministic workflows

Avoid when

  • The model must choose between many actions based on the conversation

Verdict

Use plain code for steps that always happen, in-app tools when one application owns the integration, and MCP when the same integration should serve many apps: local stdio servers for developer tools, remote servers with OAuth for shared, governed integrations. Whatever the transport, design tools for agent tasks, keep outputs small and require approval for destructive actions.

Learn more

Sources

Was this page helpful?