<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Akshay Galande on Medium]]></title>
        <description><![CDATA[Stories by Akshay Galande on Medium]]></description>
        <link>https://medium.com/@mybytecode?source=rss-364f178cf1fb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gyCZs2BnplpJwtMU8vg8tw.jpeg</url>
            <title>Stories by Akshay Galande on Medium</title>
            <link>https://medium.com/@mybytecode?source=rss-364f178cf1fb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 10:31:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mybytecode/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Use Claude Code with Azure AI Foundry Models]]></title>
            <link>https://medium.com/@mybytecode/how-to-use-claude-code-with-azure-ai-foundry-models-b8c4e292a8e4?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8c4e292a8e4</guid>
            <category><![CDATA[ai-coding]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[azureaifoundry]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Fri, 04 Sep 2026 17:24:58 GMT</pubDate>
            <atom:updated>2026-09-04T17:37:06.538Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sD7LrHscLlgXydoQ5TLmaw.png" /></figure><p>Claude Code can use Claude models deployed through <strong>Microsoft Azure AI Foundry</strong> instead of connecting directly to Anthropic.</p><p>This is useful if you already use Azure and want to manage your Claude models, authentication, and billing through your Azure infrastructure.</p><p>Here is how to set it up.</p><h3>Step 1: Set Up Azure AI Foundry</h3><p>Sign in to the <a href="https://portal.azure.com/auth/login/">Azure Portal</a> and open <a href="https://ai.azure.com/">Microsoft Foundry</a>.</p><p>Create a Foundry resource and deploy the Claude models you want to use.</p><p>For example:</p><pre>claude-opus-4-6<br>claude-sonnet-4-6<br>claude-haiku-4-5</pre><p>Model availability depends on your Azure subscription and region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9crYO6CP_0fBaeChlfSdQA.png" /></figure><p>You will also need your <strong>Foundry resource name</strong>. You can find it under your project details.</p><h3>Step 2: Install Azure CLI</h3><p>On macOS:</p><pre>brew install azure-cli</pre><p>Then authenticate:</p><pre>az login</pre><p>Verify your active account:</p><pre>az account show</pre><h3>Step 3: Configure Claude Code</h3><p>Open your Claude Code configuration:</p><pre>nano ~/.claude/settings.json</pre><p>Add your Foundry configuration:</p><pre>{<br>  &quot;env&quot;: {<br>    &quot;CLAUDE_CODE_USE_FOUNDRY&quot;: &quot;1&quot;,<br>    &quot;ANTHROPIC_FOUNDRY_RESOURCE&quot;: &quot;your-resource-name&quot;,<br>    &quot;ANTHROPIC_DEFAULT_OPUS_MODEL&quot;: &quot;claude-opus-4-6&quot;,<br>    &quot;ANTHROPIC_DEFAULT_SONNET_MODEL&quot;: &quot;claude-sonnet-4-6&quot;,<br>    &quot;ANTHROPIC_DEFAULT_HAIKU_MODEL&quot;: &quot;claude-haiku-4-5&quot;,<br>    &quot;ENABLE_PROMPT_CACHING_1H&quot;: &quot;1&quot;<br>  },<br>  &quot;model&quot;: &quot;opus&quot;<br>}</pre><p>Replace your-resource-name with your Azure AI Foundry resource name.</p><h3>How to Find Your Resource Name</h3><p>Copy your <strong>Project Endpoint</strong> from Microsoft Foundry. The endpoint follows this format:</p><pre>https://&lt;resource-name&gt;.services.ai.azure.com/api/projects/&lt;project-name&gt;</pre><p>For example:</p><pre>https://contexa-resource.services.ai.azure.com/api/projects/contexa</pre><p>The value before .services.ai.azure.com is your <strong>resource name</strong>:</p><pre>contexa-resource</pre><p>Use this value for:</p><pre>&quot;ANTHROPIC_FOUNDRY_RESOURCE&quot;: &quot;contexa-resource&quot;</pre><p>The model values should match the <strong>deployment names</strong> you created in Foundry.</p><h3>Step 4: Start Claude Code</h3><p>Go to your project and run:</p><pre>claude</pre><p>Claude Code should now authenticate using your Azure session and send Claude requests through Microsoft Foundry.</p><p>To verify it, run:</p><pre>/status</pre><p>You should see:</p><pre>API provider: Microsoft Foundry</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eZF8gpohLTriUTfTVi3Xcw.png" /></figure><p>That’s it. You can now use Claude Code normally while running Claude models through Azure AI Foundry.</p><h3>Useful Links</h3><ul><li><a href="https://ai.azure.com/">Microsoft Foundry</a></li><li><a href="https://portal.azure.com/">Azure Portal</a></li><li><a href="https://learn.microsoft.com/en-us/azure/foundry/foundry-models/how-to/configure-claude-code">Official Microsoft Claude Code setup guide</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8c4e292a8e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Hidden Tax Your On-Call Rotation Is Charging Your Team]]></title>
            <link>https://medium.com/@mybytecode/the-hidden-tax-your-on-call-rotation-is-charging-your-team-b84e2df83ecd?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b84e2df83ecd</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[on-call-rotation]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 20:39:39 GMT</pubDate>
            <atom:updated>2026-06-30T20:39:39.423Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m2MtjW1v1N2HA1rq66krMg.png" /></figure><p>There’s a number most engineering leaders don’t track: the real cost of their on-call rotation.</p><p>Not the PagerDuty bill. Not the pager pay. The actual cost — measured in burned out engineers, slower sprint velocity, compounding bugs, and the quiet resignation emails that always seem to come the month after a bad on-call week.</p><p>I’ve spent the last year talking to engineering teams about their on-call experience. The conversations are remarkably similar regardless of company size, stack, or industry. The pain is the same everywhere. Here’s what I keep hearing.</p><p><strong>The 62% problem</strong></p><p>Across every team I’ve talked to, the rough number is consistent: somewhere between 55 and 70 percent of production pages are for issues the team has already solved before.</p><p>Not the same bug in the same service. The same pattern in a different service. A null check that was fixed in the checkout service in March pages someone in the payments service in June. A timeout retry that was handled in the API gateway shows up as a new incident in the notification service.</p><p>The knowledge exists inside the organization. It’s sitting in a merged PR from three months ago. But the engineer getting paged at 2am has no way to know that. So they start from scratch. Read the stack trace. Form a hypothesis. Write the fix. Run the tests. Open a PR. Two hours later, they go back to sleep — having essentially duplicated work that already existed somewhere in the codebase.</p><p>This is the core inefficiency of on-call. Not that the problems are hard. Most of them aren’t. It’s that the system has no memory.</p><p><strong>The day-after tax</strong></p><p>The incident itself is only the beginning of the cost. The real damage happens the next morning.</p><p>The engineer who got paged at 3am shows up to standup running on four hours of sleep. They context-switch poorly. Their code quality drops. They skip the thorough review they’d normally do. They rubber-stamp a PR that introduces a subtle bug — which becomes next week’s 3am page for someone else.</p><p>I call this “on-call debt.” It works exactly like technical debt. Each incident doesn’t just cost the time to fix it. It reduces the team’s capacity to prevent the next one. And like technical debt, it compounds quietly until something breaks badly enough that leadership finally notices.</p><p>But by then, the senior engineer who could have prevented it has already accepted an offer somewhere else.</p><p><strong>The retention problem nobody talks about</strong></p><p>Here’s the stat that should keep engineering leaders up at night: roughly one in four senior engineers say on-call is their primary reason for leaving a company.</p><p>Not compensation. Not the tech stack. Not the manager. The 3am pages.</p><p>This makes sense when you think about it from the engineer’s perspective. They spent years developing deep expertise. They can architect systems, mentor juniors, and solve genuinely hard problems. And they’re being woken up at 3am to add a null check.</p><p>The mismatch between their skill level and the work they’re being paged for is what drives the frustration. It’s not that they can’t do it. It’s that they shouldn’t have to.</p><p>When a senior engineer leaves because of on-call burnout, the replacement cost is staggering. Six months of recruiting. Six months of ramping. A year of lost institutional knowledge. For a 10-person team, on-call-driven turnover can easily cost $200K to $300K per year in hidden replacement costs alone.</p><p><strong>The tool chain gap</strong></p><p>The irony is that engineering teams have never had more tools. Sentry catches the error. Datadog shows the metrics. PagerDuty wakes someone up. Slack broadcasts the alert to the whole channel.</p><p>Detect. Notify. Amplify. Human.</p><p>That’s the current workflow. Every tool in the chain is doing its job. But notice what’s missing: nothing in that chain does the actual work. Every tool passes the incident to the next one until a human picks it up.</p><p>We have AI that can write code, generate tests, refactor entire files. But the on-call workflow still terminates at a sleepy engineer with a laptop. The tooling around the incident is sophisticated. The resolution is still completely manual.</p><p><strong>The split that should exist</strong></p><p>Not every incident needs a human. That’s the uncomfortable truth that the current on-call model refuses to acknowledge.</p><p>When you look at the 62% of repeat-pattern pages, these are incidents where the diagnosis is straightforward, the fix is small, and the risk is low. A null check. A timeout retry. An unhandled promise. A missing error boundary.</p><p>These don’t require creativity or architectural judgment. They require pattern recognition and the mechanical work of writing a fix, running tests, and opening a PR.</p><p>Meanwhile, the other 38% — the genuinely novel failures, the cascading incidents, the architectural problems — these absolutely need a human. They need someone who understands the system deeply, can reason about edge cases, and can make judgment calls under pressure.</p><p>The split should be:</p><p>Routine incidents get handled automatically. Complex incidents get escalated to humans with full context so they can solve, not investigate.</p><p>Tier 1: automation. Tier 2: your best engineers.</p><p>This isn’t a futuristic idea. It’s how every other operational domain works. Customer support has had tier-1 automation for years. IT helpdesks auto-resolve password resets. Network operations centers auto-remediate known failure patterns.</p><p>Software engineering is the last holdout. And the cost of that holdout is measured in burnout, turnover, and lost velocity.</p><p><strong>What would have to be true</strong></p><p>For this split to work, you’d need something that can do four things:</p><p>First, it needs to understand production errors at the code level. Not just “this service is throwing 500s” but “this is a null reference on line 47 of checkout.ts because session.user can be undefined when the auth token expires.”</p><p>Second, it needs pattern memory across services. If Service A fixed this exact pattern three months ago, the system should know that and apply the same approach.</p><p>Third, it needs to actually produce the fix. Not a suggestion. Not a recommendation. A working code change with tests that passes CI and is ready for human review.</p><p>Fourth, it needs to know its own limits. When the incident is too complex or the confidence is too low, it should escalate immediately with full diagnostic context — not attempt a fix it’s not sure about.</p><p>This is the problem we set out to solve with BugOps. It connects to your monitoring and version control, handles the routine incidents autonomously, and escalates the hard ones to your team with everything they need to resolve quickly.</p><p>But regardless of what tool solves it, the underlying shift is overdue. Engineering teams deserve an on-call model that respects the difference between routine work and genuinely hard problems. The current model treats every incident like it needs a human. It doesn’t. And the humans are paying the price.</p><p><strong>The question I’d leave you with</strong></p><p>Look at your team’s on-call data from the last three months. Count the pages that were repeat patterns. Count the ones that were genuinely novel.</p><p>If the split is anywhere close to 60/40, your team is spending most of their on-call time on work that shouldn’t require them.</p><p>The question isn’t whether to automate the routine 60%. It’s how long your team can sustain the cost of not doing it.</p><p>bugops.app</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b84e2df83ecd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamic Gateways in ContexaAI (Synqed): Instantly Expose MCP Tools Without Manual Configuration]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mybytecode/dynamic-gateways-in-contexaai-synqed-instantly-expose-mcp-tools-without-manual-configuration-f9463751be1f?source=rss-364f178cf1fb------2"><img src="https://cdn-images-1.medium.com/max/1870/1*U4NFCSOaG5Sr4sf5gw3BLw.png" width="1870"></a></p><p class="medium-feed-snippet">As organizations adopt more AI agents, MCP servers, and enterprise integrations, one challenge appears repeatedly:</p><p class="medium-feed-link"><a href="https://medium.com/@mybytecode/dynamic-gateways-in-contexaai-synqed-instantly-expose-mcp-tools-without-manual-configuration-f9463751be1f?source=rss-364f178cf1fb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mybytecode/dynamic-gateways-in-contexaai-synqed-instantly-expose-mcp-tools-without-manual-configuration-f9463751be1f?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9463751be1f</guid>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Sun, 31 May 2026 09:31:30 GMT</pubDate>
            <atom:updated>2026-05-31T09:31:30.464Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Choosing Between ClickHouse and BigQuery for Analytics: A Detailed Comparison]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mybytecode/choosing-between-clickhouse-and-bigquery-for-analytics-a-detailed-comparison-29e8fb06daed?source=rss-364f178cf1fb------2"><img src="https://cdn-images-1.medium.com/max/1019/1*DEVeN4u6I8O6LEmWMAcNkQ.png" width="1019"></a></p><p class="medium-feed-snippet">In the world of modern analytics, selecting the right platform to store and analyze your data can significantly impact your organization&#x2019;s&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@mybytecode/choosing-between-clickhouse-and-bigquery-for-analytics-a-detailed-comparison-29e8fb06daed?source=rss-364f178cf1fb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mybytecode/choosing-between-clickhouse-and-bigquery-for-analytics-a-detailed-comparison-29e8fb06daed?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/29e8fb06daed</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[big-data-analytics]]></category>
            <category><![CDATA[google-big-query]]></category>
            <category><![CDATA[clickhouse]]></category>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Mon, 01 Dec 2025 22:11:29 GMT</pubDate>
            <atom:updated>2025-12-01T22:11:29.047Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Air Quality Data, Decoupled: How Our Open-Source MCP Server Simplifies Google AQI for Agents]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mybytecode/air-quality-data-decoupled-how-our-open-source-mcp-server-simplifies-google-aqi-for-agents-5a9a5a4b64fb?source=rss-364f178cf1fb------2"><img src="https://cdn-images-1.medium.com/max/1023/1*YQSNXjkpzAmr74Z2F8vBOA.png" width="1023"></a></p><p class="medium-feed-snippet">Integrating reliable, real-time environmental data into Large Language Model (LLM) agents is a recurring development hurdle.</p><p class="medium-feed-link"><a href="https://medium.com/@mybytecode/air-quality-data-decoupled-how-our-open-source-mcp-server-simplifies-google-aqi-for-agents-5a9a5a4b64fb?source=rss-364f178cf1fb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mybytecode/air-quality-data-decoupled-how-our-open-source-mcp-server-simplifies-google-aqi-for-agents-5a9a5a4b64fb?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a9a5a4b64fb</guid>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[mcp-client]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[mcp-protocol]]></category>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Mon, 01 Dec 2025 22:03:33 GMT</pubDate>
            <atom:updated>2025-12-01T22:03:33.196Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Build an MCP Server in Go with Streamable HTTP Transport]]></title>
            <link>https://medium.com/@mybytecode/how-to-build-an-mcp-server-in-go-with-streamable-http-transport-11a43c4797ef?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/11a43c4797ef</guid>
            <category><![CDATA[ai-tools]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[mcp-protocol]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Fri, 22 Aug 2025 11:15:07 GMT</pubDate>
            <atom:updated>2025-08-22T11:19:55.280Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_TXXjtKCRD4RuDNOn0_NlA.png" /></figure><p>The <strong>Model Context Protocol (MCP)</strong> is a powerful way to expose your application’s tools and data to AI models in a structured and standardized way. With MCP, you can define tools (functions) in your service and make them available to AI clients through transports such as HTTP, WebSockets, or streams.</p><p>In this post, we’ll walk through how to build a <strong>simple MCP server in Go</strong> using the <a href="https://github.com/modelcontextprotocol/go-sdk">go-sdk</a>, and expose it via a <strong>streamable HTTP transport</strong>.</p><p>By the end, you’ll have a working MCP server that supports tools like greeting someone and performing arithmetic operations.</p><h4>Why MCP?</h4><p>MCP allows developers to standardize the way AI systems talk to external tools. Instead of manually defining brittle prompts for APIs, MCP defines a contract between the client (LLM, agent, or app) and your server.</p><h4>Why Go?</h4><ul><li><strong>Lower Latency than Python</strong> — Go is compiled to machine code, while Python is interpreted. This gives Go servers faster startup times and consistently lower response latency.</li><li><strong>Massive Concurrency with Goroutines</strong> — Unlike Python’s Global Interpreter Lock (GIL), Go’s goroutines allow true parallelism, enabling MCP servers to handle tens of thousands of concurrent requests smoothly.</li><li><strong>Better for High-Scale Workloads</strong> — Go’s memory model and lightweight goroutines make it more efficient under heavy load compared to Python’s threading or asyncio, which often introduce overhead.</li><li><strong>Production-Ready Performance</strong> — At scale (e.g., microservices or cloud-native MCP servers), Go typically requires fewer resources than Python, reducing costs while improving throughput.</li></ul><p>👉 And the timing couldn’t be better — the official <strong>go-sdk/mcp</strong> is launching in <strong>mid-September</strong>, giving Go developers first-class tooling to create MCP-compliant servers with minimal boilerplate.</p><h4>Setting Up a Go MCP Server</h4><p>Let’s dive into building a small calculator MCP server in Go.</p><p><strong>Step 1: Install the Go SDK</strong></p><p>First, install the MCP Go SDK:</p><pre>go get github.com/modelcontextprotocol/go-sdk/mcp</pre><p><strong>Step 2: Define Parameters</strong></p><p>Each tool accepts typed parameters. For example:</p><pre>type HiParams struct {<br> Name string `json:&quot;name&quot; jsonschema:&quot;the name of the person to greet&quot;`<br>}<br><br>type ArithmeticParams struct {<br> A float64 `json:&quot;a&quot; jsonschema:&quot;first number&quot;`<br> B float64 `json:&quot;b&quot; jsonschema:&quot;second number&quot;`<br>}</pre><p>Here, jsonschema annotations provide metadata for clients (like LLMs) to understand argument requirements.</p><p><strong>Step 3: Implement Tools</strong></p><p>Each tool is just a Go function that receives parameters and returns a structured result.</p><pre>func SayHi(ctx context.Context, session *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) {<br> return &amp;mcp.CallToolResultFor[any]{<br>  Content: []mcp.Content{&amp;mcp.TextContent{Text: &quot;Hi &quot; + params.Arguments.Name}},<br> }, nil<br>}</pre><p>Arithmetic examples:</p><pre>func Add(ctx context.Context, session *mcp.ServerSession, params *mcp.CallToolParamsFor[ArithmeticParams]) (*mcp.CallToolResultFor[any], error) {<br> result := params.Arguments.A + params.Arguments.B<br> return &amp;mcp.CallToolResultFor[any]{<br>  Content: []mcp.Content{&amp;mcp.TextContent{Text: fmt.Sprintf(&quot;Result: %.2f&quot;, result)}},<br> }, nil<br>}</pre><p>We can implement `Subtract`, `Multiply`, and `Divide` in the same pattern.</p><p><strong>Step 4: Register Tools in the MCP Server</strong></p><p>Now, we register all tools inside our server instance:</p><pre>server := mcp.NewServer(&amp;mcp.Implementation{Name: &quot;calculator&quot;, Version: &quot;v1.0.0&quot;}, nil)<br><br>mcp.AddTool(server, &amp;mcp.Tool{Name: &quot;greet&quot;, Description: &quot;say hi to someone&quot;}, SayHi)<br>mcp.AddTool(server, &amp;mcp.Tool{Name: &quot;add&quot;, Description: &quot;add two numbers&quot;}, Add)<br>mcp.AddTool(server, &amp;mcp.Tool{Name: &quot;subtract&quot;, Description: &quot;subtract second number from first&quot;}, Subtract)<br>mcp.AddTool(server, &amp;mcp.Tool{Name: &quot;multiply&quot;, Description: &quot;multiply two numbers&quot;}, Multiply)<br>mcp.AddTool(server, &amp;mcp.Tool{Name: &quot;divide&quot;, Description: &quot;divide first number by second&quot;}, Divide)</pre><p><strong>Step 5: Expose via Streamable HTTP Transport</strong></p><p>The Go SDK provides a ready-made streamable HTTP handler:</p><pre>handler := mcp.NewStreamableHTTPHandler(<br> func(*http.Request) *mcp.Server { return server },<br> &amp;mcp.StreamableHTTPOptions{},<br>)<br><br>http.HandleFunc(&quot;/mcp&quot;, handler.ServeHTTP)</pre><p>This ensures the communication is bidirectional and streaming-friendly, making it ideal for AI agents.</p><p><strong>Step 6: Run the Server</strong></p><p>Finally, start your HTTP server:</p><pre>log.Println(&quot;Starting MCP calculator server on :8080&quot;)<br>if err := http.ListenAndServe(&quot;:8080&quot;, nil); err != nil {<br> log.Fatal(err)<br>}</pre><p><strong>Testing the Server</strong></p><ol><li>1. Run your server:</li></ol><pre>go run main.go</pre><p>2. It will start on:</p><p><a href="http://localhost:8080/mcp">http://localhost:8080/mcp</a></p><p>3. Any MCP-compatible client can now connect and discover tools like <strong>greet</strong>, <strong>add</strong>, <strong>subtract</strong>, <strong>multiply</strong>, and <strong>divide</strong>.</p><h4>What’s Next?</h4><p>This was a minimal example. You can extend this server by:</p><ul><li>Adding more tools (like fetching data from APIs, databases, or files).</li><li>Exposing resources via MCP.</li><li>Using authentication headers in your HTTP handler.</li><li>Deploying the server to Kubernetes, Cloud Run, or any container runtime.</li></ul><h4>Conclusion</h4><p>We just built a fully functional MCP server in Go with a streamable HTTP transport. This approach makes it simple to expose structured tools to AI systems. Whether it’s a calculator, weather service, or a complex enterprise workflow — MCP provides a scalable way to plug your logic directly into AI models.</p><p>Full example available here<br><a href="https://github.com/ContexaAI/mcp-golang-examples/tree/main/streamable_http_example">https://github.com/ContexaAI/mcp-golang-examples/tree/main/streamable_http_example</a></p><p>Want to learn more Join us on Discord — <a href="https://discord.com/invite/j9k7xZydRm">https://discord.com/invite/j9k7xZydRm</a><br>Want to host and test MCP servers? Try — <a href="https://contexaai.com/">https://contexaai.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11a43c4797ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP logging and tracing using mcp-trace | ContexaAI]]></title>
            <link>https://medium.com/@mybytecode/mcp-logging-and-tracing-using-mcp-trace-contexaai-940c744e03b6?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/940c744e03b6</guid>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Sat, 12 Jul 2025 19:00:15 GMT</pubDate>
            <atom:updated>2025-12-02T15:24:56.011Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YNH91fLAWm7XK2uJjtYjog.png" /></figure><p><strong>TL;DR</strong>: Add tracing to your MCP server in literally 3 lines of code:</p><pre>import { FileAdapter, TraceMiddleware } from &quot;mcp-trace&quot;;<br><br>const traceMiddleware = new TraceMiddleware({ adapter: new FileAdapter(traceFilePath) });<br>traceMiddleware.init(server);<br><br><br>// Use in your MCP server - boom, full visibility</pre><pre>npm install mcp-trace</pre><p>Now let me tell you why this matters.</p><h3>The Problem Nobody Talks About</h3><p>Look, I’ve been there. You’re building an MCP server, everything seems fine in development, then you deploy it and suddenly you have no idea what’s happening. Users are complaining about slow responses, tools are failing mysteriously, and you’re stuck playing detective with zero visibility into what’s actually going on.</p><p>When you’re building with the Model Context Protocol, you’re essentially creating a black box. Sure, your server handles requests and returns responses, but what happens in between? Which tools are being called? How long are they taking? What arguments are being passed? Are there patterns in the failures?</p><p>Without proper observability, you’re flying blind. And trust me, that’s not a fun place to be when things go wrong at 2 AM.</p><p>That’s exactly why I created <strong>mcp-trace-js</strong>.</p><h3>The Adapters That Actually Matter</h3><p>Here’s where it gets interesting. I didn’t just build one way to store traces — I built adapters for the places you’re actually storing data:</p><p><strong>File Adapter</strong> — Sometimes you just want logs in a file. Perfect for development or simple deployments.</p><p><strong>PostgreSQL Adapter</strong> — Because your data is probably already in Postgres, and querying traces with SQL is powerful as hell.</p><p><strong>Supabase Adapter</strong> — Same as Postgres but with all the Supabase goodness if that’s your thing.</p><p><strong>Contexa Adapter</strong> — For when you want cloud-based trace analytics without the setup headache.</p><p><strong>Console Adapter</strong> — Pretty-printed logs right in your terminal. Great for debugging.</p><p><strong>Multi Adapter</strong> — Use multiple adapters at once. Log to file AND database. Because why not?</p><h3>The Privacy Thing</h3><p>Here’s something most tracing tools get wrong — they log everything by default and make it hard to exclude sensitive data. I built mcp-trace-js the other way around.</p><p>Want to log tool names but not arguments? Easy:</p><pre>const traceMiddleware = new TraceMiddleware({<br>  adapter: traceAdapter,<br>  logFields: {<br>    tool_name: true,<br>    tool_response: true,<br>    tool_arguments: false,  // Nope, keep this private<br>    client_id: false,       // This too<br>  },<br>});</pre><p>You control exactly what gets logged. No surprises, no accidentally logging user data you shouldn’t.</p><h3>Real Talk: Why This Matters</h3><p>I’ve seen too many projects fail because the developers lost control of their systems. You build something, it works, then it scales and suddenly you don’t understand your own creation anymore.</p><p>Observability isn’t just about fixing bugs — it’s about understanding patterns, optimizing performance, and staying in control as your system grows.</p><p>With mcp-trace-js, you can:</p><ul><li><strong>Debug faster</strong> — See exactly what tool calls are failing and why</li><li><strong>Optimize performance</strong> — Identify slow operations and bottlenecks</li><li><strong>Understand usage patterns</strong> — Know which tools are popular and which aren’t</li><li><strong>Monitor in production</strong> — Get alerts when things go wrong, not when users complain</li></ul><h3>The Technical Details (If You Care)</h3><p>It’s built with TypeScript, so you get full type safety and IntelliSense. The trace format is JSON, so you can query it however you want. It’s composable, so you can use multiple adapters. It’s configurable, so you can log exactly what you need.</p><p>But honestly? The technical details don’t matter if it doesn’t solve your problem. And the problem it solves is simple: <strong>visibility into your MCP servers</strong>.</p><h3>Getting Started</h3><pre>npm install mcp-trace</pre><pre>pip install mcp-trace</pre><p>Check out the examples in the repo. There’s a basic usage example, an MCP server integration, and even a complete HTTP server setup. Pick what fits your use case and go.</p><p>The documentation is straightforward, the API is clean, and it just works.</p><h3>Why I’m Sharing This</h3><p>I built mcp-trace-js because I needed it. I was tired of debugging MCP servers without proper visibility. I was tired of guessing what was going wrong.</p><p>If you’re building with MCP, you probably need this too. Don’t wait until you’re debugging a production issue at 2 AM to realize you need proper tracing.</p><p>The repo is at <a href="https://github.com/ContexaAI/mcp-trace-js">https://github.com/ContexaAI/mcp-trace-js</a><a href="https://github.com/ContexaAI/mcp-trace-js.">.</a> MIT licensed, contributions welcome, issues and PRs encouraged.</p><p>Stop flying blind. Start tracing your MCP servers properly.</p><p><em>Found this useful? Give the repo a star and let me know what you think. And if you build something cool with mcp-trace-js, I’d love to hear about it.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=940c744e03b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Power of __init__.py in Python]]></title>
            <link>https://medium.com/@mybytecode/power-of-init-py-in-python-e78d9b3c2878?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/e78d9b3c2878</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-development]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python-basic-questions]]></category>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Fri, 03 May 2024 00:54:46 GMT</pubDate>
            <atom:updated>2024-05-03T00:54:46.598Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wgMXLcMwlq8xWle9BR1grQ.jpeg" /></figure><p>In the Python ecosystem, the __init__.py file holds a special significance, serving as the cornerstone for organizing and structuring code into reusable packages. Despite its seemingly humble appearance, this file plays a crucial role in defining the behavior and interface of Python packages. In this blog, we&#39;ll delve into the depths of __init__.py and explore its myriad functionalities, use cases, and best practices.</p><h3>Understanding __init__.py</h3><p>At its core, the __init__.py file is used to mark a directory as a Python package. When Python encounters a directory containing an __init__.py file, it treats the directory as a package, allowing you to import modules and symbols from within it.</p><h3>1. Package Initialization</h3><p>One of the primary roles of __init__.py is to initialize the package when it is imported. This initialization phase may involve setting up variables, importing submodules, or performing any necessary setup tasks. For example:</p><pre># __init__.py<br><br>print(&quot;Initializing package...&quot;)<br><br># Additional initialization code</pre><h3>2. Import Control</h3><p>__init__.py provides a mechanism for controlling what symbols are imported when someone uses from package import *. By defining the __all__ variable, you can specify which symbols are included in the package&#39;s public interface. For instance:</p><pre># __init__.py<br><br>__all__ = [&#39;module1&#39;, &#39;module2&#39;]<br><br>from . import module1<br>from . import module2</pre><h3>3. Namespace Management</h3><p>You can use __init__.py to manage the namespace of your package by importing modules or symbols from other files within the package and re-exporting them. This helps in organizing and structuring your code effectively. Here&#39;s an example:</p><pre># __init__.py<br><br>from .module1 import some_function<br>from .module2 import SomeClass</pre><h3>4. Initialization Code</h3><p>Initialization tasks such as setting up logging, defining configuration settings, or registering plugins can be performed in __init__.py. This ensures that these tasks are executed when the package is imported. For instance:</p><pre># __init__.py<br><br>import logging<br><br># Initialize logging<br>logging.basicConfig(level=logging.INFO)<br><br># Define package-level variables<br>DEFAULT_CONFIG = {<br>    &#39;key&#39;: &#39;value&#39;<br>}</pre><h3>5. Documentation</h3><p>__init__.py can also include documentation strings (docstrings) to provide information about the package and its contents. This documentation serves as a reference for users and developers interacting with the package. For example:</p><pre># __init__.py<br><br>&quot;&quot;&quot;This is a package containing modules for mathematical operations.&quot;&quot;&quot;<br><br># Module imports and other code...</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e78d9b3c2878" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplified AWS FastAPI S3 File Upload]]></title>
            <link>https://medium.com/@mybytecode/simplified-aws-fastapi-s3-file-upload-3db69431f806?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/3db69431f806</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[fastapi]]></category>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Wed, 01 May 2024 14:13:48 GMT</pubDate>
            <atom:updated>2024-05-26T06:40:09.129Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zA_GsfHK7HenEqBW5vkb1w.png" /></figure><p>In this tutorial, we’ll explore how to utilize the boto3 library to seamlessly upload files to an S3 bucket. This process is essential for many web applications that require efficient storage solutions. Let’s dive in!</p><h4><strong>Prerequisites:</strong></h4><p>Before we begin, ensure you have boto3 installed. If not, you can install it via pip:</p><pre>pip install boto3</pre><h4>Uploading Files to S3:</h4><p>There are two primary methods for uploading files to S3 using boto3:</p><ol><li>Using Presigned URLs: This method is ideal for scenarios where clients need to upload files directly to S3 without involving the server. It significantly reduces latency and improves performance.</li><li>Using s3.upload Function: This approach is suitable when uploading files to S3 directly from the server.</li></ol><p>For the purpose of this tutorial, we’ll focus on the first approach — utilizing presigned URLs.</p><h4>Implementation Steps:</h4><p>We’ll start by creating a FastAPI application instance and adding an upload route to it.</p><pre>from fastapi import FastAPI<br>from boto3 import client<br><br>app = FastAPI()<br><br>@app.get(&quot;/upload&quot;)<br>def upload():<br>    pass</pre><p>Next, let’s implement the code for uploading a file:</p><p>Step 1: Create a file named main.py and add the following code:</p><pre>from fastapi import FastAPI<br>from boto3 import client<br><br>app = FastAPI()<br><br>@app.get(&quot;/upload&quot;)<br>def upload():<br>    s3 = client(&#39;s3&#39;)<br>    bucketName = &quot;mybucket&quot;<br>    response = s3.generate_presigned_post(<br>                Bucket=bucketName,<br>                Key=&quot;file.txt&quot;,<br>                Conditions=None,<br>                ExpiresIn=3600<br>            )<br>    <br>    return {&quot;url&quot;: response[&quot;url&quot;], &quot;fields&quot;: response[&quot;fields&quot;]}</pre><p>Step 2: Let’s break down the parameters in the generate_presigned_post function:</p><ul><li><strong>Bucket:</strong> Specifies the destination bucket where the file will be saved.</li><li><strong>Key:</strong> Denotes the file name and path within the bucket. For instance, if you wish to upload a file to Data/Data1/data.txt, set the Key accordingly.</li><li><strong>Conditions:</strong> When generating a presigned URL for file uploads to an S3 bucket, you have the option to specify conditions that must be met for the upload to be accepted. These conditions provide an extra layer of security and control over the upload process. <strong>(Explained in details at end of this blog)</strong></li><li><strong>ExpiresIn:</strong> Specifies the validity duration of the presigned URL in seconds.</li></ul><h4>Client side implementation</h4><p>When a client requests the presigned URL from your FastAPI application, they receive a response containing the URL and any additional fields required for the upload. Here’s how the client can utilize this information to upload a file:</p><ol><li>Retrieve the Presigned URL: The client sends a GET request to the /upload endpoint of your FastAPI application to obtain the presigned URL for file upload.</li><li>Receive Response: Upon successful retrieval, the client receives a JSON response containing the presigned URL and any additional fields required for the upload, such as form fields and their corresponding values.</li><li>Prepare File Upload: The client prepares the file to be uploaded to S3. This may involve selecting a file from their local system or generating file content dynamically.</li><li>Construct Upload Form: Using the presigned URL and additional fields received from the server, the client constructs a form for file upload. This form must include the presigned URL as the form action and any additional fields as hidden input fields.</li><li>Submit Upload Form: Once the form is prepared, the client submits it using a POST request. This sends the file to the S3 bucket specified in the presigned URL.</li><li>Verify Upload Status: After submitting the upload form, the client should verify the upload status. This may involve checking the HTTP response code received from the S3 service or inspecting any additional response data provided.</li></ol><p>Sample client side HTML form</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;File Upload Form&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;h1&gt;Upload File to S3&lt;/h1&gt;<br>    &lt;form action=&quot;&lt;presigned_url&gt;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;<br>        &lt;!-- Additional fields from server response --&gt;<br>        &lt;input type=&quot;hidden&quot; name=&quot;key&quot; value=&quot;&lt;value&gt;&quot;&gt;<br>        &lt;input type=&quot;hidden&quot; name=&quot;&lt;field_name&gt;&quot; value=&quot;&lt;field_value&gt;&quot;&gt;<br>        &lt;!-- File input field --&gt;<br>        &lt;input type=&quot;file&quot; name=&quot;file&quot;&gt;<br>        &lt;input type=&quot;submit&quot; value=&quot;Upload&quot;&gt;<br>    &lt;/form&gt;<br>    &lt;script&gt;<br>        // Add JavaScript code for form submission handling/validation if needed<br>    &lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>With this implementation, clients can obtain presigned URLs dynamically to upload files directly to the specified S3 bucket.</p><p><strong>Supported Fields for Conditions:</strong></p><ol><li><strong>acl (Optional):</strong> Specifies the access control list (ACL) for the uploaded file. Valid values include:</li></ol><ul><li>“private”: The file is accessible only by the bucket owner.</li><li>“public-read”: The file is publicly readable but not writable.</li><li>“public-read-write”: The file is publicly readable and writable. Use with caution.</li><li>“authenticated-read”: The file is accessible to authenticated AWS users.</li></ul><ol><li><strong>success_action_status (Optional):</strong> Defines the HTTP status code that the server should return after the upload completes successfully. This parameter is typically set to “201 Created” to indicate a successful upload.</li><li><strong>Content-Type (Optional):</strong> Specifies the MIME type of the uploaded file. This helps browsers interpret the file correctly. For example, “image/jpeg” for JPEG images, “application/pdf” for PDF files, etc.</li><li><strong>Content-Length-Range (Optional):</strong> Specifies the range of acceptable content lengths for the uploaded file. This can be useful for enforcing size restrictions on uploads. For example, “100–1048576” allows files between 100 bytes and 1 MB in size.</li><li><strong>Cache-Control (Optional):</strong> Sets caching directives for the uploaded file. This determines how the file is cached by browsers and proxy servers. For example, “max-age=3600” instructs clients to cache the file for 1 hour.</li><li><strong>Expires (Optional):</strong> Specifies the expiration date and time for the presigned URL. This can be used in conjunction with Cache-Control to control caching behavior. The value should be in RFC 7231 datetime format, e.g., “Thu, 01 Jan 2026 00:00:00 GMT”.</li></ol><p>If you need any further help, please reach out to me at <br>LinkedIn — <a href="https://www.linkedin.com/in/akshaygalande/">https://www.linkedin.com/in/akshaygalande/</a><br>X.com — <a href="https://x.com/akshay_nocode">https://x.com/akshay_nocode</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3db69431f806" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Set Up a Virtual Environment in Python — And Why It’s Important]]></title>
            <link>https://medium.com/@mybytecode/how-to-set-up-a-virtual-environment-in-python-and-why-its-important-75e104be57bb?source=rss-364f178cf1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/75e104be57bb</guid>
            <category><![CDATA[python-virtualenv]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Akshay Galande]]></dc:creator>
            <pubDate>Thu, 25 Apr 2024 08:50:34 GMT</pubDate>
            <atom:updated>2024-04-25T08:50:34.562Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Set Up a Virtual Environment in Python — And Why It’s Important</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*azSwMB00vgVAt8Z9KK1nAw.png" /></figure><h3>Introduction</h3><p>Python is a powerful and versatile programming language used for a wide range of applications, from web development to data analysis and machine learning. One of the key aspects of Python development is managing dependencies — the libraries and packages that your projects rely on. In this blog post, we’ll explore how to set up a virtual environment in Python and why it’s crucial for every developer.</p><h3>What is a Virtual Environment?</h3><p>A virtual environment is an isolated environment where you can install packages and dependencies for a specific project without affecting the global Python installation or other projects. It allows you to create a sandboxed environment where you can manage dependencies independently for each project.</p><h3>Setting Up a Virtual Environment:</h3><p>To set up a virtual environment in Python, you’ll need to follow these steps:</p><ol><li><strong>Install Python:</strong> Ensure that Python is installed on your system. You can download the latest version of Python from the official website (<a href="https://www.python.org/">https://www.python.org/</a>) if you haven’t already.</li><li><strong>Open a Terminal or Command Prompt:</strong> Navigate to the directory where you want to create your project. This could be your project’s root directory or any other location you prefer.</li><li><strong>Create a Virtual Environment: </strong>Use the built-in venv module to create a virtual environment. Open your terminal or command prompt and run the following command:</li></ol><pre>python -m venv myenv</pre><p>Replace myenv with the name you want to give to your virtual environment. This command creates a directory named myenv containing the virtual environment.</p><ol><li><strong>Activate the Virtual Environment:</strong> Once the virtual environment is created, you need to activate it. Depending on your operating system, the activation command will differ:<br>a. <strong>Windows</strong></li></ol><pre>myenv\Scripts\activate</pre><p>b. <strong>Mac/Linux</strong></p><pre>source myenv/bin/activate</pre><p>After activation, you’ll notice that your command prompt changes to indicate that the virtual environment is active.</p><ol><li><strong>Install Packages:</strong> With the virtual environment active, you can now install packages using pip, the Python package manager, without affecting the global Python installation. For example:</li></ol><pre>pip install package_name</pre><p>This command installs the specified package locally within the virtual environment.</p><ol><li><strong>Use the Virtual Environment:</strong> Now that your virtual environment is set up and activated, any Python scripts or applications you run from within this terminal session will use the packages installed in the virtual environment.</li><li>Deactivate the Virtual Environment: When you’re done working on your project, you can deactivate the virtual environment using the deactivate command:</li></ol><pre>deactivate</pre><p>This command returns you to your global Python environment.</p><h3>Why Use Virtual Environments?</h3><p>Setting up virtual environments might seem like an extra step, but it offers several benefits:</p><ul><li>Isolation: Each project has its own isolated environment, preventing conflicts between dependencies.</li><li>Dependency Management: Virtual environments allow you to manage project dependencies independently, ensuring that each project uses the correct versions of libraries and packages.</li><li>Portability: Virtual environments make projects more portable by encapsulating their dependencies. You can easily share your project with others, and they can recreate the same environment using the requirements.txt file.</li></ul><h3>Conclusion:</h3><p>In conclusion, setting up a virtual environment in Python is an essential practice for every developer. It helps manage dependencies, prevents conflicts, and ensures project portability. By following the steps outlined in this blog post, you can create and manage virtual environments for your Python projects with ease, improving your development workflow and project organization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75e104be57bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>