Skip to content
Open
Show file tree
Hide file tree
Changes from 116 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
0ecc88b
Integrated toolops test case generation with MCP CF.
Jay-IRL Oct 23, 2025
1018655
changes for toolops/enrichment/enrich_tool endpoint
Oct 27, 2025
c389da6
Updated read me and env file.
Jay-IRL Oct 27, 2025
2a8111b
Merge remote-tracking branch 'origin/mcp-cf-tool-enrichment-changes' …
Jay-IRL Oct 27, 2025
f8f72a4
Integrated enrichment endpoint.
Jay-IRL Oct 27, 2025
aafffc9
Added script to start MCP server for salesloft get all actions API.
Jay-IRL Oct 28, 2025
711ec27
temp commit .
Jay-IRL Oct 28, 2025
9b91a3d
changes related to the UI.
Oct 28, 2025
9bd3970
Minor fix salesloft MCP server setup.
Jay-IRL Oct 28, 2025
aa35d41
removed token file.
Jay-IRL Oct 28, 2025
dd2305e
Removed bearer token from git push.
Jay-IRL Oct 28, 2025
b56b084
changes related to accordion dropdown.
Oct 29, 2025
2b2d7e7
fixed a minor bug related to tool test.
Oct 29, 2025
0a8d466
button for tool enrichment.
Oct 29, 2025
6b020b4
Merge remote-tracking branch 'remotes/origin/toolops_main' into ui-ch…
Oct 29, 2025
6401f71
Added execute prompt method for llm inferencing.
Jay-IRL Nov 3, 2025
9933744
first draft of changes using new toolops dir structure
Nov 3, 2025
bf23632
working version for enrich_tool
Nov 3, 2025
b2e0f26
Modified test case generation to OpenAI provider and testing successful.
Jay-IRL Nov 3, 2025
c7ad3c4
remove unused import
Nov 3, 2025
bd527cb
adding toolops dependency
Nov 3, 2025
f082f0c
fincal changes for the demo.
Nov 4, 2025
7b78aa0
Merge remote-tracking branch 'origin/toolops_mcp_cf_PR_enrichment_cha…
Jay-IRL Nov 4, 2025
b799871
updates to optional dependencies
Nov 4, 2025
7d9930a
update optional dependencies
Nov 4, 2025
af72a60
update uv lock
Nov 4, 2025
5268ed9
merged enrichment PR , testing pending.
Jay-IRL Nov 4, 2025
b7fbee4
fix related to backend API.
Nov 4, 2025
0be2aa0
Merge branch 'toolops_mcp_cf_PR' of github.com:Jay-IRL/mcp-context-fo…
Nov 4, 2025
b2419c7
Added multiple LLM providers and tested.
Jay-IRL Nov 4, 2025
1b6a692
table is created and records are updated. read is not working.
Jay-IRL Nov 4, 2025
ea7daa1
Added DB persist for test cases and two modes generate , query added …
Jay-IRL Nov 5, 2025
e0dc0c4
Merge remote-tracking branch 'origin/toolops_mcp_cf_PR_enrichment_cha…
Jay-IRL Nov 5, 2025
f55f344
Merge branch 'ui-changes' into toolops_mcp_cf_PR
Jay-IRL Nov 5, 2025
173ca3d
Updated API endpoint to get `status`
Jay-IRL Nov 5, 2025
e1d003f
Minor fix for Tool Not found
Jay-IRL Nov 5, 2025
54ba93c
Updated toolops requirements and instrcutions.
Jay-IRL Nov 5, 2025
5d08832
removed default setting of llm model id and llm platform
Nov 5, 2025
51f7eb8
Modified testcase generation for different LLMs
Nov 5, 2025
a1988c1
Modified testcase generation and tested on LLMs
Nov 6, 2025
0ac7f56
Merge remote-tracking branch 'origin/ritwik_mcp_cf' into toolops_mcp_…
Jay-IRL Nov 6, 2025
84c1f00
Merged test case generation fix and set low temperature for toolops g…
Jay-IRL Nov 6, 2025
e5ed313
UI related enhancments for test case generatin and validation.
Nov 6, 2025
26fcae2
deleted dummy toolops apis.
Nov 6, 2025
624de2f
Merge branch 'toolops_mcp_cf_PR' of github.com:Jay-IRL/mcp-context-fo…
Nov 6, 2025
0336c36
changes related to enrichment model.
Nov 6, 2025
89ba152
Alembic heads merged to fix the error.
Jay-IRL Nov 6, 2025
c07b73a
setting enriched description to current description in case of LLM error
Nov 6, 2025
cc5ed77
tested method overriding for LLM execute prompt method.
Jay-IRL Nov 7, 2025
2bea99c
changes related to bulk validation and enrichment.
Nov 10, 2025
12adc89
Merge branch 'toolops_mcp_cf_PR' of github.com:Jay-IRL/mcp-context-fo…
Nov 10, 2025
82b156f
fix for multiple tools.
Nov 10, 2025
0537631
disabled Run with Agent.
Nov 10, 2025
2c777cd
fixed issue with bulk enrichment and validation.
Nov 11, 2025
d6228c3
Added a modal for test case and variation count selection.
Nov 11, 2025
bc392c1
using the generic success message instead of custom box.
Nov 11, 2025
c1c670d
added a custom message for run all test cases.
Nov 11, 2025
7590ff7
fixed the bug related to result display in case run all tests.
Nov 11, 2025
e51ede6
fixed model closing issues with the UI.
Nov 12, 2025
4e03b0d
added toolops as optional.
Nov 12, 2025
218552d
ignore env file
Jay-IRL Nov 14, 2025
00add34
removed credentials from .env.example and updated read me to .env
Jay-IRL Nov 14, 2025
378e54d
Merge branch 'toolops_mcp_cf_PR' into altk_imports_with_method_overri…
Jay-IRL Nov 14, 2025
f452eb0
Updated toolops code to use ALTK imports and overriding is working.
Jay-IRL Nov 14, 2025
f7855ae
Added MCP server tool execution with NL test cases.
Jay-IRL Nov 17, 2025
0644a2c
Merge pull request #11 from Jay-IRL/toolops_mcp_cf_PR_nl_test_case_wi…
neelamadhav Nov 17, 2025
b1005ff
Merge branch 'toolops_mcp_cf_PR' into altk_imports_with_method_overri…
Jay-IRL Nov 17, 2025
a511713
temp commit with ALTK import from public git.
Jay-IRL Nov 17, 2025
38ccda2
additional test in the llm_utils main.
Nov 17, 2025
780d8c4
Added ALTK public repo as requirement in pyproject.toml , Tested tool…
Jay-IRL Nov 17, 2025
f5db019
Tested ALTK with test case generation fix from public github.
Jay-IRL Nov 18, 2025
56f1faf
ui updates for validation using agent.
Nov 18, 2025
d0234be
Merge branch 'toolops_mcp_cf_PR' into ui-run-with-agent
Nov 18, 2025
2620d6f
fixed issue with loading div.
Nov 18, 2025
5b2b686
minor label change.
Nov 18, 2025
b5ca636
merged and tested UI changes for NL test case execution with agent.
Jay-IRL Nov 18, 2025
c7a7a21
Fixed salesloft example tool output schema.
Jay-IRL Nov 18, 2025
01af058
Merge branch 'main' into toolops_main
Jay-IRL Nov 18, 2025
84c52e2
partial lint and code formatting , need to test after code formating.
Jay-IRL Nov 18, 2025
1fd60ff
Updated ALTK version to PyPi package release, toolops endpoints are w…
Jay-IRL Nov 19, 2025
8e4497e
pylint , flake8 linting is complete , lint-web is pedning.
Jay-IRL Nov 19, 2025
3527382
fixes related web lint.
Nov 20, 2025
78aa19d
lint fixes
Nov 20, 2025
655f48f
Added sap successfactor MCP tool and code formatting.
Jay-IRL Nov 20, 2025
8512303
fix related javascript lint.
Nov 20, 2025
56a1c25
fix related javascript lint.
Nov 20, 2025
af8f3d1
formatting fix related to javascript lint.
Nov 20, 2025
abea284
final changes related to javascript formatting.
Nov 20, 2025
f4922d7
Merge branch 'toolops_main' into toolops-main-lint-web
Nov 20, 2025
62e9791
make test is passing all test cases , updated toolops readme for dev …
Jay-IRL Nov 20, 2025
5d62e87
All lint , test make commands passing except lint-web
Jay-IRL Nov 20, 2025
e52e5dc
minor bug fix.
Nov 20, 2025
9186a5a
Merge remote-tracking branch 'origin/toolops-main-lint-web' into tool…
Jay-IRL Nov 20, 2025
1e23e87
Minor fix for lint web
Jay-IRL Nov 20, 2025
049dbd1
Merge remote-tracking branch 'upstream/main' into toolops_main
Jay-IRL Nov 20, 2025
0a11405
MInor fix in JS for linting.
Jay-IRL Nov 20, 2025
6739d94
minor bug fixes related to id.
Nov 20, 2025
219a213
fixed local declaration of a variable.
Nov 20, 2025
a5d1e3d
linting and test cases are passing. Tested toolops features via APIs …
Jay-IRL Nov 20, 2025
5af76ca
fixed minor display issues in the UI.
Nov 21, 2025
6eb2658
changes related to ui array display.
Nov 21, 2025
df95451
Added watsonx provider support.
Jay-IRL Nov 24, 2025
107bb14
changes related to demo feedback - on the order and colour of the too…
Nov 24, 2025
274d931
Merge branch 'toolops_main' into toolops_demo
Jay-IRL Nov 24, 2025
e56c997
temp commit.
Jay-IRL Nov 24, 2025
4f5b70b
Updated LLM inference to chat models to fix the issue with LLM provid…
Jay-IRL Nov 24, 2025
08d4dc5
Merge remote-tracking branch 'upstream/main' into toolops_main
Jay-IRL Nov 26, 2025
e90edf0
Fixed auth for Run with Agent.
Jay-IRL Nov 26, 2025
46be88f
Fixed auth issue in Run with Agent.
Jay-IRL Nov 26, 2025
d80b2d9
Fixed alembic issue.
Jay-IRL Nov 27, 2025
94e4cc9
env false bydefault
kevalmahajan Nov 27, 2025
4211426
tab specific dependencies present in pyproject.toml
kevalmahajan Nov 27, 2025
1e83256
duplicate code for the function
kevalmahajan Nov 27, 2025
7057307
Modified alembic scripts and removed un-necessary scripts.
Jay-IRL Nov 27, 2025
959bed2
cleanup
kevalmahajan Nov 27, 2025
2151943
cleanup
kevalmahajan Nov 27, 2025
2941eca
Merge remote-tracking branch 'upstream/main' into toolops_main
Jay-IRL Nov 28, 2025
f4be1ad
fixed imports
kevalmahajan Nov 28, 2025
de60306
doctest coverage
kevalmahajan Nov 28, 2025
0c25314
linting
kevalmahajan Nov 28, 2025
3bf9b0d
update manifest
kevalmahajan Nov 28, 2025
d93ec16
optional handling
kevalmahajan Nov 28, 2025
4a4f4cd
minor change
kevalmahajan Nov 28, 2025
272388c
temp remove failed doctest due to env
kevalmahajan Nov 29, 2025
a988166
handle configuration failure edge cases
kevalmahajan Nov 29, 2025
e605f43
minor exception handling
kevalmahajan Nov 29, 2025
f02f261
removed unncessary assert in function
kevalmahajan Nov 29, 2025
3f814e9
pylint fixes
kevalmahajan Nov 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,15 @@ REQUIRE_STRONG_SECRETS=false
# NOT RECOMMENDED for production!
# REQUIRE_STRONG_SECRETS=false

#####################################
# ToolOps Configuration
#####################################

# Enable the ToolOps functionality (true/false)
# When disabled, ToolOps features will be completely hidden from UI and APIs
# Default: false (must be explicitly enabled)
TOOLOPS_ENABLED=false

#####################################
# LLM Chat MCP Client Configuration
#####################################
Expand All @@ -1012,7 +1021,7 @@ LLMCHAT_ENABLED=false
# LLM Provider Selection
# Options: azure_openai, openai, anthropic, aws_bedrock, ollama
# Default: azure_openai
# LLM_PROVIDER=azure_openai
LLM_PROVIDER=openai

# Redis Configuration for chat session storage and maintaining history
# CACHE_TYPE should be set to "redis" and REDIS_URL configured appropriately as mentioned in the caching section.
Expand Down Expand Up @@ -1040,11 +1049,12 @@ LLMCHAT_CHAT_HISTORY_MAX_MESSAGES=50 # Maximum message history to store p
# OpenAI Configuration
#####################################
# Use for direct OpenAI API access (non-Azure) or OpenAI-compatible endpoints
# OPENAI_API_KEY=sk-...
# OPENAI_MODEL=gpt-4o-mini
# OPENAI_BASE_URL=https://api.openai.com/v1 # Optional: for OpenAI-compatible endpoints
# OPENAI_TEMPERATURE=0.7
# OPENAI_API_KEY=
# OPENAI_MODEL=meta-llama/llama-3-3-70b-instruct
# OPENAI_BASE_URL= # Optional: for OpenAI-compatible endpoints
# OPENAI_TEMPERATURE=0.1
# OPENAI_MAX_RETRIES=2
# OPENAI_MAX_TOEKNS=1000

#####################################
# Anthropic Claude Configuration
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,14 @@ You can get started by copying the provided [.env.example](https://github.com/IB
- `MCPGATEWAY_A2A_ENABLED=false`: Completely disables A2A features (API endpoints return 404, admin tab hidden)
- `MCPGATEWAY_A2A_METRICS_ENABLED=false`: Disables metrics collection while keeping functionality

### ToolOps

ToolOps streamlines the entire workflow by enabling seamless tool enrichment, automated test case generation, and comprehensive tool validation.

| Setting | Description | Default | Options |
| ------------------------------ | -------------------------------------- | ------- | ------- |
| `TOOLOPS_ENABLED` | Enable ToolOps functionality | `false` | bool |

### LLM Chat MCP Client

The LLM Chat MCP Client allows you to interact with MCP servers using conversational AI from multiple LLM providers. This feature enables natural language interaction with tools, resources, and prompts exposed by MCP servers.
Expand Down Expand Up @@ -1281,11 +1289,16 @@ The LLM Chat MCP Client allows you to interact with MCP servers using conversati
| `OLLAMA_MODEL` | Ollama model name | `llama3.2` | string |
| `OLLAMA_TEMPERATURE` | Sampling temperature | `0.7` | float (0.0-2.0) |

> βš™οΈ **ToolOps**: To manage the complete tool workflow β€” enrich tools, generate test cases automatically, and validate them with ease.
> πŸ€– **LLM Chat Integration**: Chat with MCP servers using natural language powered by Azure OpenAI, OpenAI, Anthropic Claude, AWS Bedrock, or Ollama
> πŸ”§ **Flexible Providers**: Switch between different LLM providers without changing your MCP integration
> πŸ”’ **Security**: API keys and credentials are securely stored and never exposed in responses
> πŸŽ›οΈ **Admin UI**: Dedicated LLM Chat tab in the admin interface for interactive conversations

**ToolOps Configuration Effects:**
- `TOOLOPS_ENABLED=false` (default): Completely disables ToolOps features (API endpoints return 404, admin tab hidden)
- `TOOLOPS_ENABLED=true`: Enables ToolOps functionality in the UI

**LLM Chat Configuration Effects:**
- `LLMCHAT_ENABLED=false` (default): Completely disables LLM Chat features (API endpoints return 404, admin tab hidden)
- `LLMCHAT_ENABLED=true`: Enables LLM Chat functionality with the selected provider
Expand Down
3 changes: 3 additions & 0 deletions charts/mcp-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ mcpContextForge:
# ─ UI Configuration ─
MCPGATEWAY_UI_TOOL_TEST_TIMEOUT: "60000" # tool test timeout in milliseconds for the admin UI

# ─ ToolOps Feature ─
TOOLOPS_ENABLED: "false" # enable ToolOps feature

# ─ LLM Chat Feature ─
LLMCHAT_ENABLED: "false" # enable LLM Chat feature

Expand Down
6 changes: 6 additions & 0 deletions docs/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,12 @@
"title": "Llmchat Enabled",
"type": "boolean"
},
"toolops_enabled": {
"default": false,
"description": "Enable ToolOps feature",
"title": "ToolOps Enabled",
"type": "boolean"
},
"retry_max_attempts": {
"default": 3,
"title": "Retry Max Attempts",
Expand Down
6 changes: 6 additions & 0 deletions docs/docs/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,12 @@
"title": "Llmchat Enabled",
"type": "boolean"
},
"toolops_enabled": {
"default": false,
"description": "Enable ToolOps feature",
"title": "ToolOps Enabled",
"type": "boolean"
},
"retry_max_attempts": {
"default": 3,
"title": "Retry Max Attempts",
Expand Down
2 changes: 1 addition & 1 deletion mcpgateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
__download_url__ = "https://github.com/IBM/mcp-context-forge"
__packages__ = ["mcpgateway"]

from mcpgateway import reverse_proxy, wrapper, translate
from mcpgateway import reverse_proxy, translate, wrapper

# Export main components for easier imports
__all__ = [
Expand Down
1 change: 1 addition & 0 deletions mcpgateway/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2630,6 +2630,7 @@ def _to_dict_and_filter(raw_list):
"grpc_enabled": GRPC_AVAILABLE and settings.mcpgateway_grpc_enabled,
"catalog_enabled": settings.mcpgateway_catalog_enabled,
"llmchat_enabled": getattr(settings, "llmchat_enabled", False),
"toolops_enabled": getattr(settings, "toolops_enabled", False),
"observability_enabled": getattr(settings, "observability_enabled", False),
"current_user": get_user_email(user),
"email_auth_enabled": getattr(settings, "email_auth_enabled", False),
Expand Down
59 changes: 59 additions & 0 deletions mcpgateway/alembic/versions/add_toolops_test_cases_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
"""Location: ./mcpgateway/alembic/versions/add_toolops_test_case_table.py
Copyright 2025
SPDX-License-Identifier: Apache-2.0
Authors: Jay Bandlamudi

add_a2a_agents_and_metrics

Revision ID: add_a2a_agents_and_metrics
Revises: add_oauth_tokens_table
Create Date: 2025-11-27 10:00:00.000000
"""

# Standard
from typing import Sequence, Union

# Third-Party
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision: str = "add_toolops_test_cases_table"
down_revision: Union[str, Sequence[str], None] = "z1a2b3c4d5e6"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
"""Add toolops test cases table"""

# Check if table already exists (for development scenarios)
conn = op.get_bind()
inspector = sa.inspect(conn)
existing_tables = inspector.get_table_names()

if "toolops_test_cases" not in existing_tables:
# Create a2a_agents table with unique constraints included (SQLite compatible)
op.create_table(
"toolops_test_cases",
sa.Column("tool_id", sa.String(255), primary_key=True),
sa.Column("test_cases", sa.JSON(), nullable=True),
sa.Column("run_status", sa.String(255), nullable=True),
)


def downgrade() -> None:
"""Reverse the toolops test cases tables."""
# Check if tables exist before trying to drop indexes/tables
conn = op.get_bind()
inspector = sa.inspect(conn)
existing_tables = inspector.get_table_names()

# Drop tables (if they exist)
for table_name in ["toolops_test_cases"]:
if table_name in existing_tables:
try:
op.drop_table(table_name)
except Exception as e:
print(f"Warning: Could not drop table {table_name}: {e}")
1 change: 1 addition & 0 deletions mcpgateway/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ class Settings(BaseSettings):
require_strong_secrets: bool = False # Default to False for backward compatibility, will be enforced in 1.0.0

llmchat_enabled: bool = Field(default=False, description="Enable LLM Chat feature")
toolops_enabled: bool = Field(default=False, description="Enable ToolOps feature")

# redis configurations for Maintaining Chat Sessions in multi-worker environment
llmchat_session_ttl: int = Field(default=300, description="Seconds for active_session key TTL")
Expand Down
18 changes: 18 additions & 0 deletions mcpgateway/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,24 @@ class ResourceSubscription(Base):
resource: Mapped["Resource"] = relationship(back_populates="subscriptions")


class ToolOpsTestCases(Base):
"""
ORM model for a registered Tool test cases.

Represents a tool and the generated test cases.
Includes:
- tool_id: unique tool identifier
- test_cases: generated test cases.
- run_status: status of test case generation
"""

__tablename__ = "toolops_test_cases"

tool_id: Mapped[str] = mapped_column(String(255), primary_key=True)
test_cases: Mapped[Dict[str, Any]] = mapped_column(JSON)
run_status: Mapped[str] = mapped_column(String(255), nullable=False)


class Prompt(Base):
"""
ORM model for a registered Prompt template.
Expand Down
40 changes: 26 additions & 14 deletions mcpgateway/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
_config_file = _os.getenv("PLUGIN_CONFIG_FILE", settings.plugin_config_file)
plugin_manager: PluginManager | None = PluginManager(_config_file) if _PLUGINS_ENABLED else None


# Initialize services
tool_service = ToolService()
resource_service = ResourceService()
Expand Down Expand Up @@ -368,6 +369,20 @@ def transform_data_with_mappings(data: list[Any], mappings: dict[str, str]) -> l
return mapped_results


def attempt_to_bootstrap_sso_providers():
"""
Try to bootstrap SSO provider services based on settings.
"""
try:
# First-Party
from mcpgateway.utils.sso_bootstrap import bootstrap_sso_providers # pylint: disable=import-outside-toplevel

bootstrap_sso_providers()
logger.info("SSO providers bootstrapped successfully")
except Exception as e:
logger.warning(f"Failed to bootstrap SSO providers: {e}")


####################
# Startup/Shutdown #
####################
Expand Down Expand Up @@ -531,20 +546,6 @@ async def setup_passthrough_headers():
db.close()


def attempt_to_bootstrap_sso_providers():
"""
Try to bootstrap SSO provider services based on settings.
"""
try:
# First-Party
from mcpgateway.utils.sso_bootstrap import bootstrap_sso_providers # pylint: disable=import-outside-toplevel

bootstrap_sso_providers()
logger.info("SSO providers bootstrapped successfully")
except Exception as e:
logger.warning(f"Failed to bootstrap SSO providers: {e}")


# Initialize FastAPI app with orjson for 2-3x faster JSON serialization
app = FastAPI(
title=settings.app_name,
Expand Down Expand Up @@ -5020,6 +5021,17 @@ async def cleanup_import_statuses(max_age_hours: int = 24, user=Depends(get_curr
except ImportError:
logger.debug("LLM Chat router not available")

# Include Toolops router
if settings.toolops_enabled:
try:
# First-Party
from mcpgateway.routers.toolops_router import toolops_router

app.include_router(toolops_router)
logger.info("Toolops router included")
except ImportError:
logger.debug("Toolops router not available")

# Feature flags for admin UI and API
UI_ENABLED = settings.mcpgateway_ui_enabled
ADMIN_API_ENABLED = settings.mcpgateway_admin_api_enabled
Expand Down
7 changes: 1 addition & 6 deletions mcpgateway/middleware/rbac.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,7 @@ async def wrapper(*args, **kwargs):

# First, check if any plugins want to handle permission checking
# First-Party
from mcpgateway.plugins.framework import ( # pylint: disable=import-outside-toplevel
get_plugin_manager,
GlobalContext,
HttpAuthCheckPermissionPayload,
HttpHookType,
)
from mcpgateway.plugins.framework import get_plugin_manager, GlobalContext, HttpAuthCheckPermissionPayload, HttpHookType # pylint: disable=import-outside-toplevel

plugin_manager = get_plugin_manager()
if plugin_manager:
Expand Down
33 changes: 8 additions & 25 deletions mcpgateway/plugins/framework/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
from mcpgateway.plugins.framework.base import Plugin
from mcpgateway.plugins.framework.errors import PluginError, PluginViolationError
from mcpgateway.plugins.framework.external.mcp.server import ExternalPluginServer
from mcpgateway.plugins.framework.hooks.registry import HookRegistry, get_hook_registry
from mcpgateway.plugins.framework.loader.config import ConfigLoader
from mcpgateway.plugins.framework.loader.plugin import PluginLoader
from mcpgateway.plugins.framework.manager import PluginManager
from mcpgateway.plugins.framework.hooks.agents import AgentHookType, AgentPostInvokePayload, AgentPostInvokeResult, AgentPreInvokePayload, AgentPreInvokeResult
from mcpgateway.plugins.framework.hooks.http import (
HttpAuthCheckPermissionPayload,
HttpAuthCheckPermissionResult,
Expand All @@ -38,28 +35,14 @@
HttpPreRequestPayload,
HttpPreRequestResult,
)
from mcpgateway.plugins.framework.hooks.agents import AgentHookType, AgentPostInvokePayload, AgentPostInvokeResult, AgentPreInvokePayload, AgentPreInvokeResult
from mcpgateway.plugins.framework.hooks.prompts import PromptHookType, PromptPosthookPayload, PromptPosthookResult, PromptPrehookPayload, PromptPrehookResult
from mcpgateway.plugins.framework.hooks.registry import HookRegistry, get_hook_registry
from mcpgateway.plugins.framework.hooks.resources import ResourceHookType, ResourcePostFetchPayload, ResourcePostFetchResult, ResourcePreFetchPayload, ResourcePreFetchResult
from mcpgateway.plugins.framework.hooks.prompts import (
PromptHookType,
PromptPosthookPayload,
PromptPosthookResult,
PromptPrehookPayload,
PromptPrehookResult,
)
from mcpgateway.plugins.framework.hooks.tools import ToolHookType, ToolPostInvokePayload, ToolPostInvokeResult, ToolPreInvokeResult, ToolPreInvokePayload
from mcpgateway.plugins.framework.models import (
GlobalContext,
MCPServerConfig,
PluginCondition,
PluginConfig,
PluginContext,
PluginErrorModel,
PluginMode,
PluginPayload,
PluginResult,
PluginViolation,
)
from mcpgateway.plugins.framework.hooks.tools import ToolHookType, ToolPostInvokePayload, ToolPostInvokeResult, ToolPreInvokePayload, ToolPreInvokeResult
from mcpgateway.plugins.framework.loader.config import ConfigLoader
from mcpgateway.plugins.framework.loader.plugin import PluginLoader
from mcpgateway.plugins.framework.manager import PluginManager
from mcpgateway.plugins.framework.models import GlobalContext, MCPServerConfig, PluginCondition, PluginConfig, PluginContext, PluginErrorModel, PluginMode, PluginPayload, PluginResult, PluginViolation

# Plugin manager singleton (lazy initialization)
_plugin_manager: Optional[PluginManager] = None
Expand Down
10 changes: 1 addition & 9 deletions mcpgateway/plugins/framework/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@

# First-Party
from mcpgateway.plugins.framework.errors import PluginError
from mcpgateway.plugins.framework.models import (
PluginCondition,
PluginConfig,
PluginContext,
PluginErrorModel,
PluginMode,
PluginPayload,
PluginResult,
)
from mcpgateway.plugins.framework.models import PluginCondition, PluginConfig, PluginContext, PluginErrorModel, PluginMode, PluginPayload, PluginResult

# pylint: disable=import-outside-toplevel

Expand Down
Loading