Skip to main content
Glama
StrawHatAI

Claude Desktop Commander MCP

by StrawHatAI

list_allowed_directories

Check which directories the Claude Desktop Commander MCP server can access on your computer to understand its file system permissions.

Instructions

Returns the list of directories that this server is allowed to access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'list_allowed_directories' tool. It calls listAllowedDirectories() and returns the formatted list of allowed directories.
    case "list_allowed_directories": { const directories = listAllowedDirectories(); return { content: [{ type: "text", text: `Allowed directories:\n${directories.join('\n')}` }], }; }
  • src/server.ts:188-197 (registration)
    Registration of the 'list_allowed_directories' tool in the listTools handler, including name, description, and input schema.
    { name: "list_allowed_directories", description: "Returns the list of directories that this server is allowed to access.", inputSchema: { type: "object", properties: {}, required: [], }, },
  • Input schema for the tool (empty object as it takes no parameters).
    inputSchema: { type: "object", properties: {}, required: [], },
  • Core helper function that returns the predefined list of allowed directories.
    export function listAllowedDirectories(): string[] { return allowedDirectories; }
  • Constant defining the allowed directories used by the tool.
    const allowedDirectories: string[] = [ process.cwd(), // Current working directory os.homedir() // User's home directory ];

Latest Blog Posts

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/StrawHatAI/claude-dev-tools'

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