← Back to list

Vendor lock-in killed my AI pipeline here’s what I rebuilt with MCP

I spent three weeks gluing my app to one AI provider’s function-calling API. Then they changed the schema. This is the story of how the…

Yash Sanjivkumar Pawar · 2026-06-25 10:11 · 4 claps · 9.2 min read
#mcps #aaif #agentic-ai #linux-foundation #ai-tooling
Open on Medium ↗
Wiki topics: AGT · AI Agents 🔓 · Open Source

Vendor lock-in killed my AI pipeline here’s what I rebuilt with MCP

I spent three weeks gluing my app to one AI provider’s function-calling API. Then they changed the schema. This is the story of how the Model Context Protocol saved my weekends.

Last year I was building a personal finance assistant a side project, nothing fancy. It needed to pull transactions from a Notion database, check a PostgreSQL table for budgets, and send a weekly summary via email. I wired it all up using OpenAI’s function-calling API. It worked beautifully for about six weeks.

Then I wanted to try Claude for better reasoning on the summary generation. Fifteen minutes of excitement turned into three days of plumbing. Every tool definition had to be rewritten. The schema format was different. The way errors were surfaced was different. The auth flow for external calls was different. I wasn’t building features .I was maintaining glue.

That experience is what drew me to MCP (Model Context Protocol), now stewarded by the Agentic AI Foundation (AAIF) under the Linux Foundation. Here’s what the problem actually looks like, why MCP solves it at the right level, and how to get something working in an afternoon.

The problem has a name: N×M integrations

Before MCP, connecting AI models to external tools was an N×M problem. You had N models (OpenAI, Anthropic, Google, a local Llama) and M tools (your database, Notion, GitHub, email). Every combination needed its own custom connector.

The result was what one technical report from BCG described as quadratic complexity integration work that scales with the product of models and tools, not the sum. Every time I added a new AI provider, I didn’t just add one integration. I added M new ones.

Real cost

When I switched from OpenAI to Claude mid-project, I rewrote 4 tool definitions, 3 error-handling paths, and 1 authentication layer. It took 3 days. None of that work added features.

What MCP actually does

MCP the Model Context Protocol is an open standard released by Anthropic in late 2024 and now donated to the Linux Foundation’s Agentic AI Foundation. The one-line summary: it decouples your tools from your AI models.

Instead of writing bespoke integration code for every model-tool pair, you write one MCP server per tool. Any MCP-compatible model (Claude, GPT-4o, Gemini, local Ollama) can then discover and use your tools without you changing a line of server code.

The protocol uses three core primitives that the model can discover at runtime:

1] Tools: Actions the model can callquery_database, send_email, create_issue. Defined once in your MCP server with a JSON Schema, discoverable by any client.

2] Resources: Read-only data the model can pull as context file contents, database schemas, documentation. Think of these as addressable, on-demand RAG without the chunking pipeline.

3] Prompts: Pre-built task templates your server exposes standardised workflows that reduce token waste and keep agent behaviour consistent.

Let’s build something a minimal MCP server in Python

Here’s the finance assistant I rebuilt using MCP. The MCP server exposes two tools: one that queries a Postgres budget table, and one that fetches recent transactions from Notion. Once this server is running, any MCP-compatible client can use both tools without touching server code again.

Install the SDK

pip install mcp psycopg2-binary notion-client python-dotenv

Create the MCP server

import os
import json
import psycopg2
from notion_client import Client as NotionClient
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, TextContent
from dotenv import load_dotenv

load_dotenv()

# Initialise MCP server — name it, version it, done.
server = Server("finance-assistant")
notion = NotionClient(auth=os.environ["NOTION_TOKEN"])

# --- TOOL 1: query budget from PostgreSQL ---
@server.list_tools()
async def list_tools():
    return [
        Tool(
            name="get_budget",
            description="Returns budget limits for each spending category",
            inputSchema={
                "type": "object",
                "properties": {
                    "month": {"type": "string", "description": "YYYY-MM format"}
                },
                "required": ["month"]
            }
        ),
        Tool(
            name="get_transactions",
            description="Fetches recent transactions from Notion database",
            inputSchema={
                "type": "object",
                "properties": {
                    "limit": {"type": "integer", "default": 20}
                }
            }
        )
    ]

# --- TOOL HANDLER ---
@server.call_tool()
async def call_tool(name: str, arguments: dict):

    if name == "get_budget":
        conn = psycopg2.connect(os.environ["DATABASE_URL"])
        cur = conn.cursor()
        cur.execute(
            "SELECT category, limit_amount FROM budgets WHERE month = %s",
            (arguments["month"],)
        )
        rows = cur.fetchall()
        conn.close()
        return [TextContent(type="text", text=json.dumps(
            [{"category": r[0], "limit": r[1]} for r in rows]
        ))]

    if name == "get_transactions":
        limit = arguments.get("limit", 20)
        results = notion.databases.query(
            database_id=os.environ["NOTION_DB_ID"],
            page_size=limit
        )
        txns = [
            {
                "name": p["properties"]["Name"]["title"][0]["plain_text"],
                "amount": p["properties"]["Amount"]["number"],
                "category": p["properties"]["Category"]["select"]["name"]
            }
            for p in results["results"]
        ]
        return [TextContent(type="text", text=json.dumps(txns))]

# Run via stdio transport (works with Claude Desktop, Cursor, etc.)
if __name__ == "__main__":
    import asyncio
    from mcp.server.stdio import stdio_server

    async def main():
        async with stdio_server() as (read, write):
            await server.run(read, write)

    asyncio.run(main())

What just happened

You defined two tools with JSON Schema once. Any MCP-compatible model that connects to this server will auto-discover both tools, their descriptions, and their parameter types. No vendor-specific schema rewrites. Ever.

Wire it into Claude Desktop (or any host)

{
  "mcpServers": {
    "finance-assistant": {
      "command": "python",
      "args": ["/path/to/finance_server.py"],
      "env": {
        "DATABASE_URL": "postgres://user:pass@localhost/finance",
        "NOTION_TOKEN": "secret_...",
        "NOTION_DB_ID": "abc123..."
      }
    }
  }
}

Restart Claude Desktop. Your tools now appear in the model’s context automatically. To switch to GPT-4o? Add the same server path to your OpenAI client config. The server doesn’t change.

The architecture in one picture

Before vs. after, honestly

Why AAIF matters for your long-term bets

MCP being open-source under MIT is great. But what really changed the calculus for me was December 2025: Anthropic donated MCP to the Linux Foundation’s newly formed Agentic AI Foundation (AAIF), co-founded with OpenAI and Block, with Google, Microsoft, and AWS as platinum members.

This isn’t marketing. It’s the structural move that prevents MCP from becoming the next abandoned vendor SDK. The Linux Foundation stewards Kubernetes, PyTorch, and Node.js. MCP now sits alongside them. No single company can pull the rug.

“Donating MCP to the Linux Foundation ensures it stays open, neutral, and community-driven as it becomes critical infrastructure for AI.” Mike Krieger, CPO, Anthropic

For an indie developer making a long-term bet on a protocol, the governance structure matters as much as the technology. AAIF means MCP is not a product it’s infrastructure. Build on it the way you’d build on HTTP.

Things to watch out for

Security caveat

MCP opens a real attack surface. In April 2025, researchers identified prompt injection via tool output and tool-poisoning attacks. Never return unsanitised user-generated content directly from an MCP tool. Validate inputs, scope permissions tightly, and log every tool call.

Transport choices

Use stdio for local desktop tools and IDE plugins — no network, no auth setup. Use HTTP/SSE (Streamable HTTP in the March 2025 spec update) for production, cloud-deployed servers and microservice architectures.

The rebuild took one afternoon

Going back to my finance assistant: with MCP, the full server both tools, both data sources is 80 lines of Python. The first version that lived across four vendor-specific files was 340 lines. When I tried Claude instead of OpenAI last month, the change was two characters in a config file.

That’s the promise MCP delivers on. Not AI magic just a sane protocol that moves the complexity from your integration layer to a place it belongs: a single, well-defined server that any model can talk to.

If you’re building anything with LLMs that touches real data a side project, an internal tool, a personal assistant write an MCP server before you write a single vendor-specific tool definition. You’ll thank yourself the next time a better model ships.

Getting started

MCP Python SDK: pip install mcp · TypeScript SDK: npm install @modelcontextprotocol/sdk · Explore 5,800+ community servers at mcp.so you probably don't need to build the GitHub or Postgres one from scratch.

Conclusion

Vendor lock-in in AI is a silent tax. It doesn’t announce itself on day one it shows up the third time you rewrite a tool schema, or the week you spend porting integrations when a better model drops. The cost compounds quietly until one migration makes it impossible to ignore.

MCP doesn’t solve every problem in agentic AI. It doesn’t make your prompts smarter, your data cleaner, or your agent logic less brittle. What it does and does extremely well is remove the integration layer as a source of lock-in entirely. Your tools become infrastructure. Your models become interchangeable. Your switching cost drops to a config change.

For indie developers especially, this matters. We don’t have teams to absorb migration work. Every day spent rewiring glue is a day not spent on the actual product. MCP gives us back those days.

The AAIF governance layer is the insurance policy on top. Open standards mean nothing without neutral stewardship the web learned this the hard way in the browser wars. MCP under the Linux Foundation means the protocol has the same institutional backing as Kubernetes or Node.js. It is not going anywhere, and it is not going to diverge into incompatible forks controlled by competing vendors.

If you walk away with one thing: write your next AI tool as an MCP server from the start. Future you the one evaluating a new model six months from now will be quietly grateful.

Next steps

1] Browse the MCP server registry before building

Check mcp.so and the official servers repo. Servers for GitHub, PostgreSQL, Slack, Notion, Jira, and hundreds more already exist battle-tested and maintained by the community. Plug them in before writing a line of your own.

2] Run the MCP Inspector to debug locally

Use the official inspector before wiring your server into a live model: npx @modelcontextprotocol/inspector python finance_server.py. It gives you a UI to list tools, test invocations, and inspect raw JSON-RPC traffic without involving an LLM at all.

3] Upgrade to Streamable HTTP for production

stdio transport is great for local development, but if you're deploying to the cloud or need multi-client access, switch to Streamable HTTP (the March 2025 spec update). The SDK makes this a one-line transport swap your tool logic doesn't change.

4] Add OAuth 2.1 before exposing sensitive data

MCP supports OAuth 2.1 natively. Before connecting any server to production data databases, CRM, email add authentication and scoped permissions. The spec mandates the principle of least privilege: expose only the operations the model is explicitly allowed to perform.

5] Follow the AAIF working groups

The Agentic AI Foundation is actively evolving MCP agent-to-agent communication, enhanced sampling primitives, and cross-server tool composition are all on the roadmap. Follow the MCP GitHub org and the Linux Foundation AAIF announcements to stay ahead of the spec.

References

1] Model Context Protocol — Wikipedia

Comprehensive overview of MCP architecture, history, and governance. Covers the N×M integration problem, JSON-RPC 2.0 transport layer, and the December 2025 AAIF donation.

en.wikipedia.org/wiki/Model_Context_Protocol

2] The Complete Guide to MCP in 2026 — Essa Mamdani

Production-grade walkthrough of MCP server and client development, transport layers, and ecosystem direction as of mid-2026. Source of the “USB-C for AI” framing and transport architecture guidance.

essamamdani.com · April 2026

3] MCP Enterprise Adoption Guide 2025 — Deepak Gupta

Detailed analysis of MCP adoption metrics, security risks (CVE-2025–6514, CVE-2025–49596), OAuth implementation strategies, and BCG’s characterisation of integration complexity as quadratic without MCP.

guptadeepak.com · December 2025

4] MCP Hits 97M Downloads — Digital Applied

Adoption milestone analysis: SDK download growth from 2M (Nov 2024) to 97M monthly, cross-provider adoption by OpenAI, Google, Microsoft, and AWS, and the 5,800+ public MCP server registry.

digitalapplied.com · March 2026

5] MCP Explained for 2026 — Internative

Engineering-leader perspective on MCP’s integration calculus: reduced integration surface, auditable AI actions, and how model swaps become configuration changes rather than engineering projects.

internative.net · June 2026

6] MCP and Vendor Lock-In — Informatica Blog

Real-world scenario analysis of how LLM provider switches (OpenAI → Anthropic) break traditional AI integrations, and how MCP acts as a universal, standardised interface that decouples tool logic from model providers.

informatica.com · January 2026

7] MCP at First Glance: Security and Maintainability — arXiv

Academic analysis of open-source MCP server health, security posture, and maintainability. Covers the 86% enterprise access rate via MCP-capable models and identifies outstanding attack surfaces in community servers.

arxiv.org · April 2026

8] MCP Technical Report — DEV Community

Exhaustive technical reference covering the full MCP server development lifecycle: JSON-RPC message layer, Python and TypeScript implementation patterns, error handling, security hardening, and deployment strategies.

dev.to · December 2025

9] Why Every Developer Should Care About MCP — daily.dev

Developer-focused explainer on MCP’s N+M complexity reduction, OAuth 2.1 integration, Streamable HTTP transport, and the significance of the December 2025 Linux Foundation donation for long-term protocol neutrality.

daily.dev · April 2026

10] What Is MCP? The 2026 Guide for SaaS PMs — Truto Blog

Product and business perspective on MCP adoption: Forrester predictions, AAIF governance detail, security risks (prompt injection, tool poisoning), and the MCP SDK download growth timeline from launch through cross-industry adoption.

truto.one · April 2026

Thank you so much for reading 💙

Like | Follow | Subscribe to the newsletter.

Catch me on my socials here: https://bio.link/yashpawar


메타데이터
post_id
9a7d9c574603
slug
vendor-lock-in-killed-my-ai-pipeline-heres-what-i-rebuilt-with-mcp-9a7d9c574603
url
https://medium.com/@yashpawar6849/vendor-lock-in-killed-my-ai-pipeline-heres-what-i-rebuilt-with-mcp-9a7d9c574603
canonical_url
https://medium.com/@yashpawar6849/vendor-lock-in-killed-my-ai-pipeline-heres-what-i-rebuilt-with-mcp-9a7d9c574603
author_url
https://medium.com/@yashpawar6849
status
ok
fetched_at
2026-08-12 00:14:20