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."

How fenbs helps

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 account

Free 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.

  1. Create a free account and add a project for the development environment or codebase.
  2. Connect Claude Code from Integrations and follow the MCP setup guide.
  3. Record each approved network boundary as a Decision: host allowed, purpose, who approved it, and any time or task scope.
  4. 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.
  5. 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.

Questions people ask.

Can Claude Code make HTTP requests on its own?

Claude Code runs commands in your shell and can use tools like curl or fetch if you ask it to. It cannot make network requests independently of the commands you let it run. The network access it has comes from your environment, not from Claude Code itself.

How do I stop Claude from making unexpected network calls?

Add a rule in CLAUDE.md: "Do not make external network calls without asking first." For stronger enforcement, restrict the shell or container's outbound access so that calls to unapproved hosts fail at the infrastructure level.

Does enabling web search in Claude give it access to my network?

No. Web search is a separate capability that lets Claude search the public internet for documentation or information. It does not give Claude access to your internal network, local services, or development environment.

Can I restrict Claude Code to only certain npm or pip registries?

Yes, through your environment configuration. Set the registry URL in your npm or pip config to point to a private registry or a proxy, and block direct access to the public registry at the network level. Claude Code will use whatever registry is configured in the environment.

What is the safest default for Claude network access?

Start with no outbound access and add only what each task needs. Allow package registries for dependency work, allow specific API endpoints per task, and require approval before any new host is added to the allowlist. Record each allowance as a decision so it is visible and revocable.

More in Agent harness (for developers)

All Agent harness (for developers) articles

Start with one thing.

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

There is nothing to set up first. Write one line and you’ve started.