Imagine an assistant (AI Agent) that recognizes you’re out of the house and automatically turns off your lights, even if they’re from different smart light brands. Or picture yourself working on a technical paper analysis with Claude (acting as an AI Agent in this example) and you want to change the music on your computer without opening another app or manually adjusting the volume. For such tasks, the AI agent needs access to various relevant contexts or environments to act automatically or respond to user commands. A protocol like MCP could enable AI agents to seamlessly interact with multiple environments without the need to repeatedly build or rebuild adapters in otherwise inconsistent ways for different data contexts. This could drive a significant shift in how we create AI agents. By the end of this article, I’ll demonstrate a simple use case where you can control your Mac’s volume just by talking to Claude through the Claude Desktop app.
Revolution in AI Agentic workflows
The revolution in AI agentic workflows has the potential to reshape businesses and industries, pushing the limits of what autonomous agents can achieve. Transformations of this magnitude are rare but groundbreaking—comparable to the automotive or industrial revolutions. Many tech veterans are even dubbing 2025 as “the year of AI agents.”
While I won’t speculate on the accuracy of this prediction, one critical challenge in the current AI landscape lies in enabling LLMs- the core of AI agents, to access data from a multitude of systems and interact with external systems effectively. The key question is how to achieve this consistently across diverse systems in a reusable manner, without repeatedly reinventing the context layer. Overcoming this hurdle will be essential to realizing the full potential of AI agents.
Context layer interoperability
At its core, an AI agent is an autonomous or semi-autonomous system that leverages intelligence to take meaningful actions, with data, external environments, or context serving as the foundation of its functionality. See below a basic AI Agent makeup as described by Anthropic.
Picture credit: Anthropic (source).
Context layer interoperability is crucial for AI agents, especially as multiple developers and companies create diverse flavors of agents that may rely on the same datasets or environments. This could lead to scenarios where agents interact with other agents, all requiring access to the same raw context—for example, one agent acting as an Analyst and another as a CEO for a company.
To avoid redundant efforts, reuse becomes essential. Repeatedly reinventing context pipelines whenever data structures, context parameters, or contracts change is inefficient. Decoupling the context access layer is vital for enabling rapid experimentation and ensuring scalability across evolving use cases.
Model Context Protocol (MCP)
The Model Context Protocol (MCP) aims to simplify AI integration by improving connectivity between AI models and external systems, accelerating AI agent workflows. AI systems have struggled with a lack of standardized protocols for connecting to data sources, and MCP, introduced by Anthropic in November 2024, seeks to address this. However, its widespread adoption and potential as an industry standard remain to be seen.
Borrowing from the official MCP documentation:
MCP is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standardized way to connect your devices to various peripherals and accessories, MCP provides a standardized way to connect AI models to different data sources and tools.
MCP aims to be the missing link for seamless data integration in AI agentic workflows or systems. If adopted by major players like foundation model creators and data providers, it could streamline the development and deployment of AI agents, accelerating their creation across various use cases.
Control your Computer’s volume with AI
Now, let’s get back to a simple use case: controlling your computer’s volume with AI. While it might seem like a small or trivial example, it demonstrates how straightforward MCP is to use and highlights the value it delivers.
step 1: Setup the MCP Server
I’ll use MCP’s Typescript SDK to expose two tools (functions) for Claude Desktop (you can consider Claude Desktop as the Ai Agent in this example). The two functions are muteComputer
and unMuteComputer
. In a nutshell Claude Desktop will use MCP to discover these tools, use them intelligently. Under the hood, muteComputer
and unMuteComputer
use AppleScript to control the MAC’s volume.
#!/usr/bin/env node
// full code is uploaded here:
// https://github.com/samsel/mcp_mac_volume_controller
import {
Server
} from "@modelcontextprotocol/sdk/server/index.js";
import {
StdioServerTransport
} from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
ToolSchema,
} from "@modelcontextprotocol/sdk/types.js";
import {
execSync
} from "child_process";
// Server setup
const server = new Server({
name: "mac-volume-controller",
version: "0.1.0",
}, {
capabilities: {
tools: {},
},
}, );
// Tool implementations
function muteComputer() {
execSync(
'osascript -e "set volume with output muted"'
);
}
function unMuteComputer() {
execSync(
'osascript -e "set volume without output muted"'
);
}
// Tool handlers
server.setRequestHandler(
ListToolsRequestSchema,
async () => {
return {
tools: [{
name: "mute_computer",
description: "Mute the computer. " +
"Turn OFF the volume in MAC. " +
"Mutes the laptop and volume is set to zero. ",
inputSchema: {
type: "object",
properties: {},
required: [],
},
},
{
name: "unmute_computer",
description: "Unmute the computer. " +
"Turn ON the volume in MAC. " +
"unMutes the laptop and volume is not set to zero. ",
inputSchema: {
type: "object",
properties: {},
required: [],
},
},
],
};
});
server.setRequestHandler(
CallToolRequestSchema, async (
request) => {
try {
const {
name,
arguments: args
} = request.params;
switch (name) {
case "mute_computer": {
muteComputer();
return {
content: [{
type: "text",
text: "your mac is muted now"
}],
};
}
case "unmute_computer": {
unMuteComputer();
return {
content: [{
type: "text",
text: "your mac is unmuted now"
}],
};
}
default:
throw new Error(
`Unknown tool: ${name}`
);
}
} catch (error) {
const errorMessage =
error instanceof Error ?
error.message : String(
error);
return {
content: [{
type: "text",
text: `Error: ${errorMessage}`
}],
isError: true,
};
}
});
// Start server
async function runServer() {
const transport =
new StdioServerTransport();
await server.connect(transport);
console.error(
"MCP Volume Controller Server running on stdio"
);
}
runServer().catch((error) => {
console.error(
"Fatal error running server:",
error);
process.exit(1);
});
Configure your package.json
:
{
"dependencies": {
"@modelcontextprotocol/sdk": "^1.1.0"
},
"type": "module"
}
step 2: Set up your Claude desktop (AI Agent) configuration:
{
"mcpServers": {
"volumecontroller": {
"command": "node",
"args": [
"/Users/username/path/mcp_mac_volume_controller"
]
}
}
}
step 3: Test the setup with MCP inspector
MCP Inspector is a developer tool designed for testing and debugging MCP servers.
step 4: Fun part. Try it in Claude.
Claude reconginzes the tools that it could use based on the configuration that was done in set 2.
Claude intelligently uses the tool. viola.
MCP is powerful, I am hoping it would become mainstream to be the catalyst that drives this AI Agentic transformation forward. MCP supports model level, app level, user level features such as resources, prompts, tools, sampling, roots. Read more here.
See some wild examples that people have been building x.com/minchoi/status/1861450154965917727
For those interested in delving deeper into the topics discussed above:
- https://modelcontextprotocol.io/introduction
- https://github.com/modelcontextprotocol/servers/tree/main/src
- https://modelcontextprotocol.io/docs/tools/inspector
- https://www.anthropic.com/research/building-effective-agents
- https://www.anthropic.com/news/model-context-protocol
- https://www.langchain.com/stateofaiagents
- https://www.mongodb.com/resources/basics/artificial-intelligence/ai-agents
- https://www.deeplearning.ai/short-courses/ai-agentic-design-patterns-with-autogen