How to Give Claude Network Access for Development
Network access for Claude Code means two different things: development environment permissions and web search. Here is how each works, how to scope it safely, and how to keep the approved decisions recorded.
Updated 5 min read
When developers ask how to give Claude network access, they usually mean one of two things: allowing Claude Code to make outbound calls from the development environment (to an API, a package registry, or a local service), or enabling Claude to search the web for documentation. These are separate capabilities with different controls. Tools like fenbs keep the approved hosts, task limits, and troubleshooting lessons in one place so every session starts with the same boundaries.
Giving an AI assistant network access is a decision that deserves a written record. What is permitted, for which tasks, and who approved it—those facts should outlast the session where you decided them.
Two different kinds of network access
Development environment access is about what Claude Code can do when it runs commands in your terminal or container: whether it can install packages, call external APIs, access a database, or reach a local service. This is controlled by your operating system, firewall, or container network configuration—not by Claude Code itself.
Web search is a separate capability. Claude has built-in knowledge from its training, but it can also search the web when that feature is enabled in the tool you are using. In Claude Code, web search is available through specific tool calls; in Claude.ai, it is a setting in the conversation.
Keep these two distinct when you are deciding what to allow. Opening a container's outbound network is a much broader change than enabling web search. Decide each one separately and record them as separate rules.
Development environment network permissions
Claude Code runs commands in your shell. Whatever network access your shell has, Claude Code has. If your development container blocks all outbound traffic, Claude Code cannot make outbound calls either. If your shell can reach npm and PyPI, so can Claude Code when it installs a dependency.
To allow specific outbound access in a restricted environment, configure it at the infrastructure level: add egress rules to the container, configure an allowlist in the firewall, or set up a proxy that permits certain hosts. Then record which hosts are approved and why.
- Package registries (npm, PyPI, Maven Central, NuGet): usually safe to allow for dependency installation.
- Your own internal APIs: allow by hostname, record the approved endpoint.
- Third-party APIs: approve per task, document the scope.
- General internet access: treat as a broad permission that needs explicit justification.
Web search in Claude Code
Claude Code can use web search as a tool call when it needs current documentation or needs to look up an error. You control whether that tool is available by configuring which tools Claude Code may use in your settings. Check Anthropic's Claude Code documentation (opens in a new tab) for the current setting names, as they can change between versions.
Web search is useful for looking up API documentation, finding recent error messages, or checking a library's changelog. It is not a substitute for reading your project's own documentation. Set a rule in CLAUDE.md: "Search the web for external documentation; read the project's own files directly."
Record which hosts and tools are approved
fenbs Decisions and rules stores what was approved, by whom, and why. Add a decision for each network boundary you set: which hosts Claude can reach, whether web search is on, and which tasks require a person's review before an external call. Rules appear first in the AI context, so every session starts with the approved boundaries.
Create a free accountFree for one person · No credit card · Works with Claude, ChatGPT, Cursor and more
Scoped access per task
Rather than giving Claude Code blanket network access, scope it to the task at hand. A task that installs npm dependencies needs access to the registry. A task that writes tests does not need any network access. Narrower permissions mean narrower blast radius if something goes wrong.
In practice, this means adding an instruction per task: "This task may install npm packages; do not make any other network calls." Claude Code will follow that instruction. If it tries to call a host outside the approved set, you can ask it to explain why before approving.
See how to give an AI agent access to your project board for the broader question of scoping an assistant's access to a project.
Troubleshooting network access issues
The most common issue is a container or environment that blocks outbound traffic without saying so. Claude Code will see a connection timeout or a DNS failure and may try to diagnose it as a code problem. If you see network errors in a new environment, check the firewall and egress rules before asking Claude to modify the code.
Record the resolution: "The staging container requires a proxy for outbound npm requests. Set NPM_PROXY=http://proxy.internal:3128 before installing." That note saves the next session from hitting the same wall.
How to do this with fenbs
Connect Claude Code to fenbs and record the network decisions for each environment.
- Create a free account and add a project for the development environment or codebase.
- Connect Claude Code from Integrations and follow the MCP setup guide.
- Record each approved network boundary as a Decision: host allowed, purpose, who approved it, and any time or task scope.
- Add a standing rule for anything that should always apply: "All external API calls require prior approval in the task notes." Rules appear first in the AI context every session reads.
- When a network issue is resolved, add a Lesson in fenbs with the environment, the problem, and the fix. Read lessons before setting up Claude Code in a similar environment.
fenbs does not manage your network configuration or firewall rules. It keeps the human decisions behind those configurations recorded and readable by the next session.