Logo de Context Engineering with MCP

Context Engineering with MCP

Organização
timothywarner-org

🧠 Stop building AI that forgets. Master MCP (Model Context Protocol) with production-ready semantic memory, hybrid RAG, and the WARNERCO Schematica teaching app. FastMCP + LangGraph + Vector/Graph stores. Your AI assistant's long-term memory starts here.

Publicado portimothywarner-org
Repositóriocontext-engineering
IdiomaPython
Forks
23
Estrelas
27
Ferramentas disponíveis
0
Tipo de transportestdio
Categorias
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Context Engineering with MCP disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    27 estrelas e 23 forks no repositório vinculado.

Context Engineering with MCP: Build AI Systems That Actually Remember

Welcome to the training hub for mastering Context Engineering with Model Context Protocol (MCP). This course teaches you to implement production-ready semantic memory systems for AI assistants using Python, FastAPI, FastMCP, and LangGraph.


Quick Start

Prerequisites

  • Python 3.13 (pinned in .python-version) — onnxruntime (a chromadb dependency) does not yet ship 3.14 wheels
  • Node.js 20+ (for Lab 01 and MCP Inspector)
  • uv package manager (recommended for Python)
  • Claude Desktop or Claude Code

Option 1: Hello MCP Lab (Beginner Entry Point)

bash
git clone https://github.com/timothywarner-org/context-engineering.git
cd context-engineering/labs/lab-01-hello-mcp/starter
npm install && npm start

# Test with MCP Inspector (in another terminal)
npx @modelcontextprotocol/inspector node src/index.js

Option 1.5: MCP Chat CLI Lab (Python Bridge)

powershell
cd labs/lab-02-mcp-chat
.\run.ps1

run.ps1 is the on-rails launcher: it bootstraps .env, lifts ANTHROPIC_API_KEY from the repo-root .env, and launches the chat REPL. Lab 02 is the smallest complete Python MCP client + stdio server + REPL in the repo - the conceptual bridge between Lab 01 (JS hello-world) and WARNERCO (production-shaped).

Option 1.7: MCP Apps Lab (Interactive UI Surfaces)

bash
cd labs/lab-03-mcp-apps

Lab 03 ships three npm MCP servers (budget-allocator, map, system-monitor) that render interactive ui:// surfaces in Claude Desktop via SEP-1865 (MCP Apps extension, spec 2026-01-26). See labs/lab-03-mcp-apps/README.md.

Option 1.9: Remote MCP + OAuth on Azure

Lab 04 is a remote MCP server secured by Entra ID OAuth, fronted by Azure API Management as the authorization-server facade, with an Azure Functions Python backend. Deploy with azd up, connect per remote-mcp-apim-functions-python/QUICKSTART.md, then tear down the same day with azd down --purge --force.

Option 2: WARNERCO Schematica (Flagship Teaching App)

bash
cd src/warnerco/backend
uv sync
uv run uvicorn app.main:app --reload    # HTTP server at http://localhost:8000
uv run warnerco-mcp                      # MCP stdio server for Claude Desktop
uv run warnerco-restart                  # Force-kill port 8000 and restart uvicorn

The warnerco-restart command (from scripts/restart_server.py) terminates anything bound to port 8000 (Windows: netstat + taskkill /F /T; POSIX: lsof + SIGKILL) before restarting. Flags: --kill-only, --port N.


Course Structure (4 x 50 Minutes)

SegmentTopicFocus
1Context, Made VisibleConsumer LLMs hide context; dev tools (Claude Code, Copilot) expose it
2MCP: Standard for ContextThe protocol + a server on the official mcp SDK; current best practices
3Memory Tiers in a Real AppWARNERCO's four CoALA tiers live; orchestration kept under the hood
4MCP in the Tools You UseClaude Code + GitHub Copilot in VS Code as context-engineering surfaces

Full plan: instructor/course-plan-june-2026.md (context-first, official-SDK-first; delivered 2026-06-30). The earlier orchestration-forward plan is archived under instructor/archive/.

Segment Notebooks

notebooks/segment-1.ipynb through segment-4.ipynb are four prepopulated, verified teaching notebooks, one per 50-minute segment. Each opens with a repo-root anchor cell that walks up to .git, so it runs from any working directory. They print live counts (never hardcoded), and Segment 3 runs the full pipeline with live Anthropic prose. Open them in VS Code with the Jupyter extension and Run All. Verified to run error-free from both the repo root and notebooks/.


WARNERCO Schematica Architecture

The flagship teaching application exercises all four CoALA memory tiers (Sumers et al. 2024) in a 9-node LangGraph pipeline:

+--------------------------------------------------------------------------+
|                          FastAPI + FastMCP                               |
+--------------------------------------------------------------------------+
|  LangGraph Flow (9-node CoALA-tiered RAG)                                |
|  parse_intent -> query_graph -> inject_scratchpad -> recall_episodes ->  |
|  retrieve -> compress_context -> reason -> respond -> log_episode        |
+--------------------------------------------------------------------------+
|  Four CoALA Memory Tiers                                                 |
|  +------------+  +-----------+  +----------+  +------------------------+ |
|  | Working    |  | Episodic  |  | Semantic |  | Procedural             | |
|  | Scratchpad |  | events.db |  | Vector   |  | MCP Prompts (versioned)| |
|  | (SQLite)   |  | (SQLite)  |  | store    |  | catalog://procedural   | |
|  +------------+  +-----------+  +----------+  +------------------------+ |
+--------------------------------------------------------------------------+
|  Consolidation ("sleep cycle"): scratchpad+episodic --(ctx.sample)--> semantic |
+--------------------------------------------------------------------------+

CoALA Tier Reference

TierWhat it storesBacked byLangGraph node
WorkingSession observations & inferencesdata/scratchpad/notes.db (SQLite)inject_scratchpad
EpisodicTimestamped events with importancedata/episodic/events.db (SQLite)recall_episodes + log_episode
SemanticDurable facts (incl. consolidated FACT-*)Vector store (Chroma / Azure / JSON)retrieve
ProceduralVersioned skills/workflowsMCP @mcp.prompt() registrations(user-invoked, not in pipeline)

The reason node (LangGraph node 6) synthesizes prose via the official anthropic Python SDK (AsyncAnthropic); if the backend .env lacks the key it degrades gracefully - retrieval still works and the prose shows a fallback message.

Episodic recall uses Park et al.'s scoring formula — α_recency · 0.5^(hours/half_life) + α_importance · stored + α_relevance · cosine(query, summary) — and warn_episodic_recall returns the per-event score breakdown so students can see why each memory surfaced.

The knowledge graph is indexed at src/warnerco/backend/data/graph/knowledge.db with 117 entities and 221 relationships across 6 predicates (has_tag, compatible_with, belongs_to_model, has_status, has_category, contains).

Progressive Tool Loading

The server registers 28 MCP tools, 12 resources, and 5 prompts. Two meta-discovery tools implement progressive tool loading per Anthropic's "code execution with MCP" guidance:

  • warn_search_tools(query, detail, limit) — keyword discovery with detail levels name, summary, full
  • warn_describe_tool(name) — full schema for a single tool by name

Both meta-tools self-exclude from warn_search_tools results, so count is up to 26 even when total is 28. Clients can list tools cheaply, then pull full schemas only for what they actually plan to call.


Repository Structure

context-engineering/
├── src/warnerco/backend/      # WARNERCO Schematica (FastAPI + FastMCP + LangGraph)
├── labs/lab-01-hello-mcp/     # Lab 01: Hello MCP, single add tool (JS)
├── labs/lab-02-mcp-chat/      # Lab 02: MCP client + server + chat REPL (Python, vendored)
├── labs/lab-03-mcp-apps/      # Lab 03: MCP Apps, interactive ui:// surfaces (JS/TS, SEP-1865)
├── remote-mcp-apim-functions-python/  # Lab 04: remote MCP + Entra ID OAuth via APIM (Python + bicep)
├── notebooks/                 # Four verified segment teaching notebooks (segment-1..4)
├── docs/                      # Student materials, tutorials, diagrams
├── instructor/                # Instructor-only materials
├── config/                    # Sample MCP client configurations
├── .vscode/                   # VS Code workspace configuration
├── .claude/                   # Claude Code agents and skills
└── CLAUDE.md                  # Development instructions (SOURCE OF TRUTH)

For development details, see CLAUDE.md - the source of truth for:

  • Complete MCP tool reference (28 tools)
  • API endpoint documentation
  • Environment variable configuration (incl. EPISODIC_*)
  • 9-node LangGraph pipeline details
  • All four CoALA memory tiers (Working / Episodic / Semantic / Procedural)

For the framework explainer (read this first): see docs/tutorials/coala-explainer.md — what CoALA is and where each tier lives in the WARNERCO codebase.

For the classroom demo: see docs/tutorials/coala-memory-walkthrough.md — the ~4-minute four-tier classroom path.


MCP Client Configuration

Claude Desktop

Windows: %APPDATA%\Claude\claude_desktop_config.json Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

json
{
  "mcpServers": {
    "warnerco": {
      "command": "uv",
      "args": ["run", "warnerco-mcp"],
      "cwd": "C:/github/context-engineering/src/warnerco/backend"
    }
  }
}

Claude Code (project scope)

.claude/mcp.json is checked in with two entries pointing at the same server: claude-warnerco-schematica and claude-warnerco-coala-memory (the second pre-pins the episodic-memory env vars for class demos).

VS Code Copilot

.vscode/mcp.json is checked in with a single vscode-warnerco-schematica entry (MEMORY_BACKEND=chroma) plus the GitHub Copilot remote MCP server ghcopilot-warner. To list servers in VS Code: Cmd/Ctrl+Shift+P → MCP: List Servers.


Testing with MCP Inspector

bash
npx @modelcontextprotocol/inspector uv run warnerco-mcp
# Opens http://localhost:6274

Resources


Your Instructor

Tim Warner

Microsoft MVP - Azure AI and Cloud/Datacenter Management Microsoft Certified Trainer (25+ years)


License

MIT License - 2026 Timothy Warner


Now go build AI systems that actually remember!

Instalação

TypingMind
Pré-requisitos:

Node.js 18+

{
  "mcpServers": {
    "timothywarner-org-context-engineering": {
      "command": "",
      "args": []
    }
  }
}

Use o MCP de Context Engineering with MCP com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Context Engineering with MCP, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione Context Engineering with MCP como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de Context Engineering with MCP.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "timothywarner-org-context-engineering": {
      "command": "npx",
      "args": [
        "-y",
        "context-engineering"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de Context Engineering with MCP, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de Context Engineering with MCP.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Context Engineering with MCP para me ajudar nesta tarefa?
Context Engineering with MCP
Claro. Já li.
Veja o que encontrei usando Context Engineering with MCP.

Perguntas frequentes

Para que serve o servidor MCP Context Engineering with MCP?

Context Engineering with MCP é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Context Engineering with MCP com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Context Engineering with MCP com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Context Engineering with MCP com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Context Engineering with MCP conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Context Engineering with MCP ao TypingMind?

Context Engineering with MCP funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP Context Engineering with MCP oferece no TypingMind?

Context Engineering with MCP disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Context Engineering with MCP?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Context Engineering with MCP exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇