🤖 Agente IA 🔌 MCP integrado 🔐 OAuth 2.0

Un agente con herramientas MCP
detrás de OAuth 2.0

Demo técnica de BMOPS Consulting: inicia sesión con tu cuenta de GitHub (Authorization Code + PKCE), y el agente responderá usando un servidor MCP propio — verás cada herramienta que invoca en tiempo real.

1OAuth 2.0 — Sign in with GitHub

Flujo Authorization Code + PKCE contra el proveedor real. Sesión con cookie firmada HMAC-SHA256.

GET /login → github.com/login/oauth/authorize
GET /callback?code=… → POST access_token → /api/user
2Servidor MCP propio

Un servidor MCP (Model Context Protocol, JSON-RPC sobre stdio) expone herramientas reales. Está en este repo, escrito con el SDK oficial.

mcp_server.py → tools: hora_actual · fetch_url · consultar_docs
3Agente = cliente MCP

El agente Python decide qué herramienta necesita y la invoca por el protocolo MCP estándar. Nada de hardcode: tools descubiertas y llamadas vía ClientSession.

ClientSession(stdio_client) → session.call_tool("fetch_url", …)
4LLM self-hosted

El razonamiento corre contra un gateway local de modelos (gratis, en la misma infraestructura).

gateway :3010 → nemotron-3-nano-30b
Python · FastAPIMCP SDK OAuth 2.0 + PKCEQdrant Embeddings MiniLMDocker VPS