Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ba1feb6
Revert "fix: Update milvus connect function to work with remote insta…
franciscojavierarceo May 29, 2025
86b6a20
test: Add Operator E2E tests for Feast Apply and Materialize function…
Srihari1192 May 29, 2025
1ed32d4
fix: Updating milvus connect function to work with remote instance (#…
Fiona-Waters May 30, 2025
2bb7248
feat: Add MCP support to feature server configuration
YassinNouh21 May 31, 2025
479eb7a
fix linter
YassinNouh21 May 31, 2025
edbb58f
add example
YassinNouh21 May 31, 2025
a8b17e1
test: add test cases for the mcp server
YassinNouh21 May 31, 2025
bc00dba
fix linter
YassinNouh21 May 31, 2025
e3a30d7
formatting
YassinNouh21 May 31, 2025
8a644b5
docs: update README for MCP setup instructions
YassinNouh21 May 31, 2025
08c4dd6
fix: update transformation service endpoint and refactor MCP integration
YassinNouh21 May 31, 2025
6c6f6ee
feat: add Model Context Protocol (MCP) support and update documentation
YassinNouh21 May 31, 2025
c3043c1
fix: update entity key serialization version and improve README clarity
YassinNouh21 May 31, 2025
8b26804
Merge branch 'master' into feat/mcp
YassinNouh21 May 31, 2025
1bec81f
fix: refactor MCP imports to use the correct module path
YassinNouh21 May 31, 2025
8aa31a7
feat: Add MCP server implementation files
YassinNouh21 Jun 1, 2025
9409e6a
test: MCP server unit tests and integration tests
YassinNouh21 Jun 1, 2025
426744b
fix formatting
YassinNouh21 Jun 1, 2025
c40809b
fix formatting
YassinNouh21 Jun 1, 2025
6135cde
adding compiled requirements
franciscojavierarceo Jun 4, 2025
b31cc87
Merge branch 'master' into feat/mcp
franciscojavierarceo Jun 4, 2025
b9a84f3
fix linter
franciscojavierarceo Jun 4, 2025
dc71713
reverting duckdb change
franciscojavierarceo Jun 4, 2025
ba6f51a
needed to do file source and duckdb
franciscojavierarceo Jun 4, 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
Prev Previous commit
Next Next commit
fix: refactor MCP imports to use the correct module path
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
  • Loading branch information
YassinNouh21 committed May 31, 2025
commit 1bec81fbdadca9df3da9f9015c9623eb9c116b95
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ snowflake = [
"snowflake-connector-python[pandas]>=3.7,<4",
]
sqlite_vec = ["sqlite-vec==v0.1.6"]
mcp = ["fastapi_mcp"]

ci = [
"build",
Expand Down Expand Up @@ -162,13 +163,13 @@ ci = [
"types-setuptools",
"types-tabulate",
"virtualenv<20.24.2",
"feast[aws, azure, cassandra, clickhouse, couchbase, delta, docling, duckdb, elasticsearch, faiss, gcp, ge, go, grpcio, hazelcast, hbase, ibis, ikv, k8s, milvus, mssql, mysql, opentelemetry, spark, trino, postgres, pytorch, qdrant, redis, singlestore, snowflake, sqlite_vec]"
"feast[aws, azure, cassandra, clickhouse, couchbase, delta, docling, duckdb, elasticsearch, faiss, gcp, ge, go, grpcio, hazelcast, hbase, ibis, ikv, k8s, mcp, milvus, mssql, mysql, opentelemetry, spark, trino, postgres, pytorch, qdrant, redis, singlestore, snowflake, sqlite_vec]"
]
nlp = ["feast[docling, milvus, pytorch]"]
dev = ["feast[ci]"]
docs = ["feast[ci]"]
# used for the 'feature-server' container image build
minimal = ["feast[aws, gcp, snowflake, redis, go, mysql, postgres-c, opentelemetry, grpcio, k8s, duckdb, milvus]"]
minimal = ["feast[aws, gcp, snowflake, redis, go, mysql, postgres-c, opentelemetry, grpcio, k8s, duckdb, mcp, milvus]"]
minimal-sdist-build = [
"feast[minimal]",
"feast[ibis]",
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/feature_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def _add_mcp_support_if_enabled(app, store: "feast.FeatureStore"):
and store.config.feature_server.type == "mcp"
and getattr(store.config.feature_server, "mcp_enabled", False)
):
from feast.infra.feature_servers.mcp_server import add_mcp_support_to_app
from feast.infra.mcp_servers.mcp_server import add_mcp_support_to_app

mcp_server = add_mcp_support_to_app(app, store, store.config.feature_server)

Expand Down
27 changes: 0 additions & 27 deletions sdk/python/feast/infra/feature_servers/mcp_config.py

This file was deleted.

58 changes: 0 additions & 58 deletions sdk/python/feast/infra/feature_servers/mcp_server.py

This file was deleted.

2 changes: 1 addition & 1 deletion sdk/python/feast/repo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

FEATURE_SERVER_CONFIG_CLASS_FOR_TYPE = {
"local": "feast.infra.feature_servers.local_process.config.LocalFeatureServerConfig",
"mcp": "feast.infra.feature_servers.mcp_config.McpFeatureServerConfig",
"mcp": "feast.infra.mcp_servers.mcp_config.McpFeatureServerConfig",
}

ALLOWED_AUTH_TYPES = ["no_auth", "kubernetes", "oidc"]
Expand Down
18 changes: 9 additions & 9 deletions sdk/python/tests/unit/infra/feature_servers/test_mcp_server.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from unittest.mock import Mock, patch

from feast.feature_store import FeatureStore
from feast.infra.feature_servers.mcp_config import McpFeatureServerConfig
from feast.infra.mcp_servers.mcp_config import McpFeatureServerConfig


class TestMcpFeatureServerConfig:
Expand Down Expand Up @@ -39,14 +39,14 @@ def test_custom_config(self):
assert config.transformation_service_endpoint == "custom-host:8080"


@patch("feast.infra.feature_servers.mcp_server.MCP_AVAILABLE", True)
@patch("feast.infra.mcp_servers.mcp_server.MCP_AVAILABLE", True)
class TestMCPIntegration:
"""Test MCP integration functionality."""

@patch("feast.infra.feature_servers.mcp_server.FastApiMCP")
@patch("feast.infra.mcp_servers.mcp_server.FastApiMCP")
def test_add_mcp_support_success(self, mock_fast_api_mcp):
"""Test successful MCP support addition."""
from feast.infra.feature_servers.mcp_server import add_mcp_support_to_app
from feast.infra.mcp_servers.mcp_server import add_mcp_support_to_app

mock_app = Mock()
mock_store = Mock(spec=FeatureStore)
Expand All @@ -73,10 +73,10 @@ def test_add_mcp_support_success(self, mock_fast_api_mcp):
# Verify the result
assert result == mock_mcp_instance

@patch("feast.infra.feature_servers.mcp_server.FastApiMCP")
@patch("feast.infra.mcp_servers.mcp_server.FastApiMCP")
def test_add_mcp_support_with_defaults(self, mock_fast_api_mcp):
"""Test MCP support addition with default configuration values."""
from feast.infra.feature_servers.mcp_server import add_mcp_support_to_app
from feast.infra.mcp_servers.mcp_server import add_mcp_support_to_app

mock_app = Mock()
mock_store = Mock(spec=FeatureStore)
Expand All @@ -99,13 +99,13 @@ def test_add_mcp_support_with_defaults(self, mock_fast_api_mcp):
assert result == mock_mcp_instance


@patch("feast.infra.feature_servers.mcp_server.MCP_AVAILABLE", False)
@patch("feast.infra.mcp_servers.mcp_server.MCP_AVAILABLE", False)
class TestMCPNotAvailable:
"""Test behavior when MCP is not available."""

def test_add_mcp_support_mcp_not_available(self):
"""Test add_mcp_support_to_app when MCP is not available."""
from feast.infra.feature_servers.mcp_server import add_mcp_support_to_app
from feast.infra.mcp_servers.mcp_server import add_mcp_support_to_app

mock_app = Mock()
mock_store = Mock()
Expand All @@ -132,7 +132,7 @@ def test_add_mcp_support_if_enabled_exception(self, mock_logger):

# Mock the import to raise an exception
with patch(
"feast.infra.feature_servers.mcp_server.add_mcp_support_to_app",
"feast.infra.mcp_servers.mcp_server.add_mcp_support_to_app",
side_effect=Exception("Test error"),
):
_add_mcp_support_if_enabled(mock_app, mock_store)
Expand Down