# Architecture
High-Level Flow
User → API → Engine → LLM Router → Tool → Memory → Response
Layers
- API (FastAPI)
- Core Orchestrator
- LLM Tool Router
- Tools
- Memory / RAG
- Observability
🏗️ MCP Architecture
Core Components
1. Client
- Sends prompts
- Receives responses
2. MCP Server
- Handles context
- Registers tools
- Routes execution
3. Tools
- Functions/APIs exposed to LLM
4. LLM
- Decides when to call tools
Flow
User → Client → MCP Server → Tool → Response → User
📄 tools.md
🔧 MCP Tools
What is a Tool?
A callable function exposed to the LLM.
Example
{
"name": "get_weather",
"description": "Returns weather for a city",
"parameters": {
"city": "string"
}
}
https://modelcontextprotocol.io/docs/learn/architecture#concepts-of-mcp
Layers MCP consists of two layers:
whast the transport type
whats connection type