Connect tools with MCP

A common protocol to discover tools, access resources and connect applications.

MCP allows you to connect a AI application with tools and data using a common contract. To understand that, it separates three questions: who decides what to do, who transports request and who conduct the operation.

Key concepts

Model Context Protocol (MCP) standardizes how outside capabilities are found and used. It reduces particular integration between each application and each system but does not remove configuration, credentials, policies and support differences. A supported server doesn't automatically get permission to read all your files or modify your accounts.

The host It's the application that manages the interaction and the context. Inner the host, a MCP client keeps the connection with a MCP serverThat exposes skills. A host can use several customers to connect to several servers. The LLM and the agent's loop continue to have its function: MCP does not by itself give thought or replace orchestration.

Module Objectives

3 server capabilities

Capacity What does it provide? Example of support
Tools Operations with inputs described by a scheme. consultar_pedido Reforms his state.
Resources Information that the application can incorporate as a context. A return policy identified by URI.
Prompts Reusable templates that the user can select. A template to prepare an incidence diagnosis.

It's about tools controlled by the model because the model can decide to apply for them. The application and server retain execution controls. Resources are run by the application and prompts are offered for user choice. These terms describe the interplay pattern and do not give unrestricted authority. The server capacity documentation details the distinction.

Connection, messages and transport

Version and capabilities are agreed at the establishment of the connection. The client can then discover tools with tools/list and invoking them with tools/call. The scheme communicates names, purposes and arguments. The responses indicate results or errors. MCP uses JSON-RPC-based messages that link requests and identifier responses. A notification does not require the same response exchange as a request.

with stdio, client and server are communicated by the standard input and output of a local process. with Streamable HTTPThe client is connected to a endpoint HTTP; It's suitable for remote servers and can also be used locally. Security and authentication depend on transport and deployment. Check the capabilities of the version that you use at MCP's official architecture.

"Server from an outside supplier" does not necessarily mean "remote process." You can run a third party package locally using stdio and have that package call after a API cloud by HTTPS. That's two different connections. That difference helps to locate errors of credentials, network and configuration.

Step-by-step example

Our team wants to share an order consultation between an LangChain agent and a assistant development-supported MCP.

To publish the operation, parts of a Python function as consultar_pedido, the register with @mcp.tool() and describe his intention and his arguments. The SDK official Python generates the scheme that the client will discover by tools/list; at receipt tools/call, the server valids the arguments and runs the registered function. FastMCP is the interface used for course demonstration. and Current official SDK line use MCPServer. The scheme describes inputs: they do not allow access to orders. Identity, permissions and business rules continue to require explicit controls.

  1. Expones consultar_pedido(id_pedido) on a server. His description indicates that he only reads and requires a concrete identifier.
  2. Configure the connection and authorized credentials on each host. The client starts the session and queries the available tools.
  3. User asks about order P-204. The model proposes call The host applies its permissions.
  4. The client sends tools/call with name and arguments. The server Valids Identity and Access before consulting the order system.
  5. The server returns a result as state "in preparation" and an estimated date, or an error if there's no access.
  6. The host adds that observation to the context and the agent explains the result. A second host can re-use the same capacity if it supports its protocol, transport and authentication.

The valuable proof isn't that both attendees write similar responses: they are that traces show the intended tool and the right result. If the assistant has an equivalent tool, an appropriate response does not prove that you have been using your server.

From local example to OCI case

A use and costs server can encapsulate an API OCI. The MCP client describes the period and grouping. The server applies the credentials and consults the API. To validate the response, compare dates, currency, time zone and reach with an authorized report from the same source. A difference does not prove that MCP miscomputed: there may be a different filter or unestablished data.

Before to run an outside package checks provenance and permissions. For a simple sum within an application, a local function is sufficient. MCP is especially useful when the capacity is shared, remains separate or already exists in another system.

Common errors

Architecture exercise

A host starts a server by stdio. The server looks at OCI by HTTPS. Do you have to configure the MCP client as Streamable HTTP just because the data come from the cloud?

Solution

No. The MCP transport describes the connection between client and server: in this case it's stdio. The HTTPS connection from the server to OCI is another integration. To change transport without changing the deployment would break communication. The place where the data are does not automatically determine the MCP transport.

Sources and review

Check. Architecture overview y Understanding MCP servers. To apply to Oracle, connect this module with MCP at Autonomous AI Database. You have to be able to identify both ends of each connection before choosing transport or permissions.

Search at CertiTips

12 available courses.