\documentclass[tikz,border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows.meta, positioning, fit, backgrounds, shadows}
\definecolor{usercolor}{RGB}{33, 150, 243}
\definecolor{interfacecolor}{RGB}{76, 175, 80}
\definecolor{protocolcolor}{RGB}{255, 152, 0}
\definecolor{servercolor}{RGB}{156, 39, 176}
\definecolor{corecolor}{RGB}{255, 193, 7}
\definecolor{distcolor}{RGB}{103, 58, 183}
\tikzstyle{layer} = [rectangle, rounded corners, minimum width=10cm, minimum height=1.5cm, text centered, draw=black, fill=blue!10, drop shadow]
\tikzstyle{component} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=white, font=\small]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzstyle{dashedarrow} = [thick,->,>=stealth,dashed]
\begin{document}
\begin{tikzpicture}[node distance=1.8cm, scale=0.9, every node/.style={scale=0.9}]
% Title
\node[font=\Large\bfseries] at (0, 10) {LLM-MCP Integration System Architecture};
% Layer 1: Users
\node (users) [layer, fill=usercolor!20, minimum height=1.2cm] at (0, 8.5) {\textbf{User Layer}};
\node (u1) [component, above right=0.2cm and -4cm of users] {\scriptsize Researchers};
\node (u2) [component, right=0.2cm of u1] {\scriptsize Developers};
\node (u3) [component, right=0.2cm of u2] {\scriptsize Educators};
% Layer 2: Interface
\node (interface) [layer, fill=interfacecolor!20, below=of users] {\textbf{Interface Layer}};
\node (claude) [component, below=0.3cm of interface] {Claude Desktop/CLI};
% Layer 3: Protocol
\node (protocol) [layer, fill=protocolcolor!20, below=of claude, minimum height=1.2cm] {\textbf{Protocol Layer (MCP)}};
\node (stdio) [component, below=0.2cm of protocol] {\scriptsize STDIO Transport};
% Layer 4: MCP Server
\node (server) [layer, fill=servercolor!20, below=of stdio, minimum width=10cm, minimum height=4cm] {};
\node[above] at (server.north) {\textbf{MCP Server: mcp-server-mm1}};
\node (resources) [component, fill=blue!10, below left=0.5cm and 1cm of server.north, text width=2.5cm, minimum height=2.5cm, align=center] {
\textbf{7 Resources}\\[0.2cm]
\tiny
Schema\\
Parameters\\
Metrics\\
Formulas\\
Guidelines\\
Examples\\
Literature
};
\node (tools) [component, fill=green!10, below=0.5cm of server.north, text width=2.5cm, minimum height=2.5cm, align=center] {
\textbf{5 Tools}\\[0.2cm]
\tiny
validate\_config\\
calculate\_metrics\\
run\_simulation\\
compare\_results\\
recommend\_params
};
\node (prompts) [component, fill=orange!10, below right=0.5cm and 1cm of server.north, text width=2.5cm, minimum height=2.5cm, align=center] {
\textbf{4 Prompts}\\[0.2cm]
\tiny
generate\_code\\
explain\_theory\\
analyze\_results\\
debug\_sim
};
% Layer 5: Core Engine
\node (core) [layer, fill=corecolor!20, below=1cm of server, minimum height=1.5cm] {\textbf{Core Simulation Engine}};
\node (simpy) [component, fill=yellow!10, below left=0.3cm and 1cm of core] {\scriptsize SimPy DES};
\node (theory) [component, fill=yellow!10, below right=0.3cm and 1cm of core] {\scriptsize Theoretical Metrics};
% Layer 6: Distribution
\node (dist) [layer, fill=distcolor!20, below=of simpy, minimum height=1.2cm] {\textbf{Distribution Channels}};
\node (pypi) [component, fill=purple!10, below left=0.2cm and 0.5cm of dist] {\tiny PyPI};
\node (smithery) [component, fill=purple!10, below=0.2cm of dist] {\tiny Smithery};
\node (github) [component, fill=purple!10, below right=0.2cm and 0.5cm of dist] {\tiny GitHub};
% Arrows - Main flow
\draw [arrow] (users) -- (interface);
\draw [arrow] (interface) -- (claude);
\draw [arrow] (claude) -- (protocol);
\draw [arrow] (protocol) -- (stdio);
\draw [arrow] (stdio) -- (server);
% Internal connections
\draw [arrow] (resources) -- (core);
\draw [arrow] (tools) -- (core);
\draw [arrow] (prompts) -- (core);
\draw [arrow] (core) -- (simpy);
\draw [arrow] (core) -- (theory);
% Distribution connections (dashed)
\draw [dashedarrow] (pypi) -- (server);
\draw [dashedarrow] (smithery) -- (server);
\draw [dashedarrow] (github) -- (server);
% Side annotations
\node[text width=2cm, font=\scriptsize, align=center] at (12, 8.5) {Natural\\Language\\Interaction};
\node[text width=2cm, font=\scriptsize, align=center] at (12, 6.7) {Anthropic\\MCP\\Standard};
\node[text width=2cm, font=\scriptsize, align=center] at (12, 3.5) {FastMCP\\Framework\\Python 3.10+};
\node[text width=2cm, font=\scriptsize, align=center] at (12, -1) {Worldwide\\Deployment\\Open Source};
% Legend
\begin{scope}[shift={(10,-4)}]
\node[font=\small\bfseries] at (0, 0.8) {Legend:};
\draw[arrow] (0, 0.4) -- (0.8, 0.4) node[right, font=\scriptsize] {Data Flow};
\draw[dashedarrow] (0, 0) -- (0.8, 0) node[right, font=\scriptsize] {Deployment};
\end{scope}
\end{tikzpicture}
\end{document}