Claude Code: What It Does and How to Give It Production Context
Claude Code: What It Does and How to Give It Production Context

Claude Code is Anthropic’s agentic coding tool. It reads your codebase, edits files, runs commands and connects to your engineering tools. On its own it knows your repository. It does not know what is running in production right now. This guide covers what Claude Code does, what it costs, how to govern it, and how to connect it to live operational context without letting it change infrastructure.
TL;DR
- Problem: Claude Code is strong at code, but incident work needs live context: recent deploys, Kubernetes state, cloud resources, metrics and logs. Without it, the agent guesses.
- Takeaway: Connect Claude Code to production through MCP, using a governed, read-only layer. Opsphere is that layer. It complements Claude and does not replace it.
- Guardrails: Use explicit permission modes, shared settings in the repository and remote-hosted MCP servers, so credentials stay out of individual sessions.
- Next step: Start with one real workflow, such as “what changed before this alert fired?”, and follow the Claude Code MCP integration setup.
Table of Contents
- What Claude Code is
- Where Claude Code fits in an SRE or platform workflow
- Why production context is the hard part
- How Opsphere and Claude Code work together
- Practical workflows
- Governing Claude Code in a team
- Setting it up: a rollout checklist
- What Opsphere offers
- FAQ
- Sources
What Claude Code is
According to the official overview, Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands and integrates with your development tools. It is available in the terminal, in IDEs, as a desktop app and in the browser.
Three things separate it from autocomplete-style assistants:
- It acts, not just suggests. It can run tests, inspect output and iterate on a fix.
- It works across the whole repository. It reads files on its own instead of waiting for you to paste snippets.
- It extends through MCP. The Model Context Protocol is an open standard for connecting AI tools to external systems. Per the MCP documentation, Claude Code can connect to hundreds of external tools and data sources this way.
That last point matters most for operations teams. The code is only half of any production problem. The other half lives in AWS, Kubernetes, your observability stack and your CI/CD system.
The same documentation says Claude Code’s access to external tools is what lets it reach infrastructure, observability dashboards and issue trackers. The quality of its answers then depends on which systems you connect and how you control them.
Where Claude Code fits in an SRE or platform workflow
Most teams first use Claude Code for development: refactors, tests, code review and debugging. The review side is now productized. Anthropic’s Code Review feature dispatches a team of agents on pull requests. Teams also run it in CI, for example in a GitHub Action for autonomous PR review with a tight list of allowed tools.
There is also a mobile angle. Remote Control, reported in February 2026, lets you start a task in your terminal and keep control of it from a phone or tablet. Your file system, MCP servers and secrets stay on your own machine. That is useful for an on-call engineer who needs to nudge a session without opening a laptop.
For developers who want to tune their local setup, there are community guides such as this session hooks and persistent memory system for Claude Code. It covers the personal side of the workflow: hooks, rules and memory.
The operational gap is different. During an incident, the questions are:
- What changed in the last hour, and in which service?
- Which pods are restarting, and what do their events say?
- Do the application errors line up with a node, a database or a deploy?
- Which dependency is upstream of the failing service?
A coding agent can only answer these if it can read live systems. Pasting kubectl output and dashboard screenshots into a chat does not scale, and it loses context between sessions.
Why production context is the hard part
Teams that connect many tools to an agent tend to hit the same failure: configuration sprawl. Each developer wires up their own servers, tokens and scopes. Updates drift, and credentials end up in places they should not.
Anthropic’s guidance on remote MCP servers points the other way. Prefer remote-hosted servers over local ones where possible. They cut the maintenance burden and support native OAuth, so sensitive infrastructure credentials are not exposed in each session’s configuration.
This is the design problem Opsphere addresses. Instead of ten MCP servers, each with its own credentials, Claude Code connects to one governed operational layer. Opsphere unifies context across AWS, Kubernetes, observability, CI/CD, security and engineering tools, and exposes more than 300 read-only operational tools through MCP. The MCP Operational Gateway page describes how that works.

How Opsphere and Claude Code work together
Opsphere does not replace Claude. Claude does the reasoning and the code work. Opsphere supplies the evidence it reasons over, from systems you already run.
| Layer | Role | Examples |
|---|---|---|
| Claude Code | Reasoning, code reading, patch proposals, conversation | Explain a stack trace, draft a fix, summarize findings |
| MCP | Standard protocol between the agent and tools | Tool discovery, structured calls |
| Opsphere | Governed operational context, read-only | AWS state, Kubernetes resources, observability signals, deployment history |
| Your existing tools | Source of truth | Your cloud accounts, clusters, monitoring and CI/CD |
Opsphere connects to your existing tools without requiring you to replace them. It does not duplicate your telemetry. Each tool stays the source of truth, and Opsphere gives the agent a consistent way to query them.
Read-only by default
Opsphere is read-only by default. It provides controlled, governed access to production context and does not allow direct infrastructure changes. Claude can look at the cluster. It cannot scale a deployment, edit a security group or delete a resource through Opsphere.
That split is deliberate. Investigation is safe to accelerate. Changes should still go through your normal path: a pull request, review, and your deploy pipeline. For the security model, see the Opsphere security page.
Practical workflows
These are the workflows worth setting up first. Each one is an investigation, with no write access needed.
1. Investigate a production incident
An alert fires on elevated 5xx errors from a checkout service. In one Claude Code conversation, you can ask for:
- the service’s current pod status and recent restarts,
- the related alerts from your observability stack, grouped by likely cause,
- the services the checkout service depends on,
- the open pull request or recent commit that touches the failing code path.
Claude combines those answers with the code in your repository. The output you want is a ranked list of hypotheses, each tied to evidence, not a single confident guess. Opsphere’s evidence-backed investigations are built around that structure, including testing several hypotheses in parallel.
2. Check recent changes
Most incidents follow a change. Ask: “What was deployed or modified in this environment in the two hours before the first error?” The agent can pull deployment history, infrastructure changes and configuration events, then point to the closest match in time.
Correlation in time is a lead, not a verdict. A good prompt asks Claude to name what evidence would confirm or rule out each candidate change.
3. Correlate application errors with infrastructure signals
A spike in latency can come from the application, the node, the network or a downstream service. Asking Claude to compare error logs with node pressure, pod scheduling events and cloud-provider health in one thread removes the tab-switching that slows most investigations.
4. Reason across systems from one conversation
The value of MCP is that the conversation does not change as the system changes. You can move from a Kubernetes question to a CI/CD question to a cloud-resource question without reopening another console. The Claude Code MCP integration page shows the connection steps.
Governing Claude Code in a team
Read-only tools on the Opsphere side are one control. You need controls on the Claude Code side as well.
Permissions
Claude Code supports fine-grained permission rules, modes and managed policies, so you can specify what the agent may access and do. Read-only is not the whole story. Choose explicit permission modes and commit shared settings to the repository, so every team member gets the same guardrails. The common failure is a developer who accidentally gives an agent broad write or shell privileges in an environment close to production.
A sensible baseline:
- Allow read-oriented tools by name. Do not allow broad shell patterns.
- Require approval for anything that writes, deploys or touches credentials.
- Keep production credentials out of the session. Use OAuth with remote MCP servers.
- Review the settings file in pull requests like any other code.
Business controls and auditability
Anthropic’s announcement for Team and Enterprise plans describes premium seats that bundle Claude Code with the Claude app and admin controls. For regulated environments, auditability matters as much as speed. Check what your organization requires for logging and review before rolling out broadly.
Cost control
According to Anthropic’s cost documentation, Claude Code charges by API token consumption. For Enterprise, it reports usage averaging $13 per developer per active day and $150 to $250 per developer per month. Admins can set spend limits. Individual costs vary significantly with model choice and usage patterns, so run a pilot before budgeting a team-wide number.
Operational queries add tokens. Narrow, specific questions with scoped tool calls cost less than open-ended requests to “look at everything.”
Setting it up: a rollout checklist
- Pick one workflow. Incident triage is a good first choice because it needs read access only.
- Connect through one remote MCP endpoint. This keeps configuration in one place and credentials out of laptops.
- Set permission modes and commit them. Agree on what is auto-allowed and what needs a human.
- Run it on past incidents. Replay two or three resolved incidents and compare the agent’s findings with your postmortems.
- Measure. Track time to first useful hypothesis and time to resolution against your own baseline. Do not rely on vendor averages.
- Expand deliberately. Add services and environments once the first workflow is trusted.
If your team uses other agents, the same operational layer can serve them. Opsphere also has integrations for GitHub Copilot CLI and OpenCode, so context does not fragment across tools. For teams building around agents more broadly, the AI-native engineering teams use case covers the operating model.
What Opsphere offers
Opsphere is an AI-powered operational intelligence platform for DevOps, SRE, platform engineering and cloud teams. Plans published on the pricing page:
| Plan | Price |
|---|---|
| Community | 0 € per month |
| Developer | 19 € per month |
| Team | 500 € per month |
| Enterprise | 450 € per month |
| Custom Solutions | No published price |
Small SRE teams and startups can begin with Community or Developer and connect Claude Code through the integration guide. If you want to see the investigation workflow on your own stack, BOOK A 20-MIN DEMO or START FREE TRIAL from opsphere.io.
FAQ
Is Claude Code free?
Claude Code requires an Anthropic subscription or API access. Anthropic states that it charges by API token consumption, and team costs depend on model choice and usage. Set spend limits through admin controls and pilot with a small group first.
Can Claude Code access production infrastructure?
Only what you connect and permit. Through MCP, it can reach tools such as infrastructure and observability systems. For production, use a read-only, governed layer like Opsphere and keep write actions behind your normal pull request and deploy process.
Does Opsphere replace Claude Code?
No. Claude Code remains the agent you talk to and the tool that works on your code. Opsphere supplies live production context through MCP, so Claude can reason about incidents, recent changes and infrastructure state with evidence.
Should MCP servers be local or remote?
Where possible, choose remote-hosted servers. Anthropic’s guidance notes lower maintenance and native OAuth support, which keeps infrastructure credentials out of individual session configurations. Local servers still make sense for tools that only exist on a developer’s machine.
Sources
- Claude Code overview, Anthropic docs
- Connect Claude Code to tools via MCP
- Configure permissions
- Manage costs effectively
- Claude Code and admin controls for business plans
- Claude Code remote MCP, Anthropic
- Code Review for Claude Code
- Remote Control, VentureBeat
- Claude Code in a GitHub Action for PR review
Recommended
This article is provided for general informational purposes only and does not constitute professional, legal, security, or compliance advice. Please evaluate recommendations against your organization’s specific environment and requirements.
