Guide: Installing and using MCPs in Ovillo
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)
| Scope | File | Lifetime | Typical use |
|---|---|---|---|
| user | ~/.claude.json | All of the user's projects | Personal MCPs (Context7, GitHub) |
| project | <repo>/.mcp.json | The team; it goes into git | Team MCPs (Roslyn, the project's database) |
| local | <repo>/.claude/settings.local.json | Only you, gitignored | Personal override, local secrets |
Precedence: local > project > user (the most specific one wins).
Axis 2 — Installation mechanism
| Way | Example | When to use it |
|---|---|---|
CLI claude mcp add | claude mcp add roslyn -s project -- dotnet run --project D:\Tools\RoslynMCP | Recommended: idiomatic and validated by Claude Code |
| Editing the JSON by hand | Edit .mcp.json directly | Bulk install scripts, full control over the JSON |
| Plugin bundle | An MCP packaged inside a marketplace plugin | Distribution to teams through /plugin install |
| Built-in / hosted | Some MCPs already integrated (filesystem, fetch) | Zero configuration |
Axis 3 — Transport (how it communicates)
| Transport | Typical syntax | When |
|---|---|---|
| stdio | command + args (launches a local process) | The default. Most of them: npx, dotnet, python, uvx |
| SSE | url: https://server/sse | A remote MCP over Server-Sent Events |
| HTTP streamable | url: https://server/mcp | The newer 2026 protocol, official from Anthropic |
3. Recommended patterns
Pattern A — A team MCP that everybody needs
Scope: project · Mechanism: claude mcp add or a versioned .mcp.json · Transport: stdio
// .mcp.json (at the repository root; it goes into git)
{
"mcpServers": {
"roslyn": {
"command": "dotnet",
"args": ["run", "--project", "D:/Tools/RoslynMCP"],
"env": {}
}
}
}
It is installed by irm | iex or by install.ps1 during onboarding.
Pattern B — A personal MCP with no secrets
Scope: user · Mechanism: CLI · Transport: stdio or HTTP
claude mcp add github -s user -- npx -y @modelcontextprotocol/server-github
claude mcp add context7 -s user --transport http https://mcp.context7.com/mcp
Pattern C — An MCP with secrets (Jira, a GitHub PAT, Atlassian)
Scope: local (gitignored) · Mechanism: edit by hand · Transport: stdio · Credentials: environment variables
Step 1 — generate the token at the provider (e.g. https://id.atlassian.com/manage/api-tokens).
Step 2 — persist it in the Windows session:
# Persistent across restarts (do NOT use `set`, which only lasts the current session)
setx JIRA_API_TOKEN "ATATT3xxxxxxxxxxxxxxxxxx"
setx JIRA_EMAIL "your_email@example.com"
# Reopen the terminal so the environment variable is available
Step 3 — .claude/settings.local.json with a ${env:VAR} placeholder:
{
"mcpServers": {
"jira": {
"command": "npx",
"args": ["-y", "@atlassian/mcp-server-jira"],
"env": {
"JIRA_URL": "https://myorg.atlassian.net",
"JIRA_EMAIL": "${env:JIRA_EMAIL}",
"JIRA_API_TOKEN": "${env:JIRA_API_TOKEN}"
}
}
}
}
Step 4 — add .claude/settings.local.json to .gitignore (Ovillo already does this by default).
Pattern D — A shared remote MCP (the organization's on-premise server)
Scope: user · Mechanism: CLI with --transport http · Transport: HTTP/SSE · Auth: Windows integrated or a corporate token
claude mcp add myorg-system -s user --transport http https://www.example.org/mcp/system
No local process, no credentials on disk. The server handles authentication (NTLM, Entra ID, ...).
Pattern E — An organization-wide MCP through a plugin
Scope: user (installed from a marketplace) · Mechanism: plugin · Transport: stdio + HTTP
Ovillo is already distributed this way (claude plugin marketplace add hvaler/ovillo + claude plugin install hv@ovillo). An organization can publish, in its own marketplace, a plugin carrying its MCPs (Context7, Roslyn, Jira and whatever comes next) with the configuration pre-packaged.
4. Anti-patterns (FORBIDDEN)
| ❌ No | ✅ Yes | Why |
|---|---|---|
A literal token in a versioned .mcp.json | The token in an environment variable plus a ${env:VAR} placeholder | It leaks into git, and into an internal public repository |
set VAR=value in CMD | setx 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 run | A user-scope MCP with no elevation | Operational friction and elevation risk |
| Leaving a test MCP pointing at the production database | A 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_...orgithub_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,*_SECRETor*_PASSWORDkey with a literal value (not${env:...}, not<placeholder>, notTODO, notEXAMPLE)
These pass correctly:
${env:VAR}placeholders<TODO_REPLACE>placeholdersEXAMPLE_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
- Check that the command exited with 0
- Restart Claude Code (some MCPs only register at startup)
- Check
claude mcp listandclaude mcp get <name>
The MCP shows up but fails when using its tools
claude mcp logs <name>— look at the process output- Check the environment variables with
Get-ChildItem Env:in a fresh terminal - 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
setxit. - 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
| MCP | Planned scope | Status | Notes |
|---|---|---|---|
| Context7 | user | ✅ Production | Pre-installed by install.ps1 |
| CWM.RoslynNavigator | user (optional) | ✅ Production | Add-on selector in install.ps1 |
| GitHub | user | 🟡 Evaluating | Needs a personal PAT |
| Jira/Atlassian | local | 🟡 Evaluating | Needs an API token + email |
| MS SQL Server | project (non-production environments) | 🔴 Risk | Read-only, with PII masking |
| The organization's own | user (corporate) | 🟡 To be designed | Entra 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