<?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>Forem: jhosep98</title>
    <description>The latest articles on Forem by jhosep98 (@jhosep98).</description>
    <link>https://forem.com/jhosep98</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F563878%2F7fa179b2-d2cc-4d44-85d3-36bb6c9962e4.jpeg</url>
      <title>Forem: jhosep98</title>
      <link>https://forem.com/jhosep98</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jhosep98"/>
    <language>en</language>
    <item>
      <title>Getting Started with MCP: Your Local AI Context Server</title>
      <dc:creator>jhosep98</dc:creator>
      <pubDate>Wed, 25 Jun 2025 22:40:43 +0000</pubDate>
      <link>https://forem.com/jhosep98/getting-started-with-mcp-your-local-ai-context-server-1cbg</link>
      <guid>https://forem.com/jhosep98/getting-started-with-mcp-your-local-ai-context-server-1cbg</guid>
      <description>&lt;p&gt;Hey dev.to community! 👋 Today, I want to introduce you to the &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; and show you how to set up your very own local &lt;strong&gt;MCP&lt;/strong&gt; server to enhance your development workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is MCP?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At its core, &lt;strong&gt;MCP&lt;/strong&gt; is an open protocol that enables AI models to interact with various data sources and tools, providing them with richer, more relevant context. Think of it as a bridge that allows your AI to "see" and "understand" your local environment, making its suggestions and assistance much more powerful and tailored to your needs.&lt;/p&gt;

&lt;p&gt;In this quick guide, we'll connect a filesystem &lt;strong&gt;MCP&lt;/strong&gt; server to Copilot within VS Code, allowing it to understand the files on your desktop.&lt;/p&gt;

&lt;p&gt;Let's get your local &lt;strong&gt;MCP server&lt;/strong&gt; up and running!&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Verify Node.js and NPX Installation
&lt;/h2&gt;

&lt;p&gt;First, ensure you have &lt;strong&gt;Node.js&lt;/strong&gt; and &lt;strong&gt;NPX&lt;/strong&gt; installed globally. Open your terminal and run:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Bash&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;node --version&lt;/code&gt;&lt;br&gt;
&lt;code&gt;npx --version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you don't have them, you can download &lt;strong&gt;Node.js&lt;/strong&gt; from &lt;a href="https://nodejs.org" rel="noopener noreferrer"&gt;nodejs.org&lt;/a&gt;. &lt;strong&gt;NPX&lt;/strong&gt; comes bundled with npm (Node Package Manager).&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Get the Filesystem MCP Server
&lt;/h2&gt;

&lt;p&gt;We'll use npx to fetch and run the filesystem &lt;strong&gt;MCP server&lt;/strong&gt; directly from GitHub. This is a convenient way to get started without a full installation.&lt;/p&gt;

&lt;p&gt;The server's repository is located &lt;a href="https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Enable Copilot Agent Mode in VS Code
&lt;/h2&gt;

&lt;p&gt;Open VS Code. Go to Settings (File &amp;gt; Preferences &amp;gt; Settings on Windows/Linux, Code &amp;gt; Settings &amp;gt; Settings on macOS) and search for "Copilot agent mode." Make sure it's enabled.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftgg0xwcvnq3gbzontfqk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftgg0xwcvnq3gbzontfqk.png" alt="Enable Copilot Agent Mode in VS Code" width="800" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Open User Settings (JSON)
&lt;/h2&gt;

&lt;p&gt;Now, open your VS Code settings in JSON format. Use the Command Palette &lt;strong&gt;(Ctrl+Shift+P or Cmd+Shift+P)&lt;/strong&gt; and search for "Open User Settings (JSON)".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm4l64yv1xp22e0nsobfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm4l64yv1xp22e0nsobfc.png" alt="Open User Settings" width="800" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Paste the MCP Server Configuration
&lt;/h2&gt;

&lt;p&gt;Inside your settings.json file, paste the following configuration. Remember to replace &lt;strong&gt;/home/my-user/Desktop&lt;/strong&gt; with the actual path to the directory you want to grant Copilot access to (e.g., your project folder, or your Desktop for this example).&lt;br&gt;
JSON&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgl7ggtt5oyuibtj0c31s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgl7ggtt5oyuibtj0c31s.png" alt="Paste the MCP Server Configuration" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Save the &lt;strong&gt;settings.json&lt;/strong&gt; file.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Select the MCP Server in Copilot Chat
&lt;/h2&gt;

&lt;p&gt;Open the Copilot Chat panel in VS Code. In the bottom right corner of the chat window, you'll see a small tools icon. Click it, and you should see "MCP server: filesystem" listed. Ensure it is selected. If not, click on it to enable it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foalyvdu0by3ewdwbc6c4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foalyvdu0by3ewdwbc6c4.png" alt="Select the MCP Server in Copilot Chat" width="800" height="683"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo6f33f9h6fh11b8ml104.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo6f33f9h6fh11b8ml104.png" alt="Verify filesystem MCP" width="800" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Start the Conversation!
&lt;/h2&gt;

&lt;p&gt;You're all set! Now you can start asking Copilot questions about the files in the directory you specified. For example, try asking:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"What files do I have on my desktop?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5afog17xzcthku5i7wfk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5afog17xzcthku5i7wfk.png" alt="Start the Conversation" width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copilot, powered by the &lt;strong&gt;MCP filesystem server&lt;/strong&gt;, should now be able to list the files in that directory!&lt;/p&gt;

&lt;p&gt;I hope this brief introduction helps you understand the power of &lt;strong&gt;MCP&lt;/strong&gt; and how easily you can integrate it into your development environment. This is just the beginning of how AI can become even more context-aware and helpful.&lt;/p&gt;

&lt;p&gt;Useful Resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;MCP Introduction: &lt;a href="https://modelcontextprotocol.io/introduction" rel="noopener noreferrer"&gt;https://modelcontextprotocol.io/introduction&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MCP Servers GitHub: &lt;a href="https://github.com/modelcontextprotocol/servers" rel="noopener noreferrer"&gt;https://github.com/modelcontextprotocol/servers&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Let me know in the comments if you try it out and what you think! Happy coding!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>mcp</category>
      <category>node</category>
    </item>
  </channel>
</rss>
