v1.31.0
guíaPatrón · 01_Estructura_Tecnicaenglishversión en español

Guide: Installing and using MCPs in Ovillo

5 minlectura
1086palabras
9secciones
2026-09-22última edición
1cambios

Version: 1.0 Audience: developers Purpose: document the official ways to install and use Model Context Protocol (MCP) servers in Ovillo projects, the recommended credential patterns, and the security mitigations the ecosystem implements.


1. What an MCP is

A Model Context Protocol server exposes functionality (tools, resources, prompts) to Claude Code through a standard protocol. Claude Code launches the MCP as a subprocess (stdio) or connects over HTTP/SSE, and can invoke the tools it exposes as if they were native.

Examples in use in the organization:

  • Context7 (https://mcp.context7.com/mcp): up-to-date library documentation
  • CWM.RoslynNavigator (local): C# semantic analysis (15 tools)
  • Coming: GitHub, Jira, MS SQL (under evaluation)

2. Three orthogonal axes

Every MCP installation combines three dimensions:

Axis 1 — Scope (who sees it)

ScopeFileLifetimeTypical use
user~/.claude.jsonAll of the user's projectsPersonal MCPs (Context7, GitHub)
project<repo>/.mcp.jsonThe team; it goes into gitTeam MCPs (Roslyn, the project's database)
local<repo>/.claude/settings.local.jsonOnly you, gitignoredPersonal override, local secrets

Precedence: local > project > user (the most specific one wins).

Axis 2 — Installation mechanism

WayExampleWhen to use it
CLI claude mcp addclaude mcp add roslyn -s project -- dotnet run --project D:\Tools\RoslynMCPRecommended: idiomatic and validated by Claude Code
Editing the JSON by handEdit .mcp.json directlyBulk install scripts, full control over the JSON
Plugin bundleAn MCP packaged inside a marketplace pluginDistribution to teams through /plugin install
Built-in / hostedSome MCPs already integrated (filesystem, fetch)Zero configuration

Axis 3 — Transport (how it communicates)

TransportTypical syntaxWhen
stdiocommand + args (launches a local process)The default. Most of them: npx, dotnet, python, uvx
SSEurl: https://server/sseA remote MCP over Server-Sent Events
HTTP streamableurl: https://server/mcpThe newer 2026 protocol, official from Anthropic

4. Anti-patterns (FORBIDDEN)

❌ No✅ YesWhy
A literal token in a versioned .mcp.jsonThe token in an environment variable plus a ${env:VAR} placeholderIt leaks into git, and into an internal public repository
set VAR=value in CMDsetx VAR "value" (persistent)set only lasts the current session
JIRA_API_TOKEN in ~/.claude.json (user scope, plain)The same token through ${env:JIRA_API_TOKEN}~/.claude.json is not encrypted
An MCP that needs admin rights to runA user-scope MCP with no elevationOperational friction and elevation risk
Leaving a test MCP pointing at the production databaseA separate MCP per environment (dev/pre/pro)Risk of accidental writes

5. Security mitigations in place

The secret-scanner.js hook, v1.1.0+

It automatically blocks a Write/Edit on .mcp.json, ~/.claude.json or .claude/settings.json when it finds:

  • A literal GitHub PAT: ghp_... or github_pat_...
  • A literal Atlassian API token: in the keys JIRA_API_TOKEN, ATLASSIAN_API_TOKEN, CONFLUENCE_API_TOKEN
  • A literal Anthropic API key: sk-ant-...
  • A generic block inside env: any *_TOKEN, *_KEY, *_SECRET or *_PASSWORD key with a literal value (not ${env:...}, not <placeholder>, not TODO, not EXAMPLE)

These pass correctly:

  • ${env:VAR} placeholders
  • <TODO_REPLACE> placeholders
  • EXAMPLE_KEY, YOUR_TOKEN_HERE

The auth-config-guard.js hook

It finds incorrect authentication configuration in C# code (Entra ID, OAuth2). It complements the secret scanner, but it works over source code, not over .mcp.json.


6. Useful commands

# List every MCP active in the current context
claude mcp list

# Detail of one MCP
claude mcp get <name>

# Remove an MCP from a scope
claude mcp remove <name> -s <user|project|local>

# Import the configuration from Claude Desktop (a different app)
claude mcp add-from-claude-desktop

# See the logs of an MCP that is failing
claude mcp logs <name>

7. Troubleshooting

The MCP does not show up after claude mcp add

  1. Check that the command exited with 0
  2. Restart Claude Code (some MCPs only register at startup)
  3. Check claude mcp list and claude mcp get <name>

The MCP shows up but fails when using its tools

  1. claude mcp logs <name> — look at the process output
  2. Check the environment variables with Get-ChildItem Env: in a fresh terminal
  3. If it is claude mcp add --transport http, check connectivity: irm <url>/health

Expired tokens (Atlassian, GitHub)

  • Atlassian: tokens expire after 12 months if they are not rotated. Generate a new one and setx it.
  • Classic GitHub PATs: configurable. Fine-grained: one year maximum.
  • Anthropic OAuth (Claude Code): renews itself with the refresh token.

The secret scanner blocks a value that is not a secret

  • If it genuinely is a placeholder, make sure it matches one of the recognized shapes: ${env:...}, <TODO_...>, YOUR_..., PLACEHOLDER_..., EXAMPLE_...
  • If you really need to commit a real value (rare), add a // PUBLIC: ... comment, or move it to an environment variable and rewrite it as a placeholder

8. The organization's MCP roadmap

MCPPlanned scopeStatusNotes
Context7user✅ ProductionPre-installed by install.ps1
CWM.RoslynNavigatoruser (optional)✅ ProductionAdd-on selector in install.ps1
GitHubuser🟡 EvaluatingNeeds a personal PAT
Jira/Atlassianlocal🟡 EvaluatingNeeds an API token + email
MS SQL Serverproject (non-production environments)🔴 RiskRead-only, with PII masking
The organization's ownuser (corporate)🟡 To be designedEntra ID auth

9. References

  • Official MCP documentation
  • Claude Code MCP docs
  • _hilo/DECISIONES.md — the ADR about which MCPs Ovillo selects
  • .claude/CLAUDE_BASE.md §7 — Security (secret management)
  • .claude/hooks/secret-scanner.js — the implementation of the automatic block

Guide v1.0 — the organization Last updated: 2026-05-08

Fuente: ovillo/_patron/01_Estructura_Tecnica/GUIA_MCP_INSTALACION_EN.md

Ovillo v1.31.0tag v1.31.0 (2026-10-06) · sin decisiones posteriores69 skills · 19 agents · 22 hooks · 3 reglas · 15 tools · 103 decisionesfuente: ovillo/_patron/01_Estructura_Tecnica/GUIA_MCP_INSTALACION_EN.mdCopyright 2026 Hugo Valer Rojas · Apache-2.0