MCP: Model Context ProtocolBeginnerModule 01 — Understanding the need for MCP

Does MCP require an LLM to function?

Question 11 of 43 · Updated

On this page

Direct answer#

No. The Model Context Protocol (MCP) does not require a large language model (LLM) to establish a connection, discover supported capabilities or invoke an ordinary tool. A normal software application can implement an MCP client, choose a tool using deterministic code, send a request to a compatible server and process its response without performing any model inference.

MCP is designed for integrations with AI applications, but its core communication mechanisms are separate from model reasoning. An LLM is one possible way to decide which capability to use; it is not a prerequisite for the protocol itself.

There are important exceptions at the capability and application level. An individual server tool may internally use a model, and MCP sampling allows a server to request model generation through a supporting client. Those features require appropriate model access if they are used. A client that does not offer sampling can still use compatible ordinary tools and resources.

Learning continuity: Q10 distinguished external context from model context. Q12 separated MCP from reasoning, workflow orchestration and business logic. This lesson isolates the LLM dependency question and demonstrates a model-free exchange. Later roadmap lessons cover building a complete Python/TypeScript MCP client (Q105–106), invoking tools directly with an SDK (Q108), deterministic workflow composition (Q121) and sampling (Q135 onward).

Verification scope: Prepared using the authorized offline research and changelog exceptions, with the historical MCP 2025-06-18 specification as the reference baseline rather than an assertion of the latest revision. Official links were not accessed live. The Python 3.13.5 example was syntax-compiled and executed as a real local subprocess fixture: all nine checks passed. It implements a deliberately limited, MCP-shaped JSON-RPC teaching exchange, not a conformant server or general client. The MCP SDK and Mermaid package were unavailable locally; live SDK interoperability, model inference and diagram rendering were not verified.

1. The difference between an LLM and a protocol#

A large language model takes an input, performs inference and produces an output. It may interpret natural language, generate text, propose tool calls or help solve a task. The model does not need to own networking, credentials, process management or business transactions.

A protocol defines how software participants communicate. It describes message structures, operations, responses and supported interaction patterns. In the historical MCP baseline, JSON-RPC 2.0 provides the message framework, while transports such as stdio and Streamable HTTP carry messages between client and server.

ConceptMain responsibility
Language modelInterpret information, generate output and possibly propose actions
Application hostManage the task, policy, client connections and result handling
MCP clientSend and receive protocol messages
MCP serverExpose supported capabilities and implement their behavior
Business serviceMaintain authoritative data and execute business operations

Nothing about encoding a JSON message, discovering a tool or invoking an ordinary stock lookup requires a neural network. The server implementation might call a database, read a document, perform a calculation or invoke an ordinary HTTP API.

Think of a calculator application. It can call an addition function directly using two numbers. If an MCP server exposes that function as a tool, an application can send a request through MCP rather than import the calculator code directly. No language model is needed for either operation.

2. Model-driven and model-free applications#

Suppose a retailer exposes a stock tool that accepts a product SKU. A support assistant may use a model to understand a user's natural-language question and choose that tool. A scheduled inventory checker already knows the SKUs to query and does not need a model to select the operation.

Both can use a compatible MCP server.

Loading diagram…

This is a logical architecture diagram, not a claim that the two clients share a session or identity. Each host maintains appropriate client connections and enforces its own policy. The inventory service can be completely independent of model inference.

The important distinction is how the host chooses the operation.

DecisionModel-driven hostModel-free host
What to callModel may propose an available toolExplicit configuration, rule or user-selected command
ArgumentsModel may generate structured argumentsKnown inputs or deterministic transformation
ValidationTrusted application code validates the proposalTrusted application code validates the inputs
ExecutionMCP client invokes approved operationMCP client invokes approved operation
Result handlingModel may summarize or reason over the resultCode parses, checks and acts on the result
Model API keyNeeded only for the chosen model access mechanismNot needed for purely model-free operations

Neither approach automatically authorizes a tool call. Both require appropriate identities, input validation, resource authorization and result checks. A deterministic script may also perform unsafe operations if its configuration or business logic is wrong.

3. How a deterministic MCP client works#

In the historical session-oriented baseline, a typical client connects to a trusted server over a supported transport, completes initialization and negotiates compatible capabilities. It can discover tools using tools/list, select an approved operation and invoke it using tools/call. The selected server implements the operation and returns its result.

A program can perform every one of these steps using ordinary control flow. For example, a scheduled inventory checker may contain a fixed list of approved product identifiers. It calls the stock tool for those identifiers, validates the returned quantities, compares them with a reorder threshold and creates a report.

Loading diagram…

This diagram illustrates one ordinary session-oriented interaction in the historical baseline. Authentication and transport setup are omitted for readability. Different specification revisions may introduce different lifecycle features, so use the procedure supported by the selected SDK and server. The model-free workflow does not create an LLM prompt or ask a model to select the tool.

A tool's result still needs to be interpreted correctly. A zero-stock result is a valid business observation, whereas a tool error, timeout or unknown product must not be reported as zero stock. Deterministic code can explicitly handle those distinctions.

4. What does a tool invocation look like without a model?#

After the applicable connection initialization, an illustrative historical MCP tool call could be represented as a JSON-RPC request:

JSON
{ "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "stock", "arguments": { "sku": "A12" } } }

A possible successful result is:

JSON
{ "jsonrpc": "2.0", "id": 4, "result": { "content": [ { "type": "text", "text": "7" } ] } }

The payload is a protocol message, not a prompt. A client can construct the request using a regular dictionary, validate the response correlation identifier and inspect the result content. In production, use the applicable protocol schema and a compatible SDK rather than assuming all tools return one numeric text block. Structured output and other content representations may be supported.

The JSON-RPC request ID correlates the request and response within the relevant interaction; it is not a model token, an authentication credential or a durable business idempotency identifier.

A model-provider function call is a different representation. If a model generates a tool proposal, the host can translate it into the appropriate MCP request. In a model-free program, application code can construct the same requested operation directly.

5. Practical example: model-free local subprocess exchange#

The example below demonstrates the principle without installing an SDK or obtaining any model API key. It uses Python's subprocess and JSON libraries to exchange newline-delimited messages with a local teaching server. The same script runs as the test client by default and as the server fixture when passed --server.

Important: This is not a complete MCP implementation. It reproduces only a small, controlled subset of the historical session-oriented message shapes. It assumes trusted, well-formed requests, accepts the demonstration revision without real version negotiation, does not fully validate messages, handles only one initialization path, and implements fixture-specific errors. It lacks authentication, authorization, general notification handling, timeouts for individual reads, pagination and full content/schema support. Do not deploy it as a general MCP server. A compatible production SDK should implement the protocol details.

Save as mcp_q13_demo.py:

PYTHON
import json import subprocess import sys from pathlib import Path def serve(): state = 'new' for line in sys.stdin: request = json.loads(line) method = request['method'] if method == 'notifications/initialized' and state == 'starting': state = 'ready' continue reply = {'jsonrpc': '2.0', 'id': request['id']} if method == 'initialize' and state == 'new': state = 'starting' reply['result'] = { 'protocolVersion': '2025-06-18', 'capabilities': {'tools': {}}, 'serverInfo': {'name': 'demo', 'version': '1.0'}, } elif state != 'ready': reply['error'] = {'code': -32000, 'message': 'Not ready'} elif method == 'tools/list': reply['result'] = {'tools': [{'name': 'stock', 'description': 'Return stock for a known SKU', 'inputSchema': {'type': 'object', 'properties': {'sku': {'type': 'string'}}, 'required': ['sku'], 'additionalProperties': False}}]} elif method == 'tools/call': params = request.get('params', {}) args = params.get('arguments', {}) data = {'A12': 7, 'B34': 0} if (params.get('name') == 'stock' and isinstance(args, dict) and set(args) == {'sku'} and isinstance(args['sku'], str) and args['sku'] in data): reply['result'] = {'content': [{'type': 'text', 'text': str(data[args['sku']])}]} else: reply['result'] = {'isError': True, 'content': [{'type': 'text', 'text': 'Invalid lookup'}]} else: reply['error'] = {'code': -32601, 'message': 'Method not found'} print(json.dumps(reply), flush=True) def test_client(): with subprocess.Popen([sys.executable, str(Path(__file__).resolve()), '--server'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True, encoding='utf-8') as proc: def send(message): proc.stdin.write(json.dumps(message) + '\n') proc.stdin.flush() def call(i, method, params=None): send({'jsonrpc': '2.0', 'id': i, 'method': method, 'params': params or {}}) response = json.loads(proc.stdout.readline()) assert response['id'] == i and response['jsonrpc'] == '2.0' return response assert call(1, 'tools/list')['error']['code'] == -32000 init = call(2, 'initialize', {'protocolVersion': '2025-06-18', 'capabilities': {}, 'clientInfo': {'name': 'test', 'version': '1.0'}}) assert init['result']['protocolVersion'] == '2025-06-18' assert 'tools' in init['result']['capabilities'] send({'jsonrpc': '2.0', 'method': 'notifications/initialized'}) assert call(3, 'tools/list')['result']['tools'][0]['name'] == 'stock' for i, sku, expected in [(4, 'A12', '7'), (5, 'B34', '0')]: result = call(i, 'tools/call', {'name': 'stock', 'arguments': {'sku': sku}})['result'] assert result['content'][0]['text'] == expected assert call(6, 'tools/call', {'name': 'stock', 'arguments': {'sku': 'Z99'}})['result']['isError'] assert call(7, 'unknown')['error']['code'] == -32601 proc.stdin.close() assert proc.wait(timeout=5) == 0 print('9 model-free subprocess checks passed') if __name__ == '__main__': if '--server' in sys.argv: serve() else: test_client()

Run with Python 3.10 or later:

BASH
python -m py_compile mcp_q13_demo.py python mcp_q13_demo.py

Actual local execution on Python 3.13.5 produced:

9 model-free subprocess checks passed

The actual local execution used a ten-second outer process timeout as a test guard. The illustrative script uses blocking reads and is designed only for its own trusted fixture; a real client should implement bounded reads and robust subprocess cleanup even on failure. The two initialization assertions separately verify the revision string and advertised tools capability. The other seven explicit checks verify the pre-initialization rejection, discovery, positive stock, zero stock, missing SKU error, unsupported method error and clean subprocess exit. Every response is also checked for its JSON-RPC version and matching request ID.

The pre-initialization probe is an intentional negative test of this fixture, not a normal client lifecycle step. Likewise, the fixture's choice of error for an invalid lookup is not a comprehensive account of MCP error classification. Later lessons distinguish protocol errors and tool execution errors.

This is a genuine local process exchange, but both sides are controlled educational fixtures. It proves that the message exchange and tested operation can run without any language model, not that the fixture conforms to the complete MCP specification. No SDK, network service, external API key or LLM was used.

6. When would an actual LLM be needed?#

An MCP-enabled workflow can contain model-dependent features even though the protocol does not inherently require a model.

Model-driven selection#

If users can ask open-ended questions in natural language and the application wants a model to select tools, that host needs a suitable model inference capability. The host may use a remotely hosted model or a local model. The model's role is to help interpret the task and propose actions, not to replace the client or server.

Model-backed tools#

A server may expose an ordinary-looking tool that internally summarizes a document using an LLM. A deterministic client can invoke the tool without making its own model API call, but the server still depends on model inference. The workflow is not end-to-end model-free in this situation.

Sampling#

In MCP revisions supporting sampling, a server can request model generation through a client that advertises the necessary sampling capability. The client or host controls how the request is handled, subject to the applicable specification, user controls and policy.

A client that cannot provide sampling must not pretend that it supports it. A server that requires sampling for a specific operation may not be usable for that operation by such a client. Ordinary supported tool and resource operations remain possible without sampling.

Prompts and resources#

A reusable prompt can be retrieved as data without invoking an LLM. The application might display the template, inspect its contents or store it for a later workflow. Using the template for model generation is a separate decision.

A resource can also be retrieved and parsed without a model. For example, an application may read an authorized configuration document and evaluate its JSON contents with conventional code.

These distinctions separate protocol dependencies from capability dependencies and host dependencies. Do not judge the entire system by whether the client process happens to have an LLM library installed.

7. Model-free use cases#

Use caseDeterministic behaviorWhy MCP can be useful
Command-line toolUser explicitly selects a known operation and argumentsReuse a supported server interface without building a chat assistant
Scheduled inventory reportCall approved stock tools and aggregate countsShare the inventory capability with other hosts
Continuous integrationDiscover expected tools and validate known test responsesTest protocol and tool behavior before adding a model
Administrative dashboardInvoke an operation after a trusted button clickProvide a conventional application interface
Data pipelineRead authorized resources or call fixed transformation toolsReuse capability contracts across environments
Service monitoringCheck a supported read-only diagnostic capabilitySeparate deterministic observations from model-generated explanations

Each application still needs a valid deployment, authorization and operational controls. A scheduled task needs a configured execution mechanism; MCP does not schedule itself. A dashboard needs user authentication and appropriate action confirmation. A test client needs controlled test data and should not perform uncontrolled writes against production.

Some workflows should remain deterministic even if a model is available. A calculation, exact comparison, permission decision or critical workflow state transition may be more reliably expressed as application logic.

8. Testing an MCP integration before introducing a model#

One of the practical advantages of protocol independence is that developers can test the capability boundary separately from the model.

A useful progression is:

  1. Test the tool's business logic with known inputs and expected outputs.
  2. Test discovery and invocation through a compatible MCP client.
  3. Verify the authorization boundaries, response schemas, errors and resource ownership.
  4. Test deterministic application behavior such as parsing and result handling.
  5. If the application uses an LLM, add model selection, argument generation and answer-quality evaluations.

A failing stock lookup can therefore be investigated without asking a language model to reproduce the failure. If a direct client succeeds but an agent fails, investigate model-facing schema conversion, tool selection, orchestration or result interpretation. If both fail, investigate the shared transport, protocol, server or downstream service.

The local exercise demonstrates a limited version of steps one and two using a fixture. It is not a substitute for actual SDK conformance testing, real service authorization or production monitoring.

Do not claim that using the same deterministic input guarantees the same external result forever. Inventory changes, network failures and concurrent operations can affect output. Deterministic control flow is not the same as immutable external state.

9. Common misconceptions#

Does the word Model in Model Context Protocol mean a model must be present in every connection? No. It describes the protocol's intended integration domain; ordinary protocol participants are software clients and servers.

Can I use MCP without a model-provider API key? Yes, for operations that do not require model inference. An external business API may still require its own credentials.

Does calling a tool without an LLM bypass security? No. Authentication, tool and resource authorization, business validation and any applicable approvals remain necessary.

Does MCP replace an LLM if I use it from a script? No. A deterministic script solves a known task using predefined logic. It does not automatically acquire natural-language reasoning capabilities.

Can a server itself contain an LLM? Yes. That is an implementation choice. A model-backed tool can be invoked through the same capability interface, but its implementation may require model access.

Are all MCP features available in model-free clients? No. Optional capabilities must be supported by the participants. Sampling in particular requires an appropriate model-backed implementation when used.

Interview-ready answer#

No, MCP does not require an LLM for its core communication or ordinary tool and resource operations. A deterministic application can use a compatible MCP client to initialize a connection, discover capabilities, invoke a known tool with explicit arguments and interpret the response using conventional software. A language model is optional when the application wants model-driven tool selection, natural-language reasoning or summarization. Some individual capabilities, such as model-backed tools and supported sampling requests, do require inference. MCP therefore separates the capability interface from the mechanism that decides when and why to use a capability.

Next lesson: With that distinction established, the next roadmap question examines when MCP is a useful architectural choice and when a simpler direct integration is preferable.

References

  1. 1.
  2. 2.
    MCP lifecyclemodelcontextprotocol.io
  3. 3.
    MCP toolsmodelcontextprotocol.io
  4. 4.
    MCP samplingmodelcontextprotocol.io
  5. 5.
    MCP transportsmodelcontextprotocol.io
  6. 6.
  7. 7.
    JSON-RPC 2.0jsonrpc.org
  8. 8.

Related questions

Explore other topics:Forward Deployed EngineeringAI AgentsLarge Language ModelsRetrieval-Augmented Generation