<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://classes.engineering.wustl.edu/cse330/index.php?action=history&amp;feed=atom&amp;title=Module6-AI</id>
	<title>Module6-AI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://classes.engineering.wustl.edu/cse330/index.php?action=history&amp;feed=atom&amp;title=Module6-AI"/>
	<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;action=history"/>
	<updated>2026-11-15T19:48:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.4</generator>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3492&amp;oldid=prev</id>
		<title>Todd: /* Reading */</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3492&amp;oldid=prev"/>
		<updated>2026-03-15T15:45:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Reading&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 15:45, 15 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l31&quot; &gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Python]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Python]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Regular Expressions]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Regular Expressions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[MCP Fundamentals]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[FAQ - Mod 4]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[FAQ - Mod 4]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Todd</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3477&amp;oldid=prev</id>
		<title>Todd: /* Cardinals MCP Server */</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3477&amp;oldid=prev"/>
		<updated>2026-03-11T14:59:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Cardinals MCP Server&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 14:59, 11 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l135&quot; &gt;Line 135:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 135:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;====Cardinals MCP Server ====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;====Cardinals MCP Server ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can learn about this &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;here &lt;/del&gt;[[MCP Fundamentals]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can learn about this &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;in &lt;/ins&gt;[[MCP Fundamentals]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This project builds a '''custom MCP server''' that lets you explore ''St. Louis Cardinals'' batting data from the '''1930''' and '''1940''' seasons using the text files you made in the Baseball Stats Counter section.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This project builds a '''custom MCP server''' that lets you explore ''St. Louis Cardinals'' batting data from the '''1930''' and '''1940''' seasons using the text files you made in the Baseball Stats Counter section.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Todd</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3476&amp;oldid=prev</id>
		<title>Todd at 14:59, 11 March 2026</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3476&amp;oldid=prev"/>
		<updated>2026-03-11T14:59:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 14:59, 11 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l134&quot; &gt;Line 134:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 134:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;====Cardinals MCP Server ====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;====Cardinals MCP Server ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;You can learn about this here [[MCP Fundamentals]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This project builds a '''custom MCP server''' that lets you explore ''St. Louis Cardinals'' batting data from the '''1930''' and '''1940''' seasons using the text files you made in the Baseball Stats Counter section.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This project builds a '''custom MCP server''' that lets you explore ''St. Louis Cardinals'' batting data from the '''1930''' and '''1940''' seasons using the text files you made in the Baseball Stats Counter section.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l542&quot; &gt;Line 542:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 544:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#*: ''Each example should show the prompt you asked and the MCP’s response.''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#*: ''Each example should show the prompt you asked and the MCP’s response.''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Module &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;4&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Module &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;6&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Modules]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Modules]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Todd</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3329&amp;oldid=prev</id>
		<title>Todd at 19:46, 3 December 2025</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3329&amp;oldid=prev"/>
		<updated>2025-12-03T19:46:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;//classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;amp;diff=3329&amp;amp;oldid=3320&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Todd</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3320&amp;oldid=prev</id>
		<title>Todd: /* Learn Python and Regular Expressions */</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3320&amp;oldid=prev"/>
		<updated>2025-11-19T16:59:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Learn Python and Regular Expressions&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:59, 19 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot; &gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Learn Python and Regular Expressions ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Learn Python and Regular Expressions ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Up to this point in CSE &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;330&lt;/del&gt;, you have used only one programming language: PHP.  In Module &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;4&lt;/del&gt;, you will learn a new language: Python.  Before starting this assignment, you should look over the [[Python|online textbook article about Python]].  You should be using version 3 (or greater) of Python. Additionally, you may find it helpful to look over the [[Regular Expressions|online textbook article about Regular Expressions]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Up to this point in CSE &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;3300&lt;/ins&gt;, you have used only one programming language: PHP.  In Module &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;6&lt;/ins&gt;, you will learn a new language: Python.  Before starting this assignment, you should look over the [[Python|online textbook article about Python]].  You should be using version 3 (or greater) of Python. Additionally, you may find it helpful to look over the [[Regular Expressions|online textbook article about Regular Expressions]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Write some Regular Expressions ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Write some Regular Expressions ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Todd</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3317&amp;oldid=prev</id>
		<title>Todd: Created page with &quot;__NOTOC__ In Module 6, you will learn the fundamentals of Python, a popular scripting language, and Regular Expressions, which give you power in text processing.  This article...&quot;</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module6-AI&amp;diff=3317&amp;oldid=prev"/>
		<updated>2025-11-19T16:47:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ In Module 6, you will learn the fundamentals of Python, a popular scripting language, and Regular Expressions, which give you power in text processing.  This article...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
In Module 6, you will learn the fundamentals of Python, a popular scripting language, and Regular Expressions, which give you power in text processing.&lt;br /&gt;
&lt;br /&gt;
This article contains your assignments for Module 6.&lt;br /&gt;
&lt;br /&gt;
== Using the Wiki ==&lt;br /&gt;
{{RequiredInstructions|content=&lt;br /&gt;
Text enclosed by &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;&amp;lt;&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; should be replaced by content unique to you.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo useradd -r -m -c &amp;quot;&amp;lt;My Full Name&amp;gt;&amp;quot; &amp;lt;usernameHere&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
becomes&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo useradd -r -m -c &amp;quot;Zach Cohn&amp;quot; zcohn&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reading ==&lt;br /&gt;
&lt;br /&gt;
The following articles on the online class wiki textbook contain information that will help you complete the assignments.&lt;br /&gt;
&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
* [[FAQ - Mod 4]]&lt;br /&gt;
&lt;br /&gt;
== Individual Assignments ==&lt;br /&gt;
&lt;br /&gt;
=== Learn Python and Regular Expressions ===&lt;br /&gt;
&lt;br /&gt;
Up to this point in CSE 330, you have used only one programming language: PHP.  In Module 4, you will learn a new language: Python.  Before starting this assignment, you should look over the [[Python|online textbook article about Python]].  You should be using version 3 (or greater) of Python. Additionally, you may find it helpful to look over the [[Regular Expressions|online textbook article about Regular Expressions]].&lt;br /&gt;
&lt;br /&gt;
=== Write some Regular Expressions ===&lt;br /&gt;
&lt;br /&gt;
Please write regular expressions that do each of the following:&lt;br /&gt;
&lt;br /&gt;
# Match the substring &amp;quot;hello world&amp;quot; in a string.&lt;br /&gt;
# Match all character strings in an input string that contain three or more consecutive vowels. The regex should match strings containing three or more consecutive vowels, regardless of whether the letters are uppercase, lowercase, or a mixture of both.&lt;br /&gt;
# Match an input string that is '''entirely''' a flight code, of the format AA####, where '''AA''' is a two-letter uppercase airline code, and '''####''' is a three- or four-digit flight number.&lt;br /&gt;
Examples:&lt;br /&gt;
   Note: text in ''[[red]]'' is matched by the regular expression. Please note that each line is a '''separate''' test input string. For Regex 3, '''six''' separate test cases are given.&lt;br /&gt;
   Regex 1:  Programmers will often write ''[[hello world]]'' as their first project with a programming language.&lt;br /&gt;
   Regex 2:  The ''[[gooey]]'' peanut butter and jelly sandwich was a ''[[beauty]]''.&lt;br /&gt;
   Regex 3:  ''[[AA312]]''&lt;br /&gt;
             ''[[AA1298]]''&lt;br /&gt;
             ''[[NW1234]]''&lt;br /&gt;
             ''[[US443]]''&lt;br /&gt;
             US31344&lt;br /&gt;
             AA123 extratext&lt;br /&gt;
&lt;br /&gt;
            &lt;br /&gt;
&lt;br /&gt;
Save your regexes to text files – one each.&lt;br /&gt;
&lt;br /&gt;
=== Baseball Stats Counter ===&lt;br /&gt;
&lt;br /&gt;
The St. Louis Cardinals are the most legendary baseball team in the national league.  In this exercise, you will be creating a Python script that reads box scores from a file and computes the Cardinals' players' batting averages in a particular season.&lt;br /&gt;
&lt;br /&gt;
==== Tips and Instructions ====&lt;br /&gt;
&lt;br /&gt;
* You should write a Python script file to solve this problem.&lt;br /&gt;
* You should use a regular expression to parse players' names, at-bats, hits, and runs from the input file.&lt;br /&gt;
* You may want to create a class to hold and compute information about each player.&lt;br /&gt;
* Your file should take one command-line argument: the path to an input file.  If no path is given, your program should print a usage message.&lt;br /&gt;
&lt;br /&gt;
==== Input ====&lt;br /&gt;
&lt;br /&gt;
Sample input files may be found here: http://classes.engineering.wustl.edu/cse330/content/cardinals/&lt;br /&gt;
&lt;br /&gt;
The top of the file contains a citation, and what follows is an entire season of Cardinals Baseball box scores.  Each game starts with a title; for example:&lt;br /&gt;
&lt;br /&gt;
 === St.Louis Cardinals vs. Chicago Cubs, 1940-04-19 ===&lt;br /&gt;
&lt;br /&gt;
What follows are the performance of each player in that game.  The format of each line is as follows:&lt;br /&gt;
&lt;br /&gt;
 XXX batted # times with # hits and # runs&lt;br /&gt;
&lt;br /&gt;
where '''XXX''' is the player's name (you may assume that the name is unique), and each '''#''' are integers representing the number of &amp;quot;at bats&amp;quot;, the number of &amp;quot;hits&amp;quot;, and the number of &amp;quot;runs&amp;quot;, respectively.&lt;br /&gt;
&lt;br /&gt;
==== Output ====&lt;br /&gt;
&lt;br /&gt;
Your script needs to output all players' batting average across the season.  A player's batting average is that player's total hits divided by that player's total at-bats throughout the entire season.  For example, Johnny Hopp was at bat 149 times in 1940, and he had 41 hits, so his batting average was 0.275.&lt;br /&gt;
&lt;br /&gt;
Each line in the output should have the format:&lt;br /&gt;
&lt;br /&gt;
 XXX: #.###&lt;br /&gt;
&lt;br /&gt;
where '''XXX''' is the player's name, and '''#.###''' is the player's batting average, '''rounded''' (not truncated) to three decimal places.&lt;br /&gt;
&lt;br /&gt;
The players should be sorted by batting average, with the highest batting average on top.  If two players have the exact same batting average (before rounding occurs), the order between those two players is unimportant.&lt;br /&gt;
&lt;br /&gt;
For example, the correct output for the 1940 season is:&lt;br /&gt;
&amp;lt;!-- Jimmy Brown was 0.280 and Ira Hutchinson was 0.125 --&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Pepper Martin: 0.316&lt;br /&gt;
Walker Cooper: 0.316&lt;br /&gt;
Johnny Mize: 0.314&lt;br /&gt;
Ernie Koy: 0.310&lt;br /&gt;
Enos Slaughter: 0.306&lt;br /&gt;
Joe Medwick: 0.304&lt;br /&gt;
Terry Moore: 0.304&lt;br /&gt;
Joe Orengo: 0.286&lt;br /&gt;
Jimmy Brown: 0.280&lt;br /&gt;
Marty Marion: 0.279&lt;br /&gt;
Don Gutteridge: 0.276&lt;br /&gt;
Johnny Hopp: 0.275&lt;br /&gt;
Creepy Crespi: 0.273&lt;br /&gt;
Mickey Owen: 0.265&lt;br /&gt;
Bill DeLancey: 0.250&lt;br /&gt;
Don Padgett: 0.242&lt;br /&gt;
Stu Martin: 0.238&lt;br /&gt;
Eddie Lake: 0.222&lt;br /&gt;
Hal Epps: 0.214&lt;br /&gt;
Lon Warneke: 0.209&lt;br /&gt;
Harry Walker: 0.185&lt;br /&gt;
Max Lanier: 0.179&lt;br /&gt;
Bill McGee: 0.178&lt;br /&gt;
Carl Doyle: 0.174&lt;br /&gt;
Mort Cooper: 0.157&lt;br /&gt;
Clyde Shoun: 0.145&lt;br /&gt;
Carden Gillenwater: 0.130&lt;br /&gt;
Bob Bowman: 0.067&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Baseball Stats MCP Extension ==&lt;br /&gt;
&lt;br /&gt;
=== Cardinals MCP Server ===&lt;br /&gt;
&lt;br /&gt;
This project builds a '''custom MCP server''' that lets you explore ''St. Louis Cardinals'' batting data from the '''1930''' and '''1940''' seasons — using the text files you made in the Baseball Stats Counter section.&lt;br /&gt;
&lt;br /&gt;
The MCP server reads player batting averages from text files, sorts them, and returns the results through '''Claude Desktop.'''&lt;br /&gt;
&lt;br /&gt;
For all of the assignment, feel free to use your favorite AI Tool to help.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== What Is an MCP Server? ===&lt;br /&gt;
&lt;br /&gt;
An '''MCP (Model Context Protocol)''' server is a local tool that '''Claude Desktop''' can talk to directly.  &lt;br /&gt;
It runs safely inside '''Docker''', allowing Claude to use your Python scripts — like this Cardinals data processor — through its chat interface.&lt;br /&gt;
&lt;br /&gt;
Learn more:&lt;br /&gt;
[[https://modelcontextprotocol.io/docs/getting-started/intro](https://modelcontextprotocol.io/docs/getting-started/intro)]&lt;br /&gt;
&lt;br /&gt;
Servers provide the fundamental building blocks for adding context to language models via MCP. These primitives enable interactions between clients, servers, and language models:&lt;br /&gt;
* '''Prompts''': Pre-defined templates or instructions that guide language model interactions&lt;br /&gt;
* '''Resources''': Structured data or content that provides additional context to the model&lt;br /&gt;
* '''Tools''': Executable functions that allow models to perform actions or retrieve information&lt;br /&gt;
&lt;br /&gt;
Each primitive can be summarized in the following control hierarchy:&lt;br /&gt;
&lt;br /&gt;
#### Where Prompts, Resources, and Tools Fit in the MCP Server&lt;br /&gt;
&lt;br /&gt;
- **Prompts**: In the context of this project, prompts are what the user will provide to interact with the MCP server. For example, if you want to fetch the top hitters from a particular season, you would issue a prompt like:  &lt;br /&gt;
  `&amp;quot;Show Johnny Mize’s batting averages for 1930 and 1940.&amp;quot;`  &lt;br /&gt;
  The prompt is user-controlled, and the system will interpret it to execute the appropriate action.&lt;br /&gt;
&lt;br /&gt;
- **Resources**: These are the data files — such as `cardinals-1930.txt` and `cardinals-1940.txt` — that your MCP server uses to provide additional context. These text files are **resources** that store structured data (player stats like batting averages) which the server can access to provide meaningful results when the user queries it.&lt;br /&gt;
&lt;br /&gt;
- **Tools**: The server exposes various **tools** that perform specific actions, like:&lt;br /&gt;
  - `get_player_stats`: Retrieve and show batting averages for a player.&lt;br /&gt;
  - `get_team_roster`: List all players from a given season.&lt;br /&gt;
  - `get_top_players`: Sort and show the top hitters.&lt;br /&gt;
  - `search_players`: Search for players by name.&lt;br /&gt;
&lt;br /&gt;
Each of these functions is a **tool** in the MCP system that the language model can call on when responding to prompts from the user.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== What Is Docker? ===&lt;br /&gt;
&lt;br /&gt;
'''Docker''' lets you run software in isolated, self-contained environments called '''containers'''.  &lt;br /&gt;
A container is like a tiny computer that holds everything your app needs — code, libraries, and dependencies — so it runs the same way on every machine.&lt;br /&gt;
&lt;br /&gt;
Claude uses Docker to safely run MCP tools '''without touching your main system'''.  &lt;br /&gt;
When you say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;“Use CardinalsMCP to calculate batting averages.”&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Claude doesn’t execute code directly. It asks Docker to launch your MCP container, which runs the script in isolation.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Goal ===&lt;br /&gt;
&lt;br /&gt;
You’ll build a '''Python-based MCP server''' that:&lt;br /&gt;
&lt;br /&gt;
* Reads Cardinals player batting averages from '''1930''' and '''1940''' text files&lt;br /&gt;
* Lists team rosters and top hitters&lt;br /&gt;
* Lets you search players or compare across seasons&lt;br /&gt;
* Runs inside Docker and connects to Claude Desktop&lt;br /&gt;
&lt;br /&gt;
After setup, you’ll be able to say things like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;“Use CardinalsMCP to show the top 10 hitters from 1940.”&amp;lt;/blockquote&amp;gt;  &lt;br /&gt;
&amp;lt;blockquote&amp;gt;“Get batting averages for Johnny Mize in both 1930 and 1940.”&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Claude will automatically run your tool and show the results.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Project Structure ===&lt;br /&gt;
&lt;br /&gt;
Your final folder will look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
cardinals-mcp/&lt;br /&gt;
├── Dockerfile&lt;br /&gt;
├── cardinals_server.py&lt;br /&gt;
├── requirements.txt&lt;br /&gt;
└── data/&lt;br /&gt;
    ├── cardinals-1930.txt&lt;br /&gt;
    └── cardinals-1940.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''/data''' directory contains the ''.txt'' files you created from the Baseball Stats Counter section — listing player names and batting averages.  &lt;br /&gt;
If you only printed the results, copy and paste them into ''.txt'' files.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
You’ll need:&lt;br /&gt;
&lt;br /&gt;
* [[https://www.docker.com/products/docker-desktop/](https://www.docker.com/products/docker-desktop/) Docker Desktop]&lt;br /&gt;
* [[https://claude.ai/download](https://claude.ai/download) Claude Desktop] (''not the browser version'')&lt;br /&gt;
&lt;br /&gt;
==== Enable MCP in Docker ====&lt;br /&gt;
&lt;br /&gt;
# Open '''Docker Desktop'''&lt;br /&gt;
&lt;br /&gt;
# Go to '''Settings → Beta Features'''&lt;br /&gt;
&lt;br /&gt;
# Enable '''“Docker MCP Toolkit”'''&lt;br /&gt;
&lt;br /&gt;
# Click '''Apply &amp;amp; Restart'''&lt;br /&gt;
&lt;br /&gt;
==== Connect Claude to Docker ====&lt;br /&gt;
&lt;br /&gt;
In Docker Desktop, go to '''Clients → Claude Desktop → Connect'''.  &lt;br /&gt;
If it says '''“Disconnect”''', you’re good to go.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Create the Files ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;cardinals_server.py&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
This is your main MCP script. It should:&lt;br /&gt;
&lt;br /&gt;
* Load player data from '''/data/cardinals-1930.txt''' and '''/data/cardinals-1940.txt'''&lt;br /&gt;
* Implement at least '''two tools''', such as:&lt;br /&gt;
  * **&amp;lt;code&amp;gt;get_player_stats&amp;lt;/code&amp;gt;**: Show batting averages for one player&lt;br /&gt;
  * **&amp;lt;code&amp;gt;get_team_roster&amp;lt;/code&amp;gt;**: List all players for a given season (1930 or 1940)&lt;br /&gt;
  * **&amp;lt;code&amp;gt;get_top_players&amp;lt;/code&amp;gt;**: Show the top hitters for a given season (by batting average)&lt;br /&gt;
  * **&amp;lt;code&amp;gt;search_players&amp;lt;/code&amp;gt;**: Find players by partial name and show their batting averages&lt;br /&gt;
&lt;br /&gt;
Each tool should be implemented as an **asynchronous function** decorated with `@mcp.tool()`. For example, the provided `get_player_stats` function uses the `@mcp.tool()` decorator to indicate that it's a tool that can be invoked by Claude.&lt;br /&gt;
&lt;br /&gt;
In this script, you need to:&lt;br /&gt;
&lt;br /&gt;
**Create MCP Tools**:&lt;br /&gt;
   - Implement at least 2 MCP tools (`get_player_stats`, `get_team_roster`, `get_top_players`, `search_players`). &lt;br /&gt;
   - Use the `@mcp.tool()` decorator to register each function as a tool that Claude can use.&lt;br /&gt;
   - Your functions should:&lt;br /&gt;
     - Retrieve data from the loaded player stats.&lt;br /&gt;
     - Perform calculations or sorting (e.g., finding the top hitters or listing all players for a season).&lt;br /&gt;
     - Return well-formatted strings with the results.&lt;br /&gt;
&lt;br /&gt;
==== Starter Code ====&lt;br /&gt;
&lt;br /&gt;
```python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import re&lt;br /&gt;
from datetime import datetime&lt;br /&gt;
from mcp.server.fastmcp import FastMCP&lt;br /&gt;
&lt;br /&gt;
# Initialize MCP server&lt;br /&gt;
mcp = FastMCP(&amp;quot;CardinalsMCP&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Data file paths&lt;br /&gt;
DATA_DIR = os.path.join(os.path.dirname(__file__), &amp;quot;data&amp;quot;)&lt;br /&gt;
CARDINALS_1930_FILE = os.path.join(DATA_DIR, &amp;quot;cardinals-1930.txt&amp;quot;)&lt;br /&gt;
CARDINALS_1940_FILE = os.path.join(DATA_DIR, &amp;quot;cardinals-1940.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# === Helper Functions (You DO NOT need to use these) ===&lt;br /&gt;
&lt;br /&gt;
def load_cardinals_data():&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Load Cardinals player data from both 1930 and 1940 files.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    data = {&amp;quot;1930&amp;quot;: [], &amp;quot;1940&amp;quot;: []}&lt;br /&gt;
    &lt;br /&gt;
    for year, file_path in [(&amp;quot;1930&amp;quot;, CARDINALS_1930_FILE), (&amp;quot;1940&amp;quot;, CARDINALS_1940_FILE)]:&lt;br /&gt;
        try:&lt;br /&gt;
            with open(file_path, 'r', encoding='utf-8') as f:&lt;br /&gt;
                content = f.read()&lt;br /&gt;
                data[year] = parse_player_data(content)&lt;br /&gt;
        except FileNotFoundError:&lt;br /&gt;
            logger.warning(f&amp;quot;Data file not found: {file_path}&amp;quot;)&lt;br /&gt;
        except Exception as e:&lt;br /&gt;
            logger.error(f&amp;quot;Error loading {year} data: {e}&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    return data&lt;br /&gt;
&lt;br /&gt;
def parse_player_data(content):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Parse player data from the simplified Cardinals text files.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    players = []&lt;br /&gt;
    &lt;br /&gt;
    for line in content.split('\n'):&lt;br /&gt;
        line = line.strip()&lt;br /&gt;
        if not line or line.startswith('#'):&lt;br /&gt;
            continue&lt;br /&gt;
            &lt;br /&gt;
        # Parse format: &amp;quot;Player Name: 0.XXX&amp;quot;&lt;br /&gt;
        if ':' in line:&lt;br /&gt;
            parts = line.split(':')&lt;br /&gt;
            if len(parts) == 2:&lt;br /&gt;
                name = parts[0].strip()&lt;br /&gt;
                try:&lt;br /&gt;
                    batting_avg = float(parts[1].strip())&lt;br /&gt;
                    players.append({&lt;br /&gt;
                        'name': name,&lt;br /&gt;
                        'batting_average': batting_avg&lt;br /&gt;
                    })&lt;br /&gt;
                except ValueError:&lt;br /&gt;
                    continue&lt;br /&gt;
    &lt;br /&gt;
    return players&lt;br /&gt;
&lt;br /&gt;
def get_all_players(data):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Get all unique players from the data.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    players = set()&lt;br /&gt;
    for year_data in data.values():&lt;br /&gt;
        for player in year_data:&lt;br /&gt;
            players.add(player['name'])&lt;br /&gt;
    return sorted(list(players))&lt;br /&gt;
&lt;br /&gt;
def get_player_by_name(data, player_name):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Get player data for a specific player.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    player_data = []&lt;br /&gt;
    for year, year_data in data.items():&lt;br /&gt;
        for player in year_data:&lt;br /&gt;
            if player['name'].lower() == player_name.lower():&lt;br /&gt;
                player_data.append({&lt;br /&gt;
                    'year': year,&lt;br /&gt;
                    'name': player['name'],&lt;br /&gt;
                    'batting_average': player['batting_average']&lt;br /&gt;
                })&lt;br /&gt;
    return player_data&lt;br /&gt;
&lt;br /&gt;
# === MCP Tools ===&lt;br /&gt;
&lt;br /&gt;
# This tool works - use to test your MCP connection. &lt;br /&gt;
@mcp.tool()&lt;br /&gt;
async def hello(name: str = &amp;quot;world&amp;quot;) -&amp;gt; str:&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Return a simple greeting to verify the server is working.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    return f&amp;quot;Hello CSE 3300 Student, {name}!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Only two tools are required here&lt;br /&gt;
&lt;br /&gt;
@mcp.tool()&lt;br /&gt;
async def get_player_stats(player: str = &amp;quot;&amp;quot;) -&amp;gt; str:&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Get a player's batting averages for both 1930 and 1940 seasons.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    # TODO: Implement the function to fetch player data using the 'load_cardinals_data' and 'get_player_by_name' functions&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
@mcp.tool()&lt;br /&gt;
async def get_team_roster(year: str = &amp;quot;1930&amp;quot;) -&amp;gt; str:&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Get the roster of the Cardinals for the given year, listing player names and batting averages.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    # TODO: Implement the function to fetch and list the team roster for the specified year (1930 or 1940)&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
@mcp.tool()&lt;br /&gt;
async def get_top_players(year: str = &amp;quot;1930&amp;quot;, limit: int = 10) -&amp;gt; str:&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Get the top Cardinals players for a specific year, sorted by batting average.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    # TODO: Implement this function to return the top 'limit' players sorted by their batting averages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@mcp.tool()&lt;br /&gt;
async def search_players(search_term: str = &amp;quot;&amp;quot;) -&amp;gt; str:&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Search for Cardinals players by name and show their batting averages.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    # TODO: Implement this function to search for players by name and return their batting averages&lt;br /&gt;
&lt;br /&gt;
# === Server Startup ===&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;quot;__main__&amp;quot;:&lt;br /&gt;
    logger.info(&amp;quot;Starting Cardinals Historical Data MCP server...&amp;quot;)&lt;br /&gt;
    try:&lt;br /&gt;
        mcp.run(transport=&amp;quot;stdio&amp;quot;)&lt;br /&gt;
    except Exception as e:&lt;br /&gt;
        logger.error(f&amp;quot;Server error: {e}&amp;quot;, exc_info=True)&lt;br /&gt;
        sys.exit(1)&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;Dockerfile&amp;lt;/code&amp;gt; ====&lt;br /&gt;
```&lt;br /&gt;
FROM python:3.11-slim&lt;br /&gt;
&lt;br /&gt;
LABEL maintainer=&amp;quot;cardinals_server&amp;quot;&lt;br /&gt;
ENV PYTHONUNBUFFERED=1&lt;br /&gt;
&lt;br /&gt;
WORKDIR /app&lt;br /&gt;
&lt;br /&gt;
# Copy dependencies&lt;br /&gt;
&lt;br /&gt;
COPY requirements.txt /app/requirements.txt&lt;br /&gt;
RUN pip install --no-cache-dir -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
# Copy application files&lt;br /&gt;
&lt;br /&gt;
COPY cardinals_server.py /app/cardinals_server.py&lt;br /&gt;
COPY data/ /app/data/&lt;br /&gt;
COPY *.md /app/&lt;br /&gt;
&lt;br /&gt;
# Create non-root user&lt;br /&gt;
&lt;br /&gt;
RUN useradd -m -u 1000 mcpuser &amp;amp;&amp;amp; chown -R mcpuser:mcpuser /app&lt;br /&gt;
USER mcpuser&lt;br /&gt;
&lt;br /&gt;
CMD [&amp;quot;python&amp;quot;, &amp;quot;/app/cardinals_server.py&amp;quot;]&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;requirements.txt&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
mcp&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
That’s all you need unless you use extra libraries.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Build and Test the Container ===&lt;br /&gt;
&lt;br /&gt;
Build your Docker image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ docker build -t cardinals-mcp-server:latest .&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ docker run --rm -it cardinals-mcp-server&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it launches correctly, you’ll see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
2025-10-19 20:00:00,000 - CardinalsMCP-server - INFO - Starting Cardinals Historical Data MCP server...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Connect in Claude Desktop ===&lt;br /&gt;
&lt;br /&gt;
==== Open Claude Desktop Settings ====&lt;br /&gt;
&lt;br /&gt;
On macOS, click '''Claude → Settings…''' from the top menu bar.  &lt;br /&gt;
(''Do not use the settings inside the Claude chat window; you need the app-level settings.'')&lt;br /&gt;
&lt;br /&gt;
This opens the '''Claude Desktop Settings''' panel — separate from your Claude account settings.&lt;br /&gt;
&lt;br /&gt;
==== Go to Developer Settings ====&lt;br /&gt;
&lt;br /&gt;
In the Settings window, select the '''Developer''' tab in the left sidebar.  &lt;br /&gt;
This section manages MCP servers and other developer tools.&lt;br /&gt;
&lt;br /&gt;
Click '''Edit Config''' to open the configuration file.  &lt;br /&gt;
If you don’t have one yet, Claude will create it automatically.&lt;br /&gt;
&lt;br /&gt;
'''Configuration file locations:'''&lt;br /&gt;
&lt;br /&gt;
* macOS: &amp;lt;code&amp;gt;~/Library/Application Support/Claude/claude_desktop_config.json&amp;lt;/code&amp;gt;&lt;br /&gt;
* Windows: &amp;lt;code&amp;gt;%APPDATA%\Claude\claude_desktop_config.json&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==== Add the MCP Gateway Configuration ====&lt;br /&gt;
&lt;br /&gt;
Replace (or merge) the contents of the file with the JSON below.  &lt;br /&gt;
This tells Claude to launch the '''Docker MCP Gateway''', which connects to your custom Cardinals MCP Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;mcpServers&amp;quot;: {&lt;br /&gt;
    &amp;quot;cardinals-mcp-server&amp;quot;: {&lt;br /&gt;
      &amp;quot;command&amp;quot;: &amp;quot;docker&amp;quot;,&lt;br /&gt;
      &amp;quot;args&amp;quot;: [&lt;br /&gt;
        &amp;quot;run&amp;quot;,&lt;br /&gt;
        &amp;quot;--rm&amp;quot;,&lt;br /&gt;
        &amp;quot;-i&amp;quot;,&lt;br /&gt;
        &amp;quot;cardinals-mcp-server:latest&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==== Restart Claude Desktop ====&lt;br /&gt;
&lt;br /&gt;
After saving the file:&lt;br /&gt;
&lt;br /&gt;
# Completely quit Claude Desktop (not just close the window).&lt;br /&gt;
# Reopen it.&lt;br /&gt;
&lt;br /&gt;
Claude will now start the MCP Gateway automatically.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly, you’ll see a small MCP indicator in the lower-right corner of the chat input box.  &lt;br /&gt;
Click it to view all available tools — including your '''Cardinals MCP Server'''.&lt;br /&gt;
&lt;br /&gt;
Once connected, you can run commands like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;“Use CardinalsMCP to list the top 10 hitters from 1940.”&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Test It Out ===&lt;br /&gt;
&lt;br /&gt;
Open a new chat in Claude and try:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;“Use CardinalsMCP to list the 1940 Cardinals roster sorted by batting average.”&amp;lt;/blockquote&amp;gt;  &lt;br /&gt;
&amp;lt;blockquote&amp;gt;“Show Johnny Mize’s batting averages for 1930 and 1940.”&amp;lt;/blockquote&amp;gt;  &lt;br /&gt;
&amp;lt;blockquote&amp;gt;“Who were the top 5 hitters on the 1930 Cardinals?”&amp;lt;/blockquote&amp;gt;  &lt;br /&gt;
&amp;lt;blockquote&amp;gt;“Search for players with ‘Martin’ in their name.”&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Claude will call your MCP tool, execute your Python script inside Docker, and display formatted results.&lt;br /&gt;
&lt;br /&gt;
== Grading ==&lt;br /&gt;
&lt;br /&gt;
We will be grading the following aspects of your work.  There are 50 points total.&lt;br /&gt;
&lt;br /&gt;
'''Assignments (including code) must be committed to Github by the end of class on the due date (commit early and often). Failing to commit by the end of class on the due date will result in a 0. ''' &lt;br /&gt;
&lt;br /&gt;
Upload your baseball code and a file with your Regular expressions.&lt;br /&gt;
&lt;br /&gt;
# '''Regular Expressions (15 Points):'''&lt;br /&gt;
#* '''Your regex files should contain your regex (with no delimiters or flags) and nothing else.'''&lt;br /&gt;
#* Regular Expression 1 Correct and saved in a file named &amp;lt;code&amp;gt;regex1.txt&amp;lt;/code&amp;gt; (5 points)&lt;br /&gt;
#* Regular Expression 2 Correct and saved in a file named &amp;lt;code&amp;gt;regex2.txt&amp;lt;/code&amp;gt; (5 points)&lt;br /&gt;
#* Regular Expression 3 Correct and saved in a file named &amp;lt;code&amp;gt;regex3.txt&amp;lt;/code&amp;gt; (5 points)&lt;br /&gt;
&lt;br /&gt;
# '''Baseball Stats Counter (25 Points):'''&lt;br /&gt;
#* Solution is written entirely in Python and saved in a file named &amp;lt;code&amp;gt;baseball.py&amp;lt;/code&amp;gt; (5 points)&lt;br /&gt;
#*: ''Note: Failing to write your code in Python 3 will result in losing, at a minimum, points for this category.''&lt;br /&gt;
#* Correct usage of one or more regular expressions to parse and extract data from each line of the input file (5 points)&lt;br /&gt;
#*: ''Note: You should not be using &amp;lt;code&amp;gt;str.split&amp;lt;/code&amp;gt; to extract data.''&lt;br /&gt;
#* Script prints a usage message if a command line argument is not present (3 points)&lt;br /&gt;
#*: ''Note: For an example of a usage message, see [https://en.wikipedia.org/wiki/Usage_message#Examples this link.]''&lt;br /&gt;
#* Output is correct for all test cases (12 points)&lt;br /&gt;
#*: ''This includes sorting and rounding.''&lt;br /&gt;
&lt;br /&gt;
# '''Baseball Stats MCP Extension (10 Points):'''&lt;br /&gt;
#* '''Docker image builds successfully without errors (5 points)'''&lt;br /&gt;
#*: ''MCP server (`cardinals_server.py`) loads player data and returns correct results.''&lt;br /&gt;
#* '''Includes at least 2 MCP tools (3 points)'''&lt;br /&gt;
#*: ''Each tool must function correctly and return expected output through Claude Desktop.''&lt;br /&gt;
#* '''README includes 3 different example prompts used in Claude (2 points)'''&lt;br /&gt;
#*: ''Each example should show the prompt you asked and the MCP’s response.''&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 4]]&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Todd</name></author>
		
	</entry>
</feed>