<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Giuliano Buzetti</title>
    <description>The latest articles on DEV Community by Giuliano Buzetti (@giuliano_buzetti_e1ce3412).</description>
    <link>https://dev.to/giuliano_buzetti_e1ce3412</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4195172%2Fb2f6a8d5-514d-43c0-99a4-dc662f50f02f.png</url>
      <title>DEV Community: Giuliano Buzetti</title>
      <link>https://dev.to/giuliano_buzetti_e1ce3412</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/giuliano_buzetti_e1ce3412"/>
    <language>en</language>
    <item>
      <title>Adding MCP servers to Claude Code: remote, local and team setups that actually connect</title>
      <dc:creator>Giuliano Buzetti</dc:creator>
      <pubDate>Tue, 20 Oct 2026 14:40:44 +0000</pubDate>
      <link>https://dev.to/giuliano_buzetti_e1ce3412/adding-mcp-servers-to-claude-code-remote-local-and-team-setups-that-actually-connect-dj0</link>
      <guid>https://dev.to/giuliano_buzetti_e1ce3412/adding-mcp-servers-to-claude-code-remote-local-and-team-setups-that-actually-connect-dj0</guid>
      <description>&lt;p&gt;Most "my MCP server doesn't work in Claude Code" problems come down to three small things: the wrong transport, the wrong scope, or a &lt;code&gt;.mcp.json&lt;/code&gt; entry that Claude Code silently skips. This post walks through each one with commands you can paste, then shows how to confirm the server is really connected before you rely on it.&lt;/p&gt;

&lt;p&gt;Everything below follows the official Claude Code MCP docs (&lt;a href="https://code.claude.com/docs/en/mcp" rel="noopener noreferrer"&gt;code.claude.com/docs/en/mcp&lt;/a&gt;). Client CLIs change often, so if a flag behaves differently on your version, the docs win. The original, shorter version of this guide lives at &lt;a href="https://agenttaskatlas.com/guides/connect-mcp-claude-code" rel="noopener noreferrer"&gt;AgentTask Atlas: How to add an MCP server to Claude Code&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Know which kind of server you have
&lt;/h2&gt;

&lt;p&gt;Before typing anything, look at the server's README and find out which of these two it is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Remote (HTTP):&lt;/strong&gt; the README gives you a URL such as &lt;code&gt;https://.../mcp&lt;/code&gt;. The server runs somewhere else; Claude Code talks to it over HTTP. The docs recommend the HTTP transport for remote servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local (stdio):&lt;/strong&gt; the README gives you a command such as &lt;code&gt;npx some-package&lt;/code&gt; or &lt;code&gt;uvx some-tool&lt;/code&gt;. Claude Code starts that process on your machine and talks to it over stdin/stdout.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Picking the wrong transport is the most common reason a server shows up as failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Add a remote server
&lt;/h2&gt;

&lt;p&gt;The shape is &lt;code&gt;claude mcp add --transport http &amp;lt;name&amp;gt; &amp;lt;url&amp;gt;&lt;/code&gt;. For example, Sentry documents a remote endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; http sentry https://mcp.sentry.dev/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Servers that use OAuth (like that one) don't need a token on the command line. You sign in afterwards from inside a Claude Code session with &lt;code&gt;/mcp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If a server uses a fixed API token instead, pass it as a header:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; http secure-api https://api.example.com/mcp &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer your-token"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Add a local (stdio) server
&lt;/h2&gt;

&lt;p&gt;For stdio servers, everything after &lt;code&gt;--&lt;/code&gt; is the command that starts the server, passed through untouched. Claude Code's own flags (&lt;code&gt;--transport&lt;/code&gt;, &lt;code&gt;--env&lt;/code&gt;, &lt;code&gt;--scope&lt;/code&gt;) go &lt;strong&gt;before&lt;/strong&gt; the &lt;code&gt;--&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; stdio playwright &lt;span class="nt"&gt;--&lt;/span&gt; npx @playwright/mcp@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With an environment variable the server needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--env&lt;/span&gt; &lt;span class="nv"&gt;API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-key &lt;span class="nt"&gt;--transport&lt;/span&gt; stdio example &lt;span class="nt"&gt;--&lt;/span&gt; npx &lt;span class="nt"&gt;-y&lt;/span&gt; @example/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you put &lt;code&gt;--env&lt;/code&gt; after the &lt;code&gt;--&lt;/code&gt;, it gets passed to the server as an argument instead of being set as a variable, which is an easy mistake to miss.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Choose a scope on purpose
&lt;/h2&gt;

&lt;p&gt;Every &lt;code&gt;claude mcp add&lt;/code&gt; writes to one of three scopes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scope&lt;/th&gt;
&lt;th&gt;Who sees it&lt;/th&gt;
&lt;th&gt;Where it lives&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;local&lt;/code&gt; (default)&lt;/td&gt;
&lt;td&gt;Only you, only this project&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;~/.claude.json&lt;/code&gt;, under the project's path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;project&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Everyone who clones the repo&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.mcp.json&lt;/code&gt; at the project root&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;user&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Only you, in all your projects&lt;/td&gt;
&lt;td&gt;your user config&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A rule of thumb: servers with personal credentials go in &lt;code&gt;local&lt;/code&gt; or &lt;code&gt;user&lt;/code&gt;; servers the whole team should get go in &lt;code&gt;project&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; http sentry &lt;span class="nt"&gt;--scope&lt;/span&gt; user https://mcp.sentry.dev/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Sharing with a team: the &lt;code&gt;.mcp.json&lt;/code&gt; gotcha
&lt;/h2&gt;

&lt;p&gt;For a team setup you can commit &lt;code&gt;.mcp.json&lt;/code&gt; at the repo root. The detail that trips people up: &lt;strong&gt;a remote entry needs &lt;code&gt;"type": "http"&lt;/code&gt;&lt;/strong&gt;. An entry with a &lt;code&gt;url&lt;/code&gt; but no &lt;code&gt;type&lt;/code&gt; is read as a stdio server and skipped, with a configuration warning.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"sentry"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://mcp.sentry.dev/mcp"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"playwright"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@playwright/mcp@latest"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two more things worth knowing about project-scoped servers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude Code asks each developer for approval before using servers from a &lt;code&gt;.mcp.json&lt;/code&gt; it hasn't seen before. &lt;code&gt;claude mcp reset-project-choices&lt;/code&gt; resets those choices.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.mcp.json&lt;/code&gt; supports &lt;code&gt;${VAR}&lt;/code&gt; and &lt;code&gt;${VAR:-default}&lt;/code&gt; expansion (in &lt;code&gt;command&lt;/code&gt;, &lt;code&gt;args&lt;/code&gt;, &lt;code&gt;env&lt;/code&gt;, &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;headers&lt;/code&gt;), so you don't have to commit secrets. The docs note that some credential variables are deliberately read as empty in a remote server's &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;headers&lt;/code&gt;, so check that section if a header token doesn't arrive.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Confirm it actually connected
&lt;/h2&gt;

&lt;p&gt;Adding a config doesn't mean the server works. Check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp list          &lt;span class="c"&gt;# status per server: ✔ Connected, ! Needs authentication, ✘ Failed to connect&lt;/span&gt;
claude mcp get sentry    &lt;span class="c"&gt;# details for one server&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside a session, &lt;code&gt;/mcp&lt;/code&gt; shows the same status and is where OAuth sign-in happens. A "✘ Failed to connect" in &lt;code&gt;claude mcp list&lt;/code&gt; means Claude Code couldn't reach that server, not that the &lt;code&gt;list&lt;/code&gt; command itself failed.&lt;/p&gt;

&lt;p&gt;Then do one real test: ask Claude to use a tool from that server and check the tool call in the transcript.&lt;/p&gt;

&lt;h2&gt;
  
  
  A few practical tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Already set up servers in Claude Desktop? &lt;code&gt;claude mcp add-from-claude-desktop&lt;/code&gt; imports them (macOS and WSL).&lt;/li&gt;
&lt;li&gt;Slow-starting local servers: &lt;code&gt;MCP_TIMEOUT=10000 claude&lt;/code&gt; raises the startup timeout to 10 seconds.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;claude mcp remove &amp;lt;name&amp;gt;&lt;/code&gt; removes a server; for remote servers it also deletes the stored OAuth tokens.&lt;/li&gt;
&lt;li&gt;Only connect servers you trust. The docs warn that servers which fetch external content can expose you to prompt injection. Read the permissions and the credentials a server asks for before adding it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Finding a server for the task in front of you
&lt;/h2&gt;

&lt;p&gt;If you're not sure which server to add, I keep a small, curated catalog of MCP servers and Agent Skills organized by dev task, with the install step, credentials, permissions and documented clients taken from each project's official README. Entries summarize official sources and are not hands-on tested, so always check the source repo.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Servers whose docs include Claude Code setup: &lt;a href="https://agenttaskatlas.com/guides/connect-mcp-claude-code#servers" rel="noopener noreferrer"&gt;the Claude Code guide&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Compare by task, e.g. &lt;a href="https://agenttaskatlas.com/best-mcp-servers/database" rel="noopener noreferrer"&gt;databases&lt;/a&gt; or &lt;a href="https://agenttaskatlas.com/best-mcp-servers/observability-debug" rel="noopener noreferrer"&gt;debugging &amp;amp; observability&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Browser testing options such as &lt;a href="https://agenttaskatlas.com/entry/playwright-mcp" rel="noopener noreferrer"&gt;Playwright MCP&lt;/a&gt; and &lt;a href="https://agenttaskatlas.com/entry/chrome-devtools-mcp" rel="noopener noreferrer"&gt;Chrome DevTools MCP&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The catalog is also available as a free, read-only remote MCP server (no account or key), which doubles as a quick way to test step 2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; http agenttask-atlas https://agenttaskatlas.com/api/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setup for other clients: &lt;a href="https://agenttaskatlas.com/guides/connect-mcp-cursor" rel="noopener noreferrer"&gt;Cursor&lt;/a&gt;, &lt;a href="https://agenttaskatlas.com/guides/connect-mcp-vscode" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt;, &lt;a href="https://agenttaskatlas.com/guides/connect-mcp-claude-desktop" rel="noopener noreferrer"&gt;Claude Desktop&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I run AgentTask Atlas, the catalog linked above. This post was drafted with AI assistance and every command was checked against the official Claude Code docs before publishing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>claude</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
