Skip to main content
Glama

check_server

Test MCP server functionality by running commands to verify tool capabilities and catch issues before deployment.

Instructions

Run checks against a specific MCP server by command. Example: check_server({ command: 'npx -y @modelcontextprotocol/server-everything' })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe command to launch the MCP server (e.g. 'npx -y @modelcontextprotocol/server-everything').
argsNoAdditional arguments for the command.

Implementation Reference

  • The `check_server` MCP tool is defined here, which validates input arguments and calls `runTarget` to perform the checks.
    server.tool(
      "check_server",
      "Run checks against a specific MCP server by command. Example: check_server({ command: 'npx -y @modelcontextprotocol/server-everything' })",
      {
        command: z.string().describe("The command to launch the MCP server (e.g. 'npx -y @modelcontextprotocol/server-everything')."),
        args: z.array(z.string()).optional().describe("Additional arguments for the command."),
      },
      async ({ command, args }) => {
        try {
          const target = {
            targetId: command,
            adapter: "local-process" as const,
            command,
            args: args ?? [],
            timeoutMs: 15_000,
          };
          const artifact = await runTarget(target);
          const outDir = defaultRunsDirectory();
          const outPath = await writeRunArtifact(artifact, outDir);
          return {
            content: [{ type: "text" as const, text: `${formatRun(artifact)}\n\nArtifact saved: ${outPath}` }],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: "text" as const, text: `Error checking server: ${msg}` }], isError: true };
        }
      },
    );
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/KryptosAI/mcp-observatory'

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