Skip to main content
Glama

config

View npm configuration settings to check current package management setup. Use list to see all configs or get to retrieve specific key values.

Instructions

View npm configuration (read-only for safety)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction: list (show all config), get (get specific key)
keyNoConfig key to get (required for get action)

Implementation Reference

  • Implementation of the "config" tool handler.
    // ── npm config ──
    server.tool(
      "config",
      "View npm configuration (read-only for safety)",
      {
        action: z.enum(["list", "get"]).describe("Action: list (show all config), get (get specific key)"),
        key: z.string().optional().describe("Config key to get (required for get action)"),
      },
      async ({ action, key }) => {
        const args = ["config", action];
        if (action === "get" && key) args.push(key);
        if (action === "list") args.push("--json");
        try {
          const { stdout } = await run(args);
          return { content: [{ type: "text", text: stdout }] };
        } catch (e: any) {
          return {
            content: [{ type: "text", text: `Error: ${e.stderr || e.message}` }],
            isError: true,
          };
        }
      },
    );

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/mikusnuz/npm-mcp'

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