Skip to main content
Glama

add_npx_mcp

Install npm-published MCP servers into obot by adding them as npx commands. Specify the package, display name, and optional environment variables.

Instructions

Install a new MCP server in obot that runs as npx <package> (stdio). Use this for npm-published MCP servers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDisplay name shown in obot UI.
packageYesnpm package name, e.g. n8n-mcp or @scope/foo.
shortDescriptionNo
envNoEnv vars passed to the MCP process. Keys go in manifest.env[]. Mark secrets via sensitiveKeys.
sensitiveKeysNoKeys in `env` that should be marked sensitive (API keys, tokens).
aliasNoOptional short alias used in URLs/logs.

Implementation Reference

  • The handler for the 'add_npx_mcp' tool. Constructs a manifest with runtime='npx' and npxConfig containing the package name, builds the env list from args and sensitiveKeys, optionally adds an alias, POSTs to /api/mcp-servers, and returns the created server's id, connectURL, configured state, missing env vars, and a hint.
    case "add_npx_mcp": {
      const body: Record<string, any> = {
        manifest: {
          name: args.name,
          shortDescription: args.shortDescription ?? "",
          runtime: "npx",
          npxConfig: { package: args.package },
          env: buildEnvList(args.env, args.sensitiveKeys),
        },
      };
      if (args.alias) body.alias = args.alias;
      const data = await obotFetch("/api/mcp-servers", {
        method: "POST",
        body: JSON.stringify(body),
      });
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                id: data.id,
                connectURL: data.connectURL,
                configured: data.configured,
                missingRequiredEnvVars: data.missingRequiredEnvVars ?? [],
                hint:
                  "Add the connectURL to claude.ai as a custom connector. If missingRequiredEnvVars is non-empty, set them via the obot UI or another tool call.",
              },
              null,
              2,
            ),
          },
        ],
      };
    }
  • The tool definition / input schema for 'add_npx_mcp'. Declares the tool name, description, and JSON Schema with properties: name (required, string), package (required, string), shortDescription, env (object), sensitiveKeys (array of strings), and alias (string).
    {
      name: "add_npx_mcp",
      description:
        "Install a new MCP server in obot that runs as `npx <package>` (stdio). Use this for npm-published MCP servers.",
      inputSchema: {
        type: "object",
        properties: {
          name: { type: "string", description: "Display name shown in obot UI." },
          package: { type: "string", description: "npm package name, e.g. n8n-mcp or @scope/foo." },
          shortDescription: { type: "string" },
          env: {
            type: "object",
            description:
              "Env vars passed to the MCP process. Keys go in manifest.env[]. Mark secrets via sensitiveKeys.",
            additionalProperties: { type: "string" },
          },
          sensitiveKeys: {
            type: "array",
            items: { type: "string" },
            description: "Keys in `env` that should be marked sensitive (API keys, tokens).",
          },
          alias: {
            type: "string",
            description: "Optional short alias used in URLs/logs.",
          },
        },
        required: ["name", "package"],
        additionalProperties: false,
      },
  • src/index.ts:54-143 (registration)
    The tool is registered in the 'tools' array (lines 54-136) along with other tools. This array is returned by the ListToolsRequestSchema handler (line 143) and matched by name in the CallToolRequestSchema switch (line 169).
    const tools: Tool[] = [
      {
        name: "list_mcp_servers",
        description:
          "List MCP servers currently registered in obot. Returns id, name, runtime, configured-state, and the connectURL you'd hand to claude.ai.",
        inputSchema: { type: "object", properties: {}, additionalProperties: false },
      },
      {
        name: "get_mcp_server",
        description: "Get full details of one MCP server by id (including manifest, env, missingRequiredEnvVars).",
        inputSchema: {
          type: "object",
          properties: { id: { type: "string", description: "MCP server id, e.g. ms1mwrmr" } },
          required: ["id"],
          additionalProperties: false,
        },
      },
      {
        name: "add_npx_mcp",
        description:
          "Install a new MCP server in obot that runs as `npx <package>` (stdio). Use this for npm-published MCP servers.",
        inputSchema: {
          type: "object",
          properties: {
            name: { type: "string", description: "Display name shown in obot UI." },
            package: { type: "string", description: "npm package name, e.g. n8n-mcp or @scope/foo." },
            shortDescription: { type: "string" },
            env: {
              type: "object",
              description:
                "Env vars passed to the MCP process. Keys go in manifest.env[]. Mark secrets via sensitiveKeys.",
              additionalProperties: { type: "string" },
            },
            sensitiveKeys: {
              type: "array",
              items: { type: "string" },
              description: "Keys in `env` that should be marked sensitive (API keys, tokens).",
            },
            alias: {
              type: "string",
              description: "Optional short alias used in URLs/logs.",
            },
          },
          required: ["name", "package"],
          additionalProperties: false,
        },
      },
      {
        name: "add_remote_mcp",
        description: "Register a remote MCP server URL so obot proxies it. Use for HTTP/SSE MCPs hosted elsewhere.",
        inputSchema: {
          type: "object",
          properties: {
            name: { type: "string" },
            url: { type: "string", description: "Remote MCP endpoint URL." },
            shortDescription: { type: "string" },
            alias: { type: "string" },
          },
          required: ["name", "url"],
          additionalProperties: false,
        },
      },
      {
        name: "delete_mcp_server",
        description: "Delete an MCP server from obot by id. Irreversible.",
        inputSchema: {
          type: "object",
          properties: { id: { type: "string" } },
          required: ["id"],
          additionalProperties: false,
        },
      },
      {
        name: "list_catalog_entries",
        description:
          "List MCP catalog entries available in obot's default catalog. Optional substring filter on name/id.",
        inputSchema: {
          type: "object",
          properties: { search: { type: "string" } },
          additionalProperties: false,
        },
      },
    ];
    
    const server = new Server(
      { name: "obot-admin-mcp", version: "0.1.0" },
      { capabilities: { tools: {} } },
    );
    
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));
  • The buildEnvList helper used by the handler to transform env map and sensitiveKeys array into the manifest.env format.
    function buildEnvList(env: EnvMap | undefined, sensitive: string[] | undefined) {
      const sens = new Set(sensitive ?? []);
      return Object.entries(env ?? {}).map(([key, value]) => ({
        key,
        value: String(value),
        required: true,
        sensitive: sens.has(key),
      }));
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It fails to disclose side effects like network access, system dependencies, or error behavior on missing packages. Only states the execution mechanism (npx + stdio).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no extraneous text. Action verb 'Install' is front-loaded. Efficient and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, no output schema, and no annotations, the description is minimal. It does not explain the installation process, prerequisites, or what 'obot' is. Adequate but could be more complete for a tool with this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 83%, setting a baseline of 3. The description adds no parameter-specific information beyond the schema. While the schema already describes parameters well, the description does not enhance understanding of how they affect behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it installs a new MCP server running as `npx <package>` via stdio. It is distinct from siblings like add_remote_mcp, which likely handles remote servers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Specifies 'Use this for npm-published MCP servers,' providing clear context. Does not explicitly state when not to use, but the sibling tool add_remote_mcp covers other cases, making usage boundaries implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/kiarashedraki/obot-admin-mcp'

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