Skip to main content

MCP Is Rewriting the Rules of API Integration

· 10 min read
W Ian Douglas
Staff Developer Advocate

blog cover

As developers, we're always looking for ways to build more efficient, scalable, and intelligent applications. For years, RESTful APIs have been our go-to for connecting services. Here are some ways you can integrate AI agents and MCP into your existing API infrastructure to make it smarter, more efficient, and easier to maintain.

Introduction: The Intelligent Evolution of Your APIs

In March 2023, OpenAI announced an easier integration to ChatGPT by using properly-formatted OpenAPI specification files with meticulously-written and detailed instructions in the same file. This announcement gained a lot of attention in developer communities. The business impact was having developers and documentation writers working on one gigantic spec file together, to provide ChatGPT the necessary context to understand which API to use, and how.

Skip ahead just a short while, and AI agents combined with the Model Context Protocol (MCP) are splitting this workload where MCP could contain the context and awareness, and your API team can focus on the API itself. These aren't just incremental improvements, either; the combination of Agentic AI and MCP represent a fundamental shift in how we connect and interact with data and services.

The shift to using AI Agents and MCP has the potential to be as big a change as the introduction of REST APIs was back in 2005. Imagine a world where integrations are more dynamic, context-aware, and require less manual coding. This isn't a distant future -- it's already happening. This is an opportunity for us to boost productivity, enhance app intelligence, and ultimately deliver better experiences to our users, clients, and customers.

Let's use an example: imagine your team wants AI to handle dynamic pricing adjustments in your e-commerce workflow at Square. If you could gain a faster response time to market changes or inventory, you could reduce the need to build dozens or hundreds of dynamic pricing rules into your code. Your productivity as a developer goes up, and you have less code to maintain. You could write those rules in a more spoken-language way, and the AI agent can handle the rest through MCP and your APIs.

From Static Endpoints to Intelligent Interactions

Current Landscape: The Limitations of Traditional APIs

Many of our current systems rely heavily on traditional APIs, like RESTful APIs, which are designed with static endpoints that respond to specific requests with specific results. While these APIs have served us well (and certainly aren't going away any time soon), they come with limitations:

  • The static nature of RESTful APIs makes them more rigid, less adaptable to business changes, and require hard rules around versioning to provide compatibility.
  • They often require significant manual effort to define endpoints, handle data transformations, and manage complex workflows. This can lead to slower development cycles and increased maintenance overhead.

The AI opportunity lies in leveraging intelligent agents, combined with MCP, to create more adaptive integrations. These agents can understand context, discover relevant services, and negotiate interactions in a more dynamic way than static API calls. The static APIs are still being used, but the AI agents can navigate those more easily than changing your code calling the APIs and parsing and validating responses, and handling errors.

Development Impact: Boosting Productivity, Enhancing User Experiences

This dual integration of AI agents and MCP can have a significant positive impact on your development processes and the applications you build:

  • Developer Productivity: By automating many integration tasks and reducing the need for extensive manual coding, AI agents free up our time to focus on core application logic and innovation. (And testing. And security. And documentation. And...)
  • Customer Satisfaction: Intelligent integrations can lead to more personalized and responsive user experiences. Agents can facilitate real-time data analysis and context-aware interactions, making our applications smarter and more user-friendly.
  • Scalability: As your application grows, the complexity of managing multiple APIs can become overwhelming. Using multiple AI agents can help manage this complexity by dynamically adapting to changes in the underlying services and workflows.

Business Impact: Driving Efficiency and Cost Savings

From the business side, the integration of AI agents and MCP can lead to significant cost savings and efficiency gains. Here are some key areas where you can expect to see improvements:

Example ROI Calculation (Per Developer):

Traditional API Development:

  • Average time to add feature: 2 weeks
  • Developer cost: $150/hour
  • Assuming 40 hours/week: 2 weeks * 40 hours/week * $150/hour = $12,000

AI-Agent Enabled:

  • Average time to add feature: 2 days
  • Developer cost: $150/hour
  • Assuming 8 hours/day: 2 days * 8 hours/day * $150/hour = $2,400

Annual savings for 50 features: ( $12,000 - $2,400 ) * 50 = $480,000 per developer

This illustrates the potential for significant time and cost savings per developer by adopting AI agents.

Integrating AI and MCP: Navigating the Landscape

Integrating AI agents, especially through a platform like MCP, requires careful consideration.

  • Risk Management: MCP, while promising, is a newer technology. Your team needs to thoroughly evaluate potential security concerns and understand the maturity of the platform before deep integration into critical systems.
  • Planning for Continuity and Versioning: As with any evolving technology, you will need strategies for ensuring the continuity of integrations and managing versioning of both the AI agents and MCP itself.

Phased Approach: A Practical Integration Strategy

A step-by-step approach can help mitigate risks, and learn effectively through feedback, as you integrate AI agents via MCP:

Phase 1: Assessment (Initial Exploration)

  • Look through your existing API usage, and identify integration possibilities
  • Consider the ROI: start with small ideas and grow your integration efforts over time
  • Build initial business/tech plans for adopting AI agents and MCP

Phase 2: A/B Testing and Pilot Projects

  • Select a low-risk, high-value service for initial AI agent integration via MCP
  • Implement the integration, then do thorough A/B testing and comparisons against the traditional API approach
  • Measure the results, gather benchmark/performance data, and talk to the team about what you find

Phase 3: Scale and Optimization

  • Take it a step at a time: based on the results, take on bigger and more complex integration ideas
  • Continue to optimize your integration process over time
  • Use feedback from your dev teams and end-users to refine your process

Measuring Success: Quantifying the Impact

For the business readers: to understand the benefits of integrating AI agents via MCP, here are some key performance indicators (KPIs) you can track:

  • Development Velocity
  • Error Rates
  • Customer Satisfaction

Build Your Case Study and Share Your Learnings

Documenting your team's journey and sharing your experiences is valuable for both your team and the wider developer community. Here are a few things you should share to help demonstrate the impact of your projects:

  • Before and After Metrics: what kind of improvements did you see in development time, error rates after integrating AI agents and MCP?
  • Team Feedback: there's going to be a learning curve here, similar to what we all experienced when integrating APIs; gather feedback about how the integration workflows are going and what could be improved
  • Customer/End User Impact: highlight any positive changes in user engagement, satisfaction, or other user/customer metrics
  • Lessons Learned: perhaps the most important; what worked well, what didn't, how are you changing the process for the next phase of integration?

Where do we go from here?

Understanding your existing integrations, and identifying potential areas for improvement with AI agents and MCP is your starting point. There is a lot to learn about integrating AI agents, and MCP is still a new technology.

Finding those opportunities where AI can help, and outlining a plan to gradually adopt AI and MCP into your projects is the best way to start.

Keep in mind, this integration landscape is still evolving. Stay open to new ideas, and adapt your approach as the technology matures. Building smarter applications is a journey, and there will be forks in the road.

Additional Reading:

  1. What are AI Agents
  1. An Introduction to MCP

  2. Connecting AI Agents to Your Systems with MCP

  3. Global AI Survey: AI proves its worth, but few scale impact

  4. Bringing generative AI to bear on legacy modernization in insurance

TL;DR Common Questions

Q: How will MCP help with APIs?
A: Start with this post by Angie Jones. MCP provides context about your API, to give AI Agents more context and awareness of the capabilities of your API endpoints and responses. This can help the Agent understand the intent of the request, and dynamically invoke (or "call") to underlying API endpoint, handle data transformation, and return a response. No more manually writing the code, response validators, error handlers, and so on!

Q: What are some initial steps I can take as a developer to explore AI agents and MCP?
A: Start by researching the fundamental concepts, and use other existing MCP servers. We recommend starting with Goose to integrate an existing MCP server. We have a growing listof tutorials to help you find some technologies like GitHub, PostgreSQL, Google Maps, and more. Once you feel comfortable with using MCP, you can start building your own MCP server for your own APIs.

Q: What about AI and MCP security?
A: AI agents can enhance security through better context awareness in interactions, but MCP is still relatively new, and requires careful security evaluations. Your business and dev teams should thoroughly investigate MCP's capabilities to ensure you're building appropriate access control, and managing data privacy.

Q: How long would a full migration typically take?
A: It's too dynamic to give one solid answer. Integration and migrations can vary a lot, depending on the scope of your existing API usage and existing integrations. Start small, build some pilot projects to try it out, and these might only take a few days or weeks.

Q: What are some potential problems devs might encounter on this AI/MCP journey?
A: There's a learning curve associated with any technology. This can be compounded when you consider that MCP is still relatively new and evolving. The greater community needs strategies around testing and debugging MCP, as well as considering security and data privacy. This means that what you learn today will need to be re-evaluated even a few short months from now.

Q: How mature and production-ready is MCP for enterprise-level AI integration?
A: Your approach on this may vary depending on whether you're building your own MCP server, or whether you're using third-party MCP servers in your integration. Developers should evaluate all of the benefits of MCP and consider the work being done around security and data privacy. Focus on a small pilot project or non-critical system initially to assess its suitability for your specific needs. Stay updated on MCP's development roadmap and community feedback.