<?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 ChetanY on Medium]]></title>
        <description><![CDATA[Stories by ChetanY on Medium]]></description>
        <link>https://medium.com/@chetanry?source=rss-60647c30a9b7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*cn0bSztnhEPiMp4s.</url>
            <title>Stories by ChetanY on Medium</title>
            <link>https://medium.com/@chetanry?source=rss-60647c30a9b7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 16:46:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chetanry/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[Rethinking Interfaces: MCP vs API]]></title>
            <link>https://medium.com/@chetanry/rethinking-interfaces-mcp-vs-api-50537b932651?source=rss-60647c30a9b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/50537b932651</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[mcp-protocol]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[llms-utilization]]></category>
            <dc:creator><![CDATA[ChetanY]]></dc:creator>
            <pubDate>Sat, 24 May 2025 20:15:37 GMT</pubDate>
            <atom:updated>2025-05-24T20:15:37.628Z</atom:updated>
            <content:encoded><![CDATA[<h3>Disclaimer</h3><p>This article isn’t a battle cry pitting MCP against APIs. Instead, it’s a reflection on how these technologies complement each other. APIs revolutionized how we built modern web applications. Now, with the rise of powerful language models, MCP emerges as a natural evolution to help us build intelligent, adaptive AI applications. My goal is simple: to make MCP understandable for software engineers at any level.</p><h3>A Brief Background: Why MCP, and Why Now?</h3><p>In November 2024, Anthropic introduced <strong>Model Context Protocol (MCP)</strong> — an open-source protocol aimed at unlocking the true potential of LLMs. Just as the internet introduced ubiquitous connectivity that fueled the rise of billion-dollar platforms, LLMs have sparked a new wave of innovation. One of the most promising frontiers? <strong>AI Agents</strong>.</p><p>AI agents are systems powered by LLMs that reason, plan, and act by combining natural language understanding with access to external tools. But to act meaningfully, agents must retrieve context and invoke tools dynamically — something traditional APIs weren’t designed for. That’s where MCP steps in.</p><h3>The Status Quo: APIs as the Backbone of Integration</h3><p>APIs (Application Programming Interfaces) define how software systems interact. They’re typically stateless, synchronous, and follow a request-response model.</p><p>Let’s take a library system as an example:</p><pre>GET /books/123     // Retrieves details for book #123<br>POST /loans        // Creates a new book loan</pre><p>Each API call maps to a fixed endpoint with a predefined contract. RESTful APIs are the norm and often return JSON responses like this:</p><pre>{<br>  &quot;id&quot;: 123,<br>  &quot;title&quot;: &quot;Clean Code&quot;,<br>  &quot;author&quot;: &quot;Robert C. Martin&quot;<br>}</pre><p>APIs have powered integrations for everything from payment processing to ride-sharing. But they’re static — built to expose fixed operations, not to evolve dynamically alongside an intelligent system.</p><h3>The Shift: Introducing MCP — The USB-C of AI Integrations</h3><p>With the emergence of AI agents, we need more dynamic, discoverable, and intelligent interfaces. MCP was designed for this.</p><p>Imagine your AI agent as a laptop, and MCP as the <strong>USB-C port</strong> — one connector that works with many peripherals: power adapters, displays, storage devices. Each MCP-compatible tool is like a peripheral that the agent can plug into on demand.</p><p>In MCP:</p><ul><li>The <strong>MCP Host</strong> is the agent runtime.</li><li><strong>MCP Clients</strong> are tools running alongside the agent.</li><li><strong>MCP Servers</strong> expose tool functionality, contextual data, and even prompts — all through a standardized protocol.</li></ul><p>Communication happens over <strong>JSON-RPC 2.0</strong>, and servers publish machine-readable catalogs so agents can discover what’s available.</p><h3>Core MCP Primitives: Tools, Resources, and Prompts</h3><p>MCP introduces three types of primitives:</p><ol><li><strong>Tools</strong> — Discrete functions the agent can invoke.</li><li><strong>Resources</strong> — Read-only data the agent can query.</li><li><strong>Prompt Templates</strong> — Suggested prompts the agent can use or adapt.</li></ol><p>An MCP client might query available tools like so:</p><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;method&quot;: &quot;tools/list&quot;,<br>  &quot;id&quot;: 1<br>}</pre><p>And receive:</p><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;id&quot;: 1,<br>  &quot;result&quot;: [<br>    {<br>      &quot;name&quot;: &quot;getWeather&quot;,<br>      &quot;description&quot;: &quot;Fetch weather by city name&quot;,<br>      &quot;input_schema&quot;: { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;city&quot;: {&quot;type&quot;: &quot;string&quot;} } }<br>    },<br>    {<br>      &quot;name&quot;: &quot;createEvent&quot;,<br>      &quot;description&quot;: &quot;Schedule a calendar event&quot;<br>    }<br>  ]<br>}</pre><p>Then the agent could call a tool like this:</p><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;method&quot;: &quot;tools/call&quot;,<br>  &quot;params&quot;: {<br>    &quot;name&quot;: &quot;getWeather&quot;,<br>    &quot;input&quot;: { &quot;city&quot;: &quot;Seattle&quot; }<br>  },<br>  &quot;id&quot;: 2<br>}</pre><h3>APIs vs MCP: Key Differences</h3><p><strong>1. Purpose:</strong></p><ul><li><strong>API:</strong> General-purpose integration</li><li><strong>MCP:</strong> Designed specifically for AI agents</li></ul><p><strong>2. Protocol:</strong></p><ul><li><strong>API:</strong> HTTP (REST, gRPC, etc.)</li><li><strong>MCP:</strong> JSON-RPC 2.0 over MCP</li></ul><p><strong>3. Discovery:</strong></p><ul><li><strong>API:</strong> Manual or static</li><li><strong>MCP:</strong> Dynamic runtime discovery</li></ul><p><strong>4. Standardization:</strong></p><ul><li><strong>API:</strong> Varies across services</li><li><strong>MCP:</strong> Uniform across all MCP servers</li></ul><p><strong>5. Extensibility:</strong></p><ul><li><strong>API:</strong> Requires developer updates</li><li><strong>MCP:</strong> Auto-discovers new tools and data</li></ul><p><strong>6. Example Use Cases:</strong></p><ul><li><strong>API:</strong> Stripe, GitHub REST, OpenWeather</li><li><strong>MCP:</strong> getWeather, listEmails, fetchDocument</li></ul><h3>A Real-World Analogy: Building a Smart Assistant</h3><p>Let’s say you’re building an assistant that can:</p><ul><li>Schedule meetings</li><li>Check the weather</li><li>Summarize unread emails</li></ul><p><strong>Using APIs:</strong></p><ul><li>You integrate Google Calendar, Gmail API, and OpenWeather API.</li><li>You handle rate limits, schemas, auth flows, and breaking changes.</li></ul><p><strong>Using MCP:</strong></p><ul><li>The agent fetches a list of tools:<br>- createEvent <br>- getWeather <br>- readEmails</li><li>It calls them through a uniform protocol.</li><li>The underlying implementation (REST, gRPC, etc.) is abstracted away.</li></ul><p>Agents adapt to changes dynamically — new tools can be added without redeploying code.</p><h3>The Secret: MCP Uses APIs Under the Hood</h3><p>MCP isn’t here to replace APIs — it <strong>wraps them</strong>. Many MCP servers are simply translators:</p><ul><li>The repository/list tool on the GitHub MCP server? It maps to GitHub’s REST API.</li><li>The getWeather tool? Likely calling OpenWeather behind the scenes.</li></ul><p>This lets you unify fragmented APIs into one discoverable interface, optimized for AI.</p><h3>Why Developers Should Care</h3><p>If you’re an engineer building AI-powered apps, this matters because:</p><ul><li>You avoid rewriting adapters for every service.</li><li>Your agents get smarter without your intervention.</li><li>You architect for <strong>scalability</strong>, <strong>resilience</strong>, and <strong>future-proofing</strong>.</li></ul><p>As agents become more autonomous and multi-modal, MCP becomes the connective tissue enabling reliable interaction with the world.</p><h3>Final Thoughts</h3><p>MCP is to AI agents what APIs were to web apps — a foundational enabler. But where APIs expose functionality statically, MCP brings <strong>discovery, abstraction, and adaptability</strong> to the table.</p><p>It’s not about choosing MCP over APIs. It’s about building the right layers: APIs for system access, MCP for intelligence orchestration.</p><p><strong>Further Reading:</strong></p><ul><li><a href="https://www.anthropic.com/news/model-context-protocol">Anthropic’s MCP Launch</a></li><li><a href="https://github.com/modelcontextprotocol">MCP GitHub Repo</a></li><li><a href="https://modelcontextprotocol.io/introduction">Official MCP Docs</a></li></ul><p>If you’re building intelligent systems in 2025, <strong>start designing like it.</strong> How your software communicates will define how well it learns, adapts, and performs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50537b932651" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Scaling API Security in the Cloud: From Protocols to Policy Enforcement]]></title>
            <link>https://medium.com/@chetanry/scaling-api-security-in-the-cloud-from-protocols-to-policy-enforcement-70fedfa9b4dc?source=rss-60647c30a9b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/70fedfa9b4dc</guid>
            <dc:creator><![CDATA[ChetanY]]></dc:creator>
            <pubDate>Tue, 15 Apr 2025 05:25:40 GMT</pubDate>
            <atom:updated>2025-04-15T05:25:40.667Z</atom:updated>
            <content:encoded><![CDATA[<p>In the cloud-first era, APIs are more than just building blocks of applications — they are business-critical interfaces that expose sensitive data and services to the outside world. With this increased exposure comes increased risk, and organizations are quickly realizing that <strong>API management without security is just a liability</strong>.</p><p>Having led API security integrations at the enterprise level, I’ve seen firsthand how implementing the right mechanisms, frameworks, and policies can turn APIs from potential risks into reliable, scalable assets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*HtvnIVUCM5YYwVEB2QlMng.png" /></figure><h3>🧩 Layered API Security: Not Just “Auth” Anymore</h3><p>API security isn’t just about putting a lock on the door; it’s about building an intelligent security system that anticipates, prevents, and adapts to threats. Here’s what a modern, layered API security stack includes:</p><h3>✅ OAuth2 and OpenAPI Specifications</h3><p>OAuth2 is now a gold standard for secure delegated access. Combined with OpenAPI specs, we gain clear, contract-driven API definitions that enable both robust security and simplified documentation.</p><h3>✅ JWT Authentication + Role-Based Access Control (RBAC)</h3><p>JWTs (JSON Web Tokens) ensure stateless, tamper-proof authentication. Layering this with RBAC allows fine-grained access control to individual resources, especially important in multi-tenant or microservices environments.</p><pre>{<br>  &quot;user&quot;: &quot;admin&quot;,<br>  &quot;roles&quot;: [&quot;write&quot;, &quot;read&quot;, &quot;audit&quot;],<br>  &quot;iat&quot;: 1712000000,<br>  &quot;exp&quot;: 1715600000<br>}</pre><p>JWTs carry context, enabling APIs to enforce decisions instantly without additional database lookups — crucial for high-performance systems.</p><h3>🛡️ Compliance Isn’t Optional — It’s Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*h618aqtC7bwvsYSpqNwHhQ.png" /></figure><p>Working with clients in healthcare, finance, and government, I’ve built APIs that must meet regulations like:</p><ul><li><strong>GDPR</strong> — User data access &amp; deletion</li><li><strong>SOC 2</strong> — Trust principles for data handling</li><li><strong>HIPAA</strong> — Patient data privacy</li><li><strong>FedRAMP</strong> — Rigorous standards for cloud services in government</li></ul><p>We integrated <strong>auditable security logs</strong>, <strong>data masking</strong>, <strong>rate limiting</strong>, and <strong>token expiration policies</strong> to meet these standards, often designing policy hooks directly into our API gateways (e.g., Apigee, Kong).</p><h3>☁️ Policy Enforcement at Scale</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*LWT3Fp3i5Bjte_GljoD3FQ.png" /></figure><p>Most real-world failures don’t happen in the spec — they happen in runtime. This is where <strong>policy enforcement engines</strong> shine.</p><p>At scale, I’ve implemented cloud-native frameworks that support:</p><ul><li><strong>Real-time evaluation</strong> of security policies using engines like OPA (Open Policy Agent)</li><li><strong>Versioning and rollback</strong> for policy sets (yes, even security rules need source control)</li><li><strong>Anomaly detection</strong> based on traffic baselines and behavioral models</li></ul><p>We architected the system to ingest live API telemetry, then feed it into ML-based detectors to flag unexpected behavior (e.g., credential stuffing, elevated access pattern, abuse via automation).</p><h3>🎯 The Road Ahead</h3><p>True API security isn’t a single product — it’s a mindset and a strategy. It’s about bridging engineering and security, design and governance. As threats evolve, so must our approaches.</p><p>If you’re building or securing APIs today, take the time to implement:</p><ul><li>Structured access controls with identity at the center</li><li>Continuous compliance as part of CI/CD</li><li>Automated runtime protections with policy rollback capabilities</li></ul><p>This isn’t just how we protect APIs — this is how we protect the <em>business</em>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70fedfa9b4dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>