MCP at Sourcegraph

Introduction and Background 00:09

  • Presenter is Byang, CTO and co-founder of SourceCap, a developer tools provider for large, complex codebases
  • SourceCap serves major software companies, US banks, and many organizations across industries
  • Presentation focuses on their journey with MCP (Model Context Protocol) and its deep integration into their architecture

Evolution of AI Application Architectures 02:03

  • Noted paradigm shifts in AI app architecture: from basic co-pilot/completion models, to chat-based models (rag chat era), to current agent-centric approaches
  • Tool calling in conjunction with MCP is driving a new wave in AI application design
  • SourceCap has built a new coding agent, AMP, from scratch to leverage these changes

Demonstration of AMP with MCP Integration 04:44

  • Live demo showcases AMP performing a code change (turning a panel red) using MCP-integrated tools, including fetching linear issues and interacting with codebase context
  • AMP utilizes a remote MCP proxy to securely connect with external services like Linear
  • Demonstrates agentic behavior: reruns tasks when issues occur, highlighting robustness
  • AMP architecture explained and illustrated by the agent itself, showing component interactions via MCP

Parallel Tasking and Tool Usage 07:37

  • AMP is able to multitask, exemplified by simultaneously building a simple 3D Flappy Bird game while updating itself and explaining its architecture
  • Integrates with tools like Playwright (via Playwright MCP server) to interact with browsers and validate changes through screenshots
  • Diagram generated by AMP visualizes its architectural components and MCP connections

Deep MCP Integration in AMP 11:44

  • AMP’s client-server model interfaces with both local tools (e.g., Playwright, Postgres) and external services (e.g., Sourcegraph, Linear, Sentry) through MCP
  • Secure connection and handling of secrets are enabled by a remote MCP proxy and OAuth 2 integration
  • Emphasizes the importance of tightly scoped, relevant MCP toolsets to avoid overloading models with too many choices (avoiding "toolmageddon")
  • Categories of useful tools: context finders, feedback providers (tests, compilers), and task completion/notifiers

Best Practices and Pitfalls 15:52

  • Limiting integrated tools per workflow enhances model performance and reasoning
  • Effective feedback loops, such as using Playwright screenshots, are crucial for agentic reliability and user experience
  • Secure handling of credentials is essential—plain text storage is avoided, secrets remain encrypted

Future Directions and Paradigm Shifts 18:50

  • Sub-agents (agents acting as specialized tools) are highlighted as a promising method for gathering code context and refining workflow processes
  • Emergence of dynamic tool synthesis—models may soon chain and compose tools programmatically, drawing analogies to evolving programming language abstractions
  • Many advanced MCP features (e.g., stateful sessions, two-way communication, streaming) remain underused; expectations are for rapid evolution in capabilities
  • Encourages community involvement in building and integrating new MCP servers; SourceCap eager to collaborate on future AI-driven development methods

Kodi vs. AMP and Closing Thoughts 23:16

  • Kodi, previous SourceCap product, was tailored for the rag chat/context-aware assistant era, and remains valuable for some users and workflows
  • AMP is purpose-built for the agentic/tool-calling era, requiring re-imagined application design to fully leverage new LLM capabilities through MCP
  • Suggests that not rethinking architectures may result in missing out on the next wave of AI innovation
  • Concludes with an invitation to collaborate and explore new software development paradigms enabled by MCP and agents