{"id":1254,"date":"2026-04-06T10:53:27","date_gmt":"2026-04-06T17:53:27","guid":{"rendered":"https:\/\/www.kenwalger.com\/blog\/?p=1254"},"modified":"2026-03-30T08:28:01","modified_gmt":"2026-03-30T15:28:01","slug":"mcp-quickstart-typescript-vs-python","status":"publish","type":"post","link":"https:\/\/www.kenwalger.com\/blog\/ai\/mcp-quickstart-typescript-vs-python\/","title":{"rendered":"Building Your First MCP Server: TypeScript vs. Python"},"content":{"rendered":"<h3>The 5-Minute &#8220;Hello World&#8221; Comparison<\/h3>\n<p>We\u2019ve spent the last month talking about the <a href=\"https:\/\/www.kenwalger.com\/blog\/ai\/mcp-usb-c-moment-ai-architecture\/\">End of Glue Code<\/a> and the <a href=\"https:\/\/www.kenwalger.com\/blog\/ai\/mcp\/the-final-boss-enterprise-governance-scalability\/\">Enterprise AI Mesh<\/a>. But if you\u2019re a developer, you don&#8217;t just want to see the blueprint\u2014you want to hold the tools.<\/p>\n<p>Whether you are a <a href=\"https:\/\/www.typescriptlang.org\/\">TypeScript<\/a> veteran or a <a href=\"https:\/\/www.python.org\/\">Python<\/a> enthusiast, building an MCP server is surprisingly simple. Today, we\u2019re going to build the same &#8220;Hello World&#8221; tool in both languages to show you exactly how the protocol abstracts away the complexity.<\/p>\n<h2>1. The TypeScript Approach (Node.js)<\/h2>\n<p>TypeScript is the &#8220;native&#8221; language of the Model Context Protocol, and the <code>@modelcontextprotocol\/sdk<\/code> is exceptionally robust for high-performance enterprise tools.<\/p>\n<p><strong>Prerequisites:<\/strong><\/p>\n<pre><code class=\"language-bash\">npm install @modelcontextprotocol\/sdk zod\n<\/code><\/pre>\n<p><strong>The Code:<\/strong><\/p>\n<pre><code class=\"language-typescript\">import { Server } from \"@modelcontextprotocol\/sdk\/server\/index.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol\/sdk\/server\/stdio.js\";\nimport { z } from \"zod\";\n\nconst server = new Server({\n  name: \"hello-world-server\",\n  version: \"1.0.0\",\n}, {\n  capabilities: { tools: {} }\n});\n\n\/\/ Define a simple greeting tool\nserver.tool(\n  \"greet_user\",\n  { name: z.string().describe(\"The name of the person to greet\") },\n  async ({ name }) =&gt; {\n    return {\n      content: [{ type: \"text\", text: `Hello, ${name}! Welcome to the MCP Mesh.` }]\n    };\n  }\n);\n\nasync function main() {\n  const transport = new StdioServerTransport();\n  await server.connect(transport);\n}\n\nmain().catch(console.error);\n<\/code><\/pre>\n<h2>2. The Python Approach<\/h2>\n<p>For data scientists and AI engineers, the Python SDK offers a beautifully decorative approach. It feels more &#8220;agent-native&#8221; and integrates seamlessly with existing AI libraries.<\/p>\n<p><strong>Prerequisites:<\/strong><\/p>\n<pre><code class=\"language-bash\">pip install mcp\n<\/code><\/pre>\n<p><strong>The Code:<\/strong><\/p>\n<pre><code class=\"language-python\">import asyncio\nfrom mcp.server.fastmcp import FastMCP\n\n# Initialize FastMCP - the \"Quick Start\" wrapper\nmcp = FastMCP(\"HelloWorld\")\n\n@mcp.tool()\nasync def greet_user(name: str) -&gt; str:\n    \"\"\"Greets a user by name.\"\"\"\n    return f\"Hello, {name}! Welcome to the MCP Mesh.\"\n\nif __name__ == \"__main__\":\n    mcp.run(transport='stdio')\n<\/code><\/pre>\n<h2>Side-by-Side: Which Should You Choose?<\/h2>\n<table>\n<thead>\n<tr>\n<th>Feature<\/th>\n<th>TypeScript (Standard SDK)<\/th>\n<th>Python (FastMCP)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Best For<\/strong><\/td>\n<td>High-performance, Type-safe tools<\/td>\n<td>Rapid prototyping, AI logic<\/td>\n<\/tr>\n<tr>\n<td><strong>Validation<\/strong><\/td>\n<td>Zod (Explicit &amp; Strict)<\/td>\n<td>Pydantic \/ Type Hints (Implicit)<\/td>\n<\/tr>\n<tr>\n<td><strong>Verbosity<\/strong><\/td>\n<td>Moderate (Structured)<\/td>\n<td>Minimal (Decorator-based)<\/td>\n<\/tr>\n<tr>\n<td><strong>Transport<\/strong><\/td>\n<td>STDIO, SSE, Custom<\/td>\n<td>STDIO, SSE<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How to Test Your Server<\/h2>\n<p>Once you&#8217;ve saved your code, you don&#8217;t need a complex frontend to test it. Use the <strong>MCP Inspector:<\/strong><\/p>\n<pre><code class=\"language-bash\"># For TypeScript\nnpx @modelcontextprotocol\/inspector node build\/index.js\n\n# For Python\nnpx @modelcontextprotocol\/inspector python your_script.py\n<\/code><\/pre>\n<p>This will launch a local web interface where you can perform the &#8220;Protocol Handshake&#8221; and trigger your tools manually. It&#8217;s the best way to verify your &#8220;Zero-Glue&#8221; infrastructure before connecting it to an agent.<\/p>\n<h2>Conclusion<\/h2>\n<p>The &#8220;Zero-Glue&#8221; architecture isn&#8217;t about which language you use\u2014it&#8217;s about the <em>Protocol<\/em>. As you can see, the logic for the &#8220;Hello World&#8221; tool is nearly identical in both versions. The Model Context Protocol ensures that no matter how you build your tools, your agents can discover and use them in a standardized way.<\/p>\n<h3>Ready to build your own?<\/h3>\n<p>Check out the reference repo for more complex examples, including Notion and Oracle 26ai integrations.<\/p>\n<p><a href=\"https:\/\/github.com\/kenwalger\/mcp-forensic-analyzer\">MCP Forensic Analyzer Repository<\/a><\/p>\n<h2>The &#8220;Zero-Glue&#8221; Series<\/h2>\n<ul>\n<li>Post 1: <a href=\"https:\/\/www.kenwalger.com\/blog\/ai\/mcp-usb-c-moment-ai-architecture\/\">The End of Glue Code: Why MCP is the USB-C Moment for AI<\/a><\/li>\n<li>Post 2: <a href=\"https:\/\/www.kenwalger.com\/blog\/ai\/mcp-multi-agent-orchestration-forensics\/\">The Forensic Team: Architecting Multi-Agent Handoffs<\/a><\/li>\n<li>Post 3: <a href=\"https:\/\/www.kenwalger.com\/blog\/uncategorized\/from-cloud-to-laptop-running-mcp-agents-with-small-language-models\/\">From Cloud to Laptop: Running MCP Agents with SLMs<\/a><\/li>\n<li>Post 4: <a href=\"https:\/\/www.kenwalger.com\/blog\/ai\/the-final-boss-enterprise-governance-scalability\">Enterprise Governance: Scaling MCP with Oracle 26ai<\/a><\/li>\n<\/ul>\n<h2>What&#8217;s Next?<\/h2>\n<p>The Mesh is built.<br \/>The agents are ready.<br \/>But can you trust them?<\/p>\n<p>In my next series, we explore the &#8216;Science of Reliability&#8217;\u2014building the evaluators that turn AI experiments into production-grade systems.<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1254&#038;t=Building%20Your%20First%20MCP%20Server%3A%20TypeScript%20vs.%20Python&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1254&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=Building%20Your%20First%20MCP%20Server%3A%20TypeScript%20vs.%20Python\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/facebook.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1254&#038;text=Hey%20check%20this%20out\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/twitter.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-reddit nolightbox\" data-provider=\"reddit\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Reddit\" href=\"https:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1254&#038;title=Building%20Your%20First%20MCP%20Server%3A%20TypeScript%20vs.%20Python\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"reddit\" title=\"Share on Reddit\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/reddit.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1254&#038;title=Building%20Your%20First%20MCP%20Server%3A%20TypeScript%20vs.%20Python\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/linkedin.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Building%20Your%20First%20MCP%20Server%3A%20TypeScript%20vs.%20Python&#038;body=Hey%20check%20this%20out:%20https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1254\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/mail.png?resize=48%2C48&#038;ssl=1\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>The 5-Minute &#8220;Hello World&#8221; Comparison We\u2019ve spent the last month talking about the End of Glue Code and the Enterprise AI Mesh. But if you\u2019re a developer, you don&#8217;t just want to see the blueprint\u2014you want to hold the tools. Whether you are a TypeScript veteran or a Python enthusiast, building an MCP server is &hellip; <a href=\"https:\/\/www.kenwalger.com\/blog\/ai\/mcp-quickstart-typescript-vs-python\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Building Your First MCP Server: TypeScript vs. Python&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pmpro_default_level":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1669,1670],"tags":[1701,1703,1680,1671,78,1402,1682,1702],"yst_prominent_words":[1032,132,722,433,352,1104],"class_list":["post-1254","post","type-post","status-publish","format-standard","hentry","category-ai","category-mcp","tag-ai-development","tag-fastmcp","tag-mcp","tag-model-context-protocol","tag-python","tag-tutorial","tag-typescript","tag-zod","pmpro-has-access"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8lx70-ke","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts\/1254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/comments?post=1254"}],"version-history":[{"count":6,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts\/1254\/revisions"}],"predecessor-version":[{"id":1428,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts\/1254\/revisions\/1428"}],"wp:attachment":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/media?parent=1254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/categories?post=1254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/tags?post=1254"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=1254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}