Skip to main content
Glama

Filesystem MCP Server

by mark3labs
package handler import ( "path/filepath" "testing" "github.com/stretchr/testify/require" ) // resolveAllowedDirs generates a list of allowed paths, including their resolved symlinks. // This ensures both the original paths and their symlink-resolved counterparts are included, // which is useful when paths may be symlinks (e.g., t.TempDir() on some Unix systems). func resolveAllowedDirs(t *testing.T, dirs ...string) []string { t.Helper() allowedDirs := make([]string, 0) for _, dir := range dirs { allowedDirs = append(allowedDirs, dir) resolvedPath, err := filepath.EvalSymlinks(dir) require.NoError(t, err, "Failed to resolve symlinks for directory: %s", dir) if resolvedPath != dir { allowedDirs = append(allowedDirs, resolvedPath) } } return allowedDirs }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mark3labs/mcp-filesystem-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server