The Model Context Protocol lets AI assistants connect to tools, files, APIs and databases in a structured way.
Language models like Claude or GPT are powerful but isolated. They cannot access your local files, internal APIs or databases without a structured bridge. MCP (Model Context Protocol) is that bridge. It defines a standardised protocol letting an LLM discover and use tools in a safe, predictable way.
Imagine an AI assistant embedded in your IDE that can read your code, create Jira tickets, query your database or trigger CI pipelines. All of this becomes possible with MCP servers that expose these capabilities as declared tools.
An MCP server exposes tools (callable functions), resources (readable data) and prompts (reusable templates). The MCP client (the AI assistant) discovers these capabilities via a handshake and calls them on demand. Communication goes through stdio or SSE.
Here is how to declare a minimal MCP server exposing a project-reading tool:
const server = new McpServer({
name: "portfolio-tools",
version: "1.0.0",
});
server.tool("getProjects", async () => {
return {
content: [
{
type: "text",
text: "Available projects list",
},
],
};
});