<?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: AI Craft Pad</title>
    <description>The latest articles on DEV Community by AI Craft Pad (@aicraftpad).</description>
    <link>https://dev.to/aicraftpad</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%2F4178368%2F4c76b7f5-f718-4628-ac8f-903a7ba9072a.png</url>
      <title>DEV Community: AI Craft Pad</title>
      <link>https://dev.to/aicraftpad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aicraftpad"/>
    <language>en</language>
    <item>
      <title>Build and Validate Your First MCP Server Configuration</title>
      <dc:creator>AI Craft Pad</dc:creator>
      <pubDate>Mon, 12 Oct 2026 05:27:13 +0000</pubDate>
      <link>https://dev.to/aicraftpad/build-and-validate-your-first-mcp-server-configuration-3dch</link>
      <guid>https://dev.to/aicraftpad/build-and-validate-your-first-mcp-server-configuration-3dch</guid>
      <description>&lt;p&gt;An MCP client needs a configuration that tells it which local server to start and which arguments to pass. The JSON itself is simple. Most setup failures come from mixing shell syntax with JSON, putting several arguments into one string, or copying credentials into a file that later gets shared.&lt;/p&gt;

&lt;p&gt;This guide builds one small local &lt;code&gt;stdio&lt;/code&gt; configuration and checks it before you give an AI client access to anything important.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with one narrow task
&lt;/h2&gt;

&lt;p&gt;Do not begin by connecting every available server. Write down one task first:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Let the client read files from one disposable test folder.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That sentence gives you three useful boundaries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one server;&lt;/li&gt;
&lt;li&gt;one approved directory;&lt;/li&gt;
&lt;li&gt;no need for account credentials.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can expand the configuration after the first connection works and you understand the tools the server exposes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understand the common configuration shape
&lt;/h2&gt;

&lt;p&gt;Many MCP clients accept a top-level &lt;code&gt;mcpServers&lt;/code&gt; object. Each property is a name you choose for one connection.&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;"filesystem"&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="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"@modelcontextprotocol/server-filesystem"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"C:/MCP-Test"&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;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;The parts have different jobs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;filesystem&lt;/code&gt; is the local name shown to the client.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;command&lt;/code&gt; is the executable the client starts.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;args&lt;/code&gt; is an array. Each command-line argument is a separate JSON string.&lt;/li&gt;
&lt;li&gt;The final path limits this example to one test directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Always compare the final configuration with the current documentation for your MCP client and server. Clients can use different file locations or support additional fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid the most common argument mistake
&lt;/h2&gt;

&lt;p&gt;This is usually wrong:&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="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;"-y @modelcontextprotocol/server-filesystem C:/MCP-Test"&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;It looks like a shell command, but it is one array item. A process launcher normally needs three separate arguments:&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="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="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"@modelcontextprotocol/server-filesystem"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"C:/MCP-Test"&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;Keeping one argument per line also makes the configuration easier to review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add environment variables carefully
&lt;/h2&gt;

&lt;p&gt;Some servers require environment variables. They normally belong in an &lt;code&gt;env&lt;/code&gt; object:&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;"example"&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;"example-server"&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;"--read-only"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&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;"EXAMPLE_MODE"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"local"&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;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;Do not paste real API keys into screenshots, tutorials, shared chats, or public validation tools. If a server needs a secret, use the storage method recommended by the client and keep the configuration out of version control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validate before connecting the client
&lt;/h2&gt;

&lt;p&gt;Check these items before the first run:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The document parses as JSON.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mcpServers&lt;/code&gt; is an object, not an array.&lt;/li&gt;
&lt;li&gt;Every server has a clear local name.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;command&lt;/code&gt; contains only the executable.&lt;/li&gt;
&lt;li&gt;Every argument is a separate string in &lt;code&gt;args&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Paths point only to approved test data.&lt;/li&gt;
&lt;li&gt;No secret appears in the file or a screenshot.&lt;/li&gt;
&lt;li&gt;The server name, package and setup steps match official documentation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AI Craft Pad has a free &lt;a href="https://aicraftpad.com/tools/mcp-config-builder/?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=mcp_config_guide" rel="noopener noreferrer"&gt;MCP Config Builder&lt;/a&gt; that generates this common JSON shape in the browser. Enter the server name, command, one argument per line and optional &lt;code&gt;KEY=value&lt;/code&gt; variables, then inspect the result before copying it.&lt;/p&gt;

&lt;p&gt;The builder does not install packages, start a server, test connectivity or decide whether a third-party server is safe. Those checks still belong to you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test with the smallest possible scope
&lt;/h2&gt;

&lt;p&gt;Create a disposable folder with two or three harmless text files. Connect only that folder and ask a read-only question, such as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;List the filenames and summarize each file in one sentence.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Compare the response with the original files. If the client exposes write tools, leave them unused until the read-only test behaves as expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose a server for a real task
&lt;/h2&gt;

&lt;p&gt;Filesystem is a clear first example, but it is not the right server for every job. Fetch is useful for approved public pages, GitHub can expose repository workflows, and Playwright can support authorized browser testing. Each connection has a different permission boundary.&lt;/p&gt;

&lt;p&gt;The practical comparison in &lt;a href="https://aicraftpad.com/best-mcp-servers-for-beginners/?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=mcp_config_guide" rel="noopener noreferrer"&gt;Best MCP Servers for Beginners&lt;/a&gt; explains four starting points and the access to review for each one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final rule
&lt;/h2&gt;

&lt;p&gt;A valid JSON file is only the first check. A useful MCP setup also needs a narrow task, an understood server, the smallest necessary permission scope and a result you can verify.&lt;/p&gt;

&lt;p&gt;Start with one connection. Make it reviewable. Expand access only after the first task works.&lt;/p&gt;

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