Engineering AI systems with Model Context Protocol
On November 26, 2024, Anthropic released the Model Context Protocol (MCP)—an open standard for data exchange between applications and data sources. MCP simplifies how Large Language Models (LLMs) interact with external tools and data, addressing the challenges developers face when integrating AI into their systems.
At Raygun, we’ve been exploring agentic workflows to improve productivity and saw real potential in MCP. This post will explain how MCP works, what we’ve implemented, and where we think the standard is headed.
What’s in this article
- The basics
- What can MCP do?
- Raygun MCP server
- Building MCP servers
- Current limitations
- Looking forward
The basics
MCP consists of two components: MCP hosts and MCP servers. A host, like Claude Desktop, acts as the AI interface. MCP servers connect the host to various data sources and tools. Servers advertise their capabilities—fetching files, querying a database, or making API requests—so a single host can access multiple servers simultaneously. Currently, MCP operates locally but still supports remote APIs.
MCP introduces three key interfaces for data interaction: tools, prompts, and resources.
- Tools are standardized actions declared on the server. They work like APIs, enabling tasks like searching the web, analyzing code, or processing data. Because tools follow a common standard, any MCP-compatible host can discover and use them.
- Prompts are reusable templates defined by servers that users can select to standardize everyday interactions. For example, a Git server might provide a ‘generate-commit-message’ prompt template that users can choose when they want to create standardized commit messages.
- Resources offer a consistent way to access read-only data, similar to file paths or database queries. For example,
file:///logs/app.log
orpostgres://database/users
.
The initialization process is simple: an MCP host discovers the capabilities of connected servers and loads their tools, prompts, and resources.
In terms of security, MCP servers keep credentials and sensitive data isolated. Hosts don’t have direct access to these credentials, and all interactions require explicit user approval. This approach works well for MCP’s current local-first design, where servers are not publicly exposed.
What can MCP do?
MCP’s modular design allows hosts like Claude Desktop to act autonomously across multiple servers. There are many tasks that AI can accomplish now that hosts easily integrate with API endpoints and local data sources.
For example, Claude accessed and updated relevant project files while building Raygun’s MCP server. It recognized file dependencies, fetched the necessary context, and provided suggestions that sped up development.
The same applies to other servers. If your codebase is on GitHub, an MCP server can fetch specific files without requiring a complete clone of the repository. The Github MCP server can also create branches and help with issue management.
Using an MCP server for tools like Puppeteer allows you to automate complex web interactions by allowing AI to interact with web pages. This Puppeteer MCP server supports page navigation, screenshots, clicking, and hovering.
Using the Google Maps MCP server, hosts like Claude Desktop can access location data and perform geocoding, place searches, route calculations, and travel times.
As more developers build MCP servers, the ecosystem grows. Each new server adds capabilities that any MCP-compatible host can use, making LLMs far more versatile.
Raygun MCP server
When MCP launched, we saw an opportunity to create an MCP server for the Raygun API. This server lets LLMs access error reports and performance data, making tasks like analysis and report generation easier. We’ve already seen internal improvements when using it to optimize Raygun’s web application. With this server, you can use LLMs like Claude to improve user experiences by finding slow pages and identifying fixes with AI.
Building MCP servers
Anthropic has made it easy to build MCP servers (we got ours running two days after release), supporting TypeScript and Python through their SDKs. Their full-text documentation gives developers (or even AI tools) everything needed to create MCP servers and clients. One recommended way to get started is to share the full-text documentation and SDK resources with an LLM, like Claude, to help set up a server it can later interact with.
When creating our own MCP server for Raygun, we found it helpful to plan out the categorization of data and functionality ahead of time. Deciding what to define as a tool, prompt, or resource made implementation much smoother. Once this structure is in place, programming becomes far more straightforward.
Anthropic also has many examples of MCP servers that developers can use as a jumping-off point. Another tool we found useful when creating the Raygun MCP server was the MCP Inspector, which simplifies debugging by listing a server’s capabilities, running tools, and verifying responses.
Current limitations
Setting up MCP and adding servers to Claude Desktop requires technical knowledge, making MCP servers difficult for non-technical users to configure and operate. Even for technical users, GitHub is the only place to find or share new MCP servers, limiting discovery.
Additionally, MCP servers must run locally, restricting the scope of data they can access.
Looking forward
The Model Context Protocol is a good first step in standardizing how AI systems interact with tools and data sources. Reducing the complexity of integrations and enforcing a modular design makes it easier to build AI workflows. Anthropic is actively developing remote MCP hosts, so the local restriction will not be an issue for long.
At Raygun, we’re excited to continue working with MCP and contributing to its growth. With features like remote server support in active development by Anthropic, MCP could become the standard for integrating AI into applications.
For now, it’s a big step toward making AI tools more robust and adaptable.
Not a Raygun customer? Try out the full Crash Reporting application free for 14 days!