Agent Tool-Use Stack (MCP)
LLM agent tool-use stack with brand logos: user to an LLM core to MCP servers fanning out to swappable tool cards.
This template ships an edit contract (in its meta.json) that the repo-wide using-opentikz skill reads to edit it reliably — the parameters and safe operations are listed below.
| id | agent-mcp-stack |
|---|---|
| type | template |
| domain | ml, brands |
| requires | tikz, svg.path, positioning, arrows.meta |
| license | CC0-1.0 |
| author | Daniel Huang |
template.tex
\documentclass[border=6pt]{standalone}
% --- packages (mirror these in template.meta.json "requires") ---
\usepackage{tikz}
\usetikzlibrary{svg.path, positioning, arrows.meta}
% --- palette (canonical source: reference/color-palettes/color-palettes.md; light variant) ---
\definecolor{otblue}{HTML}{0072B2}
\definecolor{otorange}{HTML}{E69F00}
\definecolor{otteal}{HTML}{009E73}
\definecolor{otpurple}{HTML}{CC79A7}
\definecolor{otgray}{HTML}{5A5A5A}
% --- brand colors (official; exception documented in icons/brands/README.md) ---
\definecolor{brandclaude}{HTML}{D97757}
\definecolor{brandmcp}{HTML}{000000}
\definecolor{brandgithub}{HTML}{181717}
\definecolor{brandarxiv}{HTML}{B31B1B}
\definecolor{brandgooglescholar}{HTML}{4285F4}
\begin{document}
% Brand-logo pics (shape data inlined from icons/brands/, which derives from
% the CC0 simple-icons project; marks remain trademarks of their owners).
% NOTE: svg.path ignores TikZ unit-vector options (x=, y=) — position/size the
% pics only via shift/scale, which are applied through the transform matrix.
\tikzset{
picclaude/.pic={\begin{scope}[shift={(-36pt,-36pt)}]\fill[brandclaude] svg {M 14.1432 24.1335 L 28.2954 32.0748 L 28.5324 32.7669 L 28.2954 33.1494 L 27.6033 33.1494 L 25.2354 33.2952 L 17.1486 33.5139 L 10.1361 33.8052 L 3.3423 34.1694 L 1.6302 34.5339 L 0.0273 36.6465 L 0.1911 37.7031 L 1.6302 38.6685 L 3.6882 38.4861 L 8.2419 38.1765 L 15.072 37.7031 L 20.0262 37.4115 L 27.3666 36.6465 L 28.5324 36.6465 L 28.6962 37.1202 L 28.2954 37.4115 L 27.9858 37.7031 L 20.919 42.4932 L 13.269 47.5569 L 9.2622 50.4711 L 7.0947 51.9465 L 6.0018 53.3307 L 5.5284 56.3541 L 7.4955 58.5216 L 10.1364 58.3395 L 10.8102 58.1574 L 13.4877 56.0994 L 19.2069 51.6732 L 26.6748 46.1724 L 27.7677 45.2619 L 28.2048 45.5715 L 28.2594 45.7899 L 27.7674 46.6098 L 23.7057 53.9499 L 19.3707 61.4178 L 17.4402 64.5138 L 16.9302 66.372 C 16.7481 67.137 16.6206 67.7742 16.6206 68.5575 L 18.861 71.5995 L 20.0991 72 L 23.0862 71.5992 L 24.3432 70.5066 L 26.2008 66.2625 L 29.2062 59.5779 L 33.8691 50.4891 L 35.235 47.7936 L 35.9637 45.2982 L 36.2367 44.5332 L 36.7104 44.5332 L 36.7104 44.9703 L 37.0929 50.0883 L 37.8033 56.3724 L 38.4954 64.4595 L 38.7321 66.7362 L 39.8613 69.4683 L 42.1017 70.9437 L 43.8501 70.1058 L 45.2892 68.0478 L 45.0888 66.7179 L 44.2329 61.1628 L 42.5571 52.4565 L 41.4642 46.6278 L 42.1017 46.6278 L 42.8304 47.3565 L 45.7809 51.2724 L 50.7351 57.4653 L 52.9209 59.9241 L 55.4709 62.6379 L 57.1101 63.9312 L 60.2064 63.9312 L 62.4834 60.5433 L 61.4634 57.0462 L 58.2759 53.0028 L 55.6347 49.5786 L 51.8463 44.4786 L 49.4784 40.3986 L 49.6971 40.0707 L 50.2617 40.1256 L 58.8222 41.9466 L 63.4485 42.7848 L 68.9673 43.7319 L 71.4627 42.5661 L 71.7357 41.3823 L 70.7523 38.9598 L 64.8513 37.5027 L 57.9297 36.1185 L 47.6205 33.6777 L 47.493 33.5865 L 47.6388 33.4044 L 52.2834 32.9673 L 54.2688 32.8581 L 59.1318 32.8581 L 68.1843 32.184 L 70.5519 30.618 L 71.9727 28.7052 L 71.7357 27.2481 L 68.0931 25.3902 L 63.1752 26.556 L 51.7002 29.2881 L 47.7663 30.2718 L 47.2197 30.2718 L 47.2197 29.9439 L 50.4984 26.7381 L 56.5089 21.3105 L 64.0314 14.3163 L 64.4139 12.5859 L 63.4485 11.2197 L 62.4285 11.3655 L 55.8168 16.338 L 53.2668 18.5784 L 47.493 23.4414 L 47.1105 23.4414 L 47.1105 22.9314 L 48.4401 20.9826 L 55.4709 10.4184 L 55.8351 7.1763 L 55.3251 6.12 L 53.5038 5.4825 L 51.5001 5.8467 L 47.3838 11.6205 L 43.14 18.123 L 39.7158 23.9514 L 39.2967 23.7144 L 37.2747 1.9488 L 36.3279 0.8379 L 34.1421 0 L 32.3208 1.3842 L 31.3554 3.6246 L 32.3208 8.0505 L 33.4866 13.8243 L 34.4337 18.4143 L 35.2896 24.1155 L 35.7996 26.0097 L 35.7633 26.1372 L 35.3442 26.0826 L 31.0458 20.181 L 24.507 11.3472 L 19.3341 5.8104 L 18.0957 5.3184 L 15.9465 6.4296 L 16.1466 8.415 L 17.349 10.1817 L 24.507 19.2888 L 28.8237 24.9348 L 31.6107 28.1952 L 31.5921 28.6689 L 31.4283 28.6689 L 12.4128 16.3197 L 9.0249 15.8826 L 7.5678 17.2488 L 7.7502 19.4889 L 8.4423 20.2176 L 14.1615 24.1518 Z};\end{scope}},
picmcp/.pic={\begin{scope}[shift={(-36pt,-36pt)}]\fill[brandmcp] svg {M 41.55 72 C 38.232 72.0079 35.0474 70.6941 32.7 68.349 L 4.368 40.02 C 3.3915 39.042 3.3915 37.458 4.368 36.48 C 5.346 35.5035 6.93 35.5035 7.908 36.48 L 36.234 64.806 C 37.6372 66.225 39.5499 67.0235 41.5455 67.0235 C 43.5411 67.0235 45.4538 66.225 46.857 64.806 C 48.276 63.4028 49.0745 61.4901 49.0745 59.4945 C 49.0745 57.4989 48.276 55.5862 46.857 54.183 L 25.77 33.09 L 25.47 32.79 C 24.4935 31.812 24.4935 30.228 25.47 29.25 C 26.448 28.2735 28.032 28.2735 29.01 29.25 L 29.31 29.544 L 50.4 50.646 C 51.8033 52.0659 53.7166 52.865 55.713 52.865 C 57.7094 52.865 59.6227 52.0659 61.026 50.646 L 61.173 50.496 C 62.5911 49.0929 63.389 47.1809 63.389 45.186 C 63.389 43.1911 62.5911 41.2791 61.173 39.876 L 35.553 14.256 C 33.2902 11.9656 33.2902 8.2814 35.553 5.991 L 40.812 0.732 C 41.79 -0.2445 43.374 -0.2445 44.352 0.732 C 45.3285 1.71 45.3285 3.294 44.352 4.272 L 39.093 9.531 C 38.9263 9.6823 38.8312 9.8969 38.8312 10.122 C 38.8312 10.3471 38.9263 10.5617 39.093 10.713 L 64.713 36.333 C 69.5792 41.2296 69.5792 49.1364 64.713 54.033 L 64.563 54.183 C 62.2161 56.5292 59.0315 57.8441 55.713 57.837 C 55.113 57.837 54.51 57.777 53.913 57.693 C 54.4906 61.5999 53.1894 65.5502 50.403 68.349 C 48.0549 70.6948 44.8691 72.0087 41.55 72 M 41.55 62.001 C 40.8862 61.9987 40.2502 61.7346 39.78 61.266 L 18.825 40.32 C 13.9565 35.422 13.9565 27.512 18.825 22.614 C 23.723 17.7455 31.633 17.7455 36.531 22.614 L 57.48 43.56 C 58.4565 44.538 58.4565 46.122 57.48 47.1 C 56.502 48.0765 54.918 48.0765 53.94 47.1 L 32.985 26.148 C 31.5819 24.7299 29.6699 23.932 27.675 23.932 C 25.6801 23.932 23.7681 24.7299 22.365 26.148 C 20.9469 27.5511 20.149 29.4631 20.149 31.458 C 20.149 33.4529 20.9469 35.3649 22.365 36.768 L 43.314 57.723 C 44.2905 58.701 44.2905 60.285 43.314 61.263 C 42.8438 61.7316 42.2078 61.9957 41.544 61.998};\end{scope}},
picgithub/.pic={\begin{scope}[shift={(-36pt,-36pt)}]\fill[brandgithub] svg {M 36 71.109 C 16.11 71.109 0 54.99 0 35.109 C 0 19.2 10.314 5.709 24.615 0.954 C 26.415 0.615 27.075 1.728 27.075 2.685 C 27.075 3.54 27.045 5.805 27.03 8.805 C 17.016 6.633 14.904 13.635 14.904 13.635 C 13.266 17.79 10.899 18.9 10.899 18.9 C 7.638 21.132 11.151 21.087 11.151 21.087 C 14.766 20.835 16.665 17.379 16.665 17.379 C 19.875 11.874 25.092 13.464 27.15 14.385 C 27.474 16.713 28.401 18.3 29.43 19.2 C 21.435 20.1 13.032 23.196 13.032 36.99 C 13.032 40.92 14.427 44.13 16.737 46.65 C 16.332 47.559 15.117 51.219 17.052 56.178 C 17.052 56.178 20.067 57.144 26.952 52.488 C 29.832 53.289 32.892 53.685 35.952 53.703 C 39.012 53.685 42.072 53.289 44.952 52.488 C 51.792 57.144 54.807 56.178 54.807 56.178 C 56.742 51.219 55.527 47.559 55.167 46.65 C 57.462 44.13 58.857 40.92 58.857 36.99 C 58.857 23.16 50.442 20.115 42.432 19.23 C 43.692 18.15 44.862 15.942 44.862 12.57 C 44.862 7.752 44.817 3.882 44.817 2.712 C 44.817 1.767 45.447 0.642 47.292 1.002 C 61.695 5.724 72 19.224 72 35.109 C 72 54.99 55.881 71.109 36 71.109};\end{scope}},
picarxiv/.pic={\begin{scope}[shift={(-36pt,-36pt)}]\fill[brandarxiv] svg {M 11.5269 72 C 10.3233 71.9996 9.2356 71.2826 8.7609 70.1766 C 8.3001 69.0705 8.6295 68.2941 9.6423 66.8427 L 30.3978 41.7636 L 27.3309 38.4462 C 26.2067 37.244 26.2106 35.375 27.3399 34.1775 L 31.0275 30.237 L 14.7102 10.9038 C 13.8693 10.0068 13.3488 8.4348 13.8189 7.308 C 14.2977 6.1448 15.4365 5.3903 16.6944 5.403 C 17.5002 5.4228 18.2564 5.7965 18.7617 6.4245 L 36.1107 24.8025 L 58.5813 0.7872 C 59.1131 0.2328 59.866 -0.0533 60.6318 0.0081 C 61.8028 0.0277 62.8447 0.7563 63.2649 1.8495 C 63.738 2.9805 63.2139 4.1001 62.3469 5.2716 L 41.1915 30.297 L 44.3811 33.687 C 45.4296 34.7907 45.4413 36.5188 44.4078 37.6365 L 13.9008 70.6083 C 13.9008 70.6083 12.7809 71.9688 11.5968 71.9973 Z M 11.5269 71.184 L 11.5767 71.184 C 12.2304 71.1684 13.0389 70.3695 13.2699 70.0923 L 13.2849 70.0743 L 13.3005 70.0578 L 43.8075 37.0863 C 44.5479 36.283 44.5384 35.0432 43.7859 34.2513 L 40.5861 30.8523 L 36.0915 36.1695 L 10.2933 67.3395 C 9.3075 68.7555 9.2373 69.1944 9.5157 69.8625 C 9.8631 70.664 10.6533 71.1828 11.5269 71.1828 Z M 54.5499 66.4737 C 53.8223 66.5146 53.1104 66.252 52.5837 65.7483 L 35.4951 47.2731 L 40.5783 41.7774 L 56.505 61.3188 C 57.4803 62.6193 57.942 63.2997 57.4791 64.4064 C 56.9823 65.6019 55.8431 66.4059 54.5502 66.4734 Z M 31.5828 29.6268 L 35.5386 25.3863 L 18.1794 6.9978 C 17.8268 6.5264 17.28 6.2397 16.6917 6.2178 C 15.7649 6.205 14.9247 6.7607 14.5737 7.6185 C 14.238 8.4231 14.6814 9.6777 15.3063 10.3434 L 15.3216 10.3599 L 15.3357 10.3764 Z};\end{scope}},
picgooglescholar/.pic={\begin{scope}[shift={(-36pt,-36pt)}]\fill[brandgooglescholar] svg {M 15.726 30.693 L 0 43.5 L 36 72 L 72 43.5 L 56.274 30.693 C 52.644 38.253 44.934 43.5 36 43.5 C 27.069 43.5 19.356 38.256 15.726 30.693 Z M 36 42 C 24.402 42 15 32.598 15 21 C 15 9.402 24.402 0 36 0 C 47.598 0 57 9.402 57 21 C 57 32.598 47.598 42 36 42 Z};\end{scope}},
}
% ==== parameters (edit these) ============================================
\def\cardw{2.4} % card width (cm)
\def\cardh{1.9} % logo-card height (cm)
\def\toolgap{0.45} % vertical gap between tool cards (cm)
% labels
\def\userlabel{User}
\def\llmlabel{Claude}
\def\mcplabel{MCP servers}
\def\toolalabel{GitHub}
\def\toolblabel{arXiv}
\def\toolclabel{Scholar}
\def\chatlabel{chat}
\def\calllabel{tool calls}
% =========================================================================
\begin{tikzpicture}[
>={Stealth[length=2.4mm]},
card/.style={
draw=otgray!55, line width=0.7pt, rounded corners=4pt, align=center,
minimum width=\cardw cm, minimum height=\cardh cm,
},
cardlabel/.style={font=\sffamily\small, text=otgray!40!black},
flow/.style={draw=otgray!70, line width=0.9pt, ->},
elabel/.style={font=\sffamily\footnotesize, text=otgray},
]
% --- user ---
\node[card, fill=otgray!10, minimum height=1.2cm] (user) at (0,0) {\sffamily\small \userlabel};
% --- LLM core ---
\node[card, fill=otorange!14, right=2.0cm of user] (llm) {};
\pic[scale=0.3] at ([yshift=0.28cm]llm.center) {picclaude};
\node[cardlabel] at ([yshift=-0.42cm]llm.center) {\llmlabel};
% --- protocol layer ---
\node[card, fill=otblue!12, right=2.0cm of llm] (mcp) {};
\pic[scale=0.28] at ([yshift=0.28cm]mcp.center) {picmcp};
\node[cardlabel] at ([yshift=-0.42cm]mcp.center) {\mcplabel};
% --- tool cards (top -> bottom: t1, t2, t3) ---
\node[card, fill=otteal!12, right=2.0cm of mcp, yshift=\cardh cm+\toolgap cm] (t1) {};
\pic[scale=0.26] at ([yshift=0.26cm]t1.center) {picgithub};
\node[cardlabel] at ([yshift=-0.42cm]t1.center) {\toolalabel};
\node[card, fill=otteal!12, right=2.0cm of mcp] (t2) {};
\pic[scale=0.26] at ([yshift=0.26cm]t2.center) {picarxiv};
\node[cardlabel] at ([yshift=-0.42cm]t2.center) {\toolblabel};
\node[card, fill=otteal!12, right=2.0cm of mcp, yshift=-\cardh cm-\toolgap cm] (t3) {};
\pic[scale=0.26] at ([yshift=0.26cm]t3.center) {picgooglescholar};
\node[cardlabel] at ([yshift=-0.42cm]t3.center) {\toolclabel};
% --- flows ---
\draw[flow, <->] (user) -- (llm) node[midway, above, elabel] {\chatlabel};
\draw[flow, <->] (llm) -- (mcp) node[midway, above, elabel] {\calllabel};
\draw[flow] (mcp.20) -- (t1.west);
\draw[flow] (mcp.east) -- (t2.west);
\draw[flow] (mcp.-20) -- (t3.west);
\end{tikzpicture}
\end{document}
Edit contract — how the AI edits this template
using-opentikz skill →Parameters & safe edit operations
Parameters
\cardw | card width default 2.4 |
\cardh | logo-card height default 1.9 |
\toolgap | vertical gap between tool cards default 0.45 |
\userlabel | label of the user card default User |
\llmlabel | label of the LLM-core card default Claude |
\mcplabel | label of the protocol card default MCP servers |
\toolalabel | label of the top tool card (t1) default GitHub |
\toolblabel | label of the middle tool card (t2) default arXiv |
\toolclabel | label of the bottom tool card (t3) default Scholar |
\chatlabel | user-to-LLM edge label default chat |
\calllabel | LLM-to-MCP edge label default tool calls |
Node naming
user, llm, mcp; tool cards t1..t3 top-to-bottom; logos are pics named pic<brand>
Operations
relabel-cards— Change any card or edge text via the label \def parameters only.swap-tool-logo— Replace a tool card's logo: swap the \pic call's pic<brand> name and inline the new brand's \definecolor + pic definition from icons/brands/<brand>/.add-tool-card— Duplicate the t3 block as t4 with yshift=-2*(\cardh+\toolgap), add a flow edge from mcp to t4.west, and a \tooldlabel parameter.resize-cards— Scale all cards via \cardw/\cardh; keep pic scale ~0.26-0.3 so logos stay inside cards.recolor-structure— Change card fills/arrows via the five palette names (tints allowed); never touch the brand\* colors.
Use it
The file compiles on its own (\documentclass{standalone}).
Drop it into your project and \input it, or copy the
tikzpicture into your figure. Colours come from the shared
palette defined in the preamble — edit those named colours, not raw hex.
The TikZ code is CC0 1.0; the brand mark remains a trademark of its owner — use it to identify the brand in figures, not to imply endorsement. Details · Rights holder? request removal.