- pry_mcp/constants.py: protocol constants - pry_mcp/notifications.py: observer pattern, logging handler, notification helpers - pry_mcp/tools.py: PRY_TOOLS definitions - pry_mcp/resources.py: PRY_RESOURCES and PRY_PROMPTS - pry_mcp/fallback_server.py: FallbackMCPServer implementation - pry_mcp/sdk_server.py: official MCP SDK path - mcp_production.py: backward-compatible re-export shim - Avoid namespace collision with installed mcp SDK by using pry_mcp/
53 lines
1.3 KiB
Python
53 lines
1.3 KiB
Python
"""Pry - MCP server sub-package.
|
|
|
|
Split from mcp_production.py for maintainability.
|
|
"""
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
# Copyright (c) 2026 Rug Munch Media LLC
|
|
#
|
|
# Part of Pry - https://git.rugmunch.io/RugMunchMedia/pryscraper
|
|
# Licensed under MIT. See LICENSE.
|
|
|
|
from __future__ import annotations
|
|
|
|
from pry_mcp.constants import (
|
|
DEFAULT_BASE_URL,
|
|
MCP_PROTOCOL_VERSION,
|
|
SERVER_NAME,
|
|
SERVER_VERSION,
|
|
)
|
|
from pry_mcp.fallback_server import make_fallback_server
|
|
from pry_mcp.notifications import (
|
|
MCPLoggingHandler,
|
|
notify_resource_changed,
|
|
notify_resource_list_changed,
|
|
notify_tool_list_changed,
|
|
register_mcp_notification_observer,
|
|
set_active_mcp_server,
|
|
unregister_mcp_notification_observer,
|
|
)
|
|
from pry_mcp.resources import PRY_PROMPTS, PRY_RESOURCES
|
|
from pry_mcp.sdk_server import create_server, main, register_all
|
|
from pry_mcp.tools import PRY_TOOLS
|
|
|
|
__all__ = [
|
|
"DEFAULT_BASE_URL",
|
|
"MCP_PROTOCOL_VERSION",
|
|
"PRY_PROMPTS",
|
|
"PRY_RESOURCES",
|
|
"PRY_TOOLS",
|
|
"SERVER_NAME",
|
|
"SERVER_VERSION",
|
|
"MCPLoggingHandler",
|
|
"create_server",
|
|
"main",
|
|
"make_fallback_server",
|
|
"notify_resource_changed",
|
|
"notify_resource_list_changed",
|
|
"notify_tool_list_changed",
|
|
"register_all",
|
|
"register_mcp_notification_observer",
|
|
"set_active_mcp_server",
|
|
"unregister_mcp_notification_observer",
|
|
]
|