Skip to content

Instantly share code, notes, and snippets.

View FutureExcited's full-sized avatar

Murzin Artem FutureExcited

  • Future
View GitHub Profile
---
description:
globs:
alwaysApply: true
---
At the end of each task, you need to write all changes to ARCHITECTURE.md.
And by write all changes, I mean modify the architecture of the entire app. If you've changed a function - modify its params/output or whatever you changed.
If you've added a new file - add it to the ARCHITECTURE.md.
import type { Command, CommandGenerator, CommandOptions } from '../../types.js';
import { loadEnv, loadConfig } from '../../config.js';
import { RunCommand } from '../mcp/run.js';
import { MarketplaceManager } from '../mcp/marketplace.js';
import {
MCPAuthError,
MCPConnectionError,
MCPServerError,
MCPToolError,
MCPConfigError,
@FutureExcited
FutureExcited / gemini-2.5-pro.txt
Last active April 10, 2025 15:45
"Describe the architecture of MCP Protocol and how it works. Keep it simple"
### Core Architecture
MCP utilizes a **Host-Client-Server** architecture:
1. **Host:** This is the primary application integrating with AI/LLMs (e.g., Claude Desktop, an IDE like Cursor or Zed, a custom application). The Host's responsibilities include:
* Creating and managing multiple **Client** instances.
* Orchestrating interactions between the user, the AI model, and various Clients/Servers.
* Enforcing security policies, managing user consent, and handling authorization.
* Aggregating context from different sources before presenting it to the LLM.
* Handling `sampling` requests initiated by Servers (acting as the intermediary to the actual LLM).