Coverage for mcpgateway / plugins / framework / constants.py: 100%
26 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-02-11 07:10 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-02-11 07:10 +0000
1# -*- coding: utf-8 -*-
2"""Location: ./mcpgateway/plugins/framework/constants.py
3Copyright 2025
4SPDX-License-Identifier: Apache-2.0
5Authors: Teryl Taylor
7Plugins constants file.
8This module stores a collection of plugin constants used throughout the framework.
9"""
11# Standard
12import os
13import sys
15# Model constants.
16# Specialized plugin types.
17EXTERNAL_PLUGIN_TYPE = "external"
19# MCP related constants.
20PYTHON_SUFFIX = ".py"
21URL = "url"
22SCRIPT = "script"
23CMD = "cmd"
24ENV = "env"
25CWD = "cwd"
26UDS = "uds"
28NAME = "name"
29PYTHON = os.environ.get("MCP_PYTHON", sys.executable)
30PLUGIN_NAME = "plugin_name"
31PAYLOAD = "payload"
32CONTEXT = "context"
33RESULT = "result"
34ERROR = "error"
35IGNORE_CONFIG_EXTERNAL = "ignore_config_external"
37# Global Context Metadata fields
39TOOL_METADATA = "tool"
40GATEWAY_METADATA = "gateway"
42# MCP Plugin Server Runtime constants
43MCP_SERVER_NAME = "MCP Plugin Server"
44MCP_SERVER_INSTRUCTIONS = "External plugin server for MCP Gateway"
45GET_PLUGIN_CONFIGS = "get_plugin_configs"
46GET_PLUGIN_CONFIG = "get_plugin_config"
47HOOK_TYPE = "hook_type"
48INVOKE_HOOK = "invoke_hook"