Skip to main content
Glama
keywaysh

Keyway MCP Server

by keywaysh

keyway_list_secrets

Retrieve secret names from the Keyway vault for a specified repository environment, returning only identifiers without exposing sensitive values.

Instructions

List all secret names in the Keyway vault for the current repository. Returns only the keys, not the values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentNoEnvironment to list secrets from (default: "development")

Implementation Reference

  • The handler function that retrieves, parses, and returns the list of secrets for the specified environment.
    export async function listSecrets(args: { environment?: string }): Promise<CallToolResult> {
      const token = await getToken();
      const repository = getRepository();
      const environment = args.environment || 'development';
    
      const content = await pullSecrets(repository, environment, token);
      const secrets = parseEnvContent(content);
      const keys = Object.keys(secrets).sort();
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              { repository, environment, count: keys.length, secrets: keys },
              null,
              2
            ),
          },
        ],
      };
    }
  • src/index.ts:24-34 (registration)
    Tool registration for 'keyway_list_secrets' in the main index file, mapping it to the 'listSecrets' handler.
    server.tool(
      'keyway_list_secrets',
      'List all secret names in the Keyway vault for the current repository. Returns only the keys, not the values.',
      {
        environment: z
          .string()
          .optional()
          .describe('Environment to list secrets from (default: "development")'),
      },
      async (args) => listSecrets(args)
    );

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/keywaysh/keyway-mcp'

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