Skip to main content
Glama

skvil_register

Register for a free API key to verify AI agent security certifications using blockchain-based trust records. The key caches locally for automatic use with security scanning tools.

Instructions

Register for a free Skvil API key. The key is automatically cached locally for future use. No sign-up or account required. Other tools (skvil_scan, skvil_report) will use the cached key automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/tools.ts:245-290 (registration)
    Tool registration for skvil_register. Registers the tool with the MCP server, including description and handler function that checks for existing API keys and calls api.register().
    // ── skvil_register ────────────────────────────────────────────────────────
    server.tool(
      'skvil_register',
      'Register for a free Skvil API key. The key is automatically cached ' +
        'locally for future use. No sign-up or account required. Other tools ' +
        '(skvil_scan, skvil_report) will use the cached key automatically.',
      {},
      async () => {
        try {
          const existing = getApiKey();
          if (existing) {
            return {
              content: [
                {
                  type: 'text',
                  text:
                    'An API key is already configured.\n\n' +
                    'To register a new key, unset the `SKVIL_API_KEY` env var and ' +
                    'delete `~/.skvil/mcp-config.json`, then try again.',
                },
              ],
            };
          }
    
          const result = await api.register();
          return {
            content: [
              {
                type: 'text',
                text:
                  '**API key registered successfully!**\n\n' +
                  `- **Key prefix:** ${result.key_prefix}...\n` +
                  `- **Tier:** ${result.tier}\n\n` +
                  'The key has been cached in `~/.skvil/mcp-config.json`.\n' +
                  'You can now use `skvil_scan` and `skvil_report`.',
              },
            ],
          };
        } catch (error) {
          return {
            content: [{ type: 'text', text: formatError('register', error) }],
            isError: true,
          };
        }
      },
    );
  • Core API handler that makes a POST request to /register endpoint, saves the API key locally, and returns the registration result with key prefix and tier.
    /** Register for a free API key and cache it locally. */
    export async function register(): Promise<RegisterResponse> {
      const result = await request<RegisterResponse>('POST', '/register');
      saveApiKey(result.api_key, result.key_prefix);
      return result;
    }
  • Type definition for the RegisterResponse schema that defines the structure of the API registration response including api_key, key_prefix, and tier fields.
    export interface RegisterResponse {
      api_key: string;
      key_prefix: string;
      tier: string;
    }
  • Helper function that saves the newly registered API key to ~/.skvil/mcp-config.json along with key prefix and registration timestamp. Updates the in-memory cache.
    /** Cache a newly registered API key for future use. */
    export function saveApiKey(apiKey: string, keyPrefix: string): void {
      const config = readConfig();
      config.api_key = apiKey;
      config.key_prefix = keyPrefix;
      config.registered_at = new Date().toISOString();
      writeConfig(config);
      cachedApiKey = apiKey;
    }

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/Skvil-IA/skvil-mcp'

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