# Altimate MCP Architecture Documentation
## Overview
This document outlines the architecture of Altimate's MCP (Multi-Client Protocol) system, which serves as the core engine for managing tools and integrations across different platforms.
## Core Components
### 1. MCP Engine
The MCP Engine is the central component of the system, responsible for managing the MCP server and tool integrations.
#### Key Responsibilities
- Server Management
  - Starting and stopping the MCP server
  - Tool registration and un-registration
  - Currently uses SSE transport (planned migration to stdio)
#### Tool Integration
- Supports multiple tool registration sources:
  - User-created datamates in SaaS
  - External sources (e.g., VSCode extensions)
- Validates connections per tool
- Exposes methods to CRUD connections (Update supports both remote and local connections)
#### Connection Management
- Storage: Connections are stored in `~/.altimate/connections.json`
- Format: Key-value pairs for each tool (e.g., GitHub PAT token)
- Configuration Methods:
  - Local configuration
  - SaaS-based configuration
#### Additional Responsibilities:
  - Tool usage tracking
  - Guardrails incident monitoring
### 2. Altimate MCP Extension
Serves as the client interface for the MCP engine.
#### Key Features
- Provides `registerTools` method for others extension to register tools
- Creates and manages `mcp.json` in `.vscode/.cursor` directory
  - Contains MCP server URL configuration
  - Used by Cursor/VSCode for MCP server enablement
#### VSCode Integration
- vscode expects all the tools to be pre defined in package.json
- a custom extension is built dynamically with package.json containing all registered tools  and installed it in the workspace.
### 3. SaaS Platform
Provides a user interface for managing datamates and monitoring system usage.
#### Features
- Datamate Creation
  - User-driven integration selection
  - Tool management
  - Connections management per integration
- Monitoring
  - Tool usage tracking
  - Guardrails incident reporting