File mcp-gateway-registry.spec of Package mcp-gateway-registry

#
# spec file for package mcp-gateway-registry
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name:           mcp-gateway-registry%{psuffix}
Version:        0+git.1750644335.68436f9
Release:        0
Summary:        An unified MCP platform that combines centralized access control with intelligent tool discovery
License:        Apache-2.0
URL:            https://github.com/agentic-community/mcp-gateway-registry
Source:         mcp-gateway-registry-%{version}.tar.xz
Patch0:         install-all-registry.patch
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module wheel}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-Jinja2 >= 3.1.6
Requires:       python-PyJWT >= 2.10.1
Requires:       python-PyYAML >= 6.0.0
#Requires:       python-bandit >= 1.8.3
Requires:       python-faiss >= 1.7.4
Requires:       python-fastapi >= 0.115.12
Requires:       python-httpcore >= 1.0.9
Requires:       python-httpx >= 0.27.0
Requires:       python-huggingface-hub
# >= 0.31.1
Requires:       python-itsdangerous >= 2.2.0
#Requires:       python-langchain-aws >= 0.2.23
#Requires:       python-langchain-mcp-adapters >= 0.0.11
#Requires:       python-langgraph >= 0.4.3
Requires:       python-mcp >= 1.9.3
Requires:       python-pydantic >= 2.11.3
Requires:       python-pydantic-settings >= 2.0.0
Requires:       python-python-dotenv >= 1.1.0
Requires:       python-python-multipart >= 0.0.20
Requires:       python-pytz
# >= 2025.2
Requires:       python-scikit-learn >= 1.3.0
Requires:       python-sentence-transformers >= 2.2.2
#Requires:       python-strands-agents >= 0.1.6
#Requires:       python-strands-agents-tools >= 0.1.4
Requires:       python-torch >= 1.6.0
Requires:       python-typing-extensions >= 4.8.0
Requires:       python-uvicorn >= 0.34.2
Requires:       python-websockets
# >= 15.0.1
BuildArch:      noarch
%if %{with test}
BuildRequires:  %{python_module mcp-gateway-registry = %{version}}
BuildRequires:  %{python_module pytest}
%endif
%python_subpackages

%description
Model Context Protocol (MCP) is an open standard protocol that allows AI Models to connect with external systems, tools, and data sources. While MCP simplifies tool access for Agents and solves data access and internal/external API connectivity challenges, several critical obstacles remain before enterprises can fully realize MCP's promise.

Discovery & Access Challenges:

    Service Discovery: How do developers find and access approved MCP servers?
    Governed Access: How do enterprises provide secure, centralized access to curated MCP servers?
    Tool Selection: With hundreds of enterprise MCP servers, how do developers identify the right tools for their specific agents?
    Dynamic Discovery: How can agents dynamically find and use new tools for tasks they weren't originally designed for?

The MCP Gateway & Registry solves these challenges by providing a unified platform that combines centralized access control with intelligent tool discovery. The Registry offers both visual and programmatic interfaces for exploring available MCP servers and tools, while the Gateway ensures secure, governed access to all services. This enables developers to programmatically build smarter agents and allows agents to autonomously discover and execute tools beyond their initial capabilities.

%prep
%autosetup -p1 -n mcp-gateway-registry-%{version}
# only Python 3.12 is enabled by default, which is a no-go
sed -i '/requires-python/d' pyproject.toml servers/*/pyproject.toml
# pip doesn't go deep into the structure, rename the pyproject pkg just for our use
#sed -i 's/name = "mcp-registry"/name = "registry"/' pyproject.toml

%build
%if !%{with test}
touch registry/__init__.py
%pyproject_wheel
%endif

%install
%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif

%check
%if %{with test}
rm -rf agents auth_server docker docs registry servers
%pytest tests
%endif

%if !%{with test}
%files %{python_files}
%license LICENSE
%{python_sitelib}/registry
%{python_sitelib}/mcp_registry-0.1.0.dist-info
%endif

%changelog
openSUSE Build Service is sponsored by