🚀 Introducing Deepgram Saga: The Voice OS for Developers 🚀

Find and read file

Pre-requisites

You must have NPX installed on your computer. If you already have it installed, skip the below section and go to MCP Setup.

NPX installation instructions

  1. Install Node.js (which includes npm and npx): Go to the Node.js download page: https://nodejs.org/

  2. Verify that Node.js, npm, and npx are installed. Open your terminal and run: 

    node -v
    npm -v
    npx -v

  3. If they’re installed, you should see version numbers appear. 

MCP Setup

You’ll be using the filecontext MCP server for this action.

  1. Open Saga and navigate to Settings. If you can’t find Settings, click on the Saga icon in your dock first.

  2. Scroll to MCP Setup. Click Set up MCPs.

  3. Copy the following configuration into the MCP Configuration textbox. 

    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "/Users/username/Desktop",
            "/path/to/other/allowed/dir"
          ]
        }
      }
    }

  4. Replace the placeholder text with the filepaths that you’re permitting Saga to access. See below for an example filled out configuration

    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "/Users/sharonyeh/Downloads",
      "/Users/sharonyeh/Desktop",
    "/Users/sharonyeh/Documents/Saga"
          ]
        }
      }
    }

  5. Click Save

  6. Make sure the filesystem server says Loaded under MCP Servers Status.

  7. Now you’re ready to execute MCP actions! Click Let’s go! and check the directories the Assistant has access to.

    1. Example: “What directories do you have access to?” 

      1. The Assistant should then tell you the folders it has access to which should correspond to the filepaths you had added in your configuration.

  8. You can then have the Assistant find a file.

    1. Example: “Find all the files in my Downloads folder with ‘Recipe’ in the name.”

  9. After the Assistant finds the file(s), you can ask it to read the file. Note: read_file works best with plain text documents (e.g., .txt) rather than other types of files.

    1. Example: “Read the recipe.txt file and provide a summary.”

  10. There are more actions you can execute with this MCP server listed here! Try them out and share your favorites in our Discord. 

Troubleshooting Common Issues

  1. Note that MCP is a relatively new concept and the quality of response largely depends on the quality of the MCP servers themselves.

    1. Says it’s unable to perform the action

      1. Check that the MCP server is marked as “Loaded” under MCP Tools Loaded in MCP Settings. 

      2. Try clicking “Save” again. 

    2. Says it doesn’t have access to your folder / filepath even though it does.

      1. Ask the Assistant “What directories do you have access to?” first. Then, ask it to find a file within that directory. 

    3. Can’t find the file I’m looking for.

      1. It will look for the exact filename you say unless you say something like “Find the file with ‘pasta’ in the name” or “Find the file that starts with ‘onboarding’”. 

    4. Can’t read the file. 

      1. It works best with editable text documents (e.g., docx, txt files) rather than PDFs or images.

Back to Quickstart Home
Categories
Tutorials
home