MCP Interaction Workflow: A Step-by-Step Example
21%
Step 1 - Startup, Configuration and Preparation
When the host starts, it loads MCP connection settings. This usually includes:
- Which servers are enabled
- Which transport each server uses (STDIO or HTTP)
- Endpoint URLs or local launch commands
- Auth settings (tokens, API keys, headers)
- Optional timeouts, retry rules, and rate limits
For this example, the host learns that the air-quality server is remote: http://mcp.airquality.com. It also learns the auth token it needs to connect. This can be done using a configuration file on the host side. For example, the host might load a JSON config file like this:
{
"mcpServers": {
"airQuality": {
"transport": "streamable-http",
"endpoint": "http://mcp.airquality.com/connect",
"headers": {
"x-api-key": "xxx-abc-123"
},
"timeout": 5000
}
}
}
Practical MCP with FastMCP & LangChain
Engineering the Agentic ExperienceEnroll now to unlock current content and receive all future updates for free. Your purchase supports the author and fuels the creation of more exciting content. Act fast, as the price will rise as the course nears completion!
