ui-genai-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ui-genai-mcpGet my user info and test SharePoint access"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ui-genai-mcp
Servidor MCP (Model Context Protocol) corporativo em Python (Starlette/SDK MCP) + Docker, hospedado em Azure Container Apps e consumido por agentes do Microsoft Foundry (Teams / M365 Copilot). Serve de base reutilizável para projetos de IA: autenticação Entra por endpoint, OBO para Microsoft Graph e uma arquitetura de toolsets em fatias verticais. O toolset inicial é o diagnostico.
Usuário (Teams/Copilot) ─► Agente Foundry ──Bearer (aud=api://app)──► ui-genai-mcp (/mcp)
▲ card de consentimento (1ª vez) │ valida JWT Entra
└──────────── Entra ID ◄─────────────────────────────────────────┤ OBO (mesmo usuário)
▼
Microsoft Graph / SharePointStatus: Fase 0 — spike de autenticação com o toolset diagnostico (diag_whoami, diag_sharepoint_probe). Ver docs/phase0-spike.md.
Pré-requisitos
uv (
winget install astral-sh.uv). Em rede com inspeção TLS:UV_SYSTEM_CERTS=1.Python 3.13 (o uv instala:
uv python install 3.13).Azure CLI para deploy (
az acr builddispensa Docker local).
Related MCP server: SharePoint MCP Server
Início rápido (local, sem autenticação)
cp .env.example .env # AUTH_ENABLED=false
uv sync
uv run uvicorn ui_genai_mcp.app:app_factory --factory --reload --port 8000
curl http://127.0.0.1:8000/healthz
uv run python scripts/smoke_mcp.py --url http://127.0.0.1:8000/mcp --tool diag_whoamiOu com Docker: docker compose up --build.
Qualidade
uv run pytest # testes (unit, integração HTTP, contrato)
uv run ruff check src tests scripts
uv run ruff format --check src tests scripts
uv run mypy src
UPDATE_CONTRACTS=1 uv run pytest tests/contract # após mudar tools de propósitoConfiguração
Todas as variáveis estão documentadas em .env.example. Principais:
Variável | Descrição |
|
|
| App registration existente (OBO). |
| Scope curto exposto pelo app ( |
| URL pública (define o recurso e o Protected Resource Metadata). |
| Host(s) aceitos — FQDN do Container App (proteção DNS rebinding). |
| Toolsets expostos, separados por vírgula. |
Endpoints
Rota | Uso |
| Transporte MCP Streamable HTTP (stateless, exige Bearer). |
| Protected Resource Metadata (RFC 9728). |
| Liveness / readiness. |
Documentação
docs/adding-a-toolset.md— processo de registro de novas tools.docs/foundry-setup.md— Container Apps, app registration e connection no Foundry.docs/phase0-spike.md— roteiro e critérios do spike.
Troubleshooting
Sintoma | Causa provável |
| FQDN ausente em |
|
|
| Token sem o scope |
| Lifespan do app não executado (subir via |
Mensagem "faça login novamente" | OBO falhou ( |
This server cannot be deployed
Maintenance
Related MCP Connectors
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
OAuth 2.1 short-link tools for AI agents with scoped tokens, approvals, audit logs, and revocation.
MCP-first toolbox for agents: KV storage, auth, queue, and utility tools. Free in early access.
Connect AI agents to 1000+ apps with managed authentication and tool-calling.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA secure Model Context Protocol backend service built on Azure Functions that provides authenticated access to Microsoft Graph API. It leverages Azure Active Directory and APIM to enable secure tool discovery and user context management through the OAuth On-Behalf-Of flow.-
- FlicenseAqualityDmaintenanceEnables AI agents to manage SharePoint Online resources including lists, libraries, columns, views, and files through the SharePoint REST API. It supports comprehensive data operations, schema management, and file transfers using secure MSAL authentication.21-
- FlicenseNot gradedqualityDmaintenanceImplements the on-behalf-of flow with Entra ID to enable authorized calls to Microsoft Graph API via MCP tools.9-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with SharePoint Online and OneDrive content via Microsoft Graph, supporting device-code authentication for multi-account environments.1MIT