Skip to content

Commit f77981c

Browse files
patelchaitanyntkathole
authored andcommitted
feat: Expose registry endpoints on feature server for MCP access
Mount the existing REST registry routers under /registry on the feature server so that fastapi_mcp automatically exposes registry introspection (list/get for entities, feature views, data sources, feature services, permissions, projects, saved datasets, lineage, search) as MCP tools. The RegistryServer is created in-process from store.registry — no external registry server is required. Auth is enforced via inject_user_details on every mounted router. Made-with: Cursor Signed-off-by: Chaitany patel <[email protected]> Made-with: Cursor
1 parent 7f592a4 commit f77981c

19 files changed

Lines changed: 533 additions & 4 deletions

File tree

‎.secrets.baseline‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/how-to-guides/feast-operator/03-serving-and-observability.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,34 @@ MCP is mounted at `/mcp` on port 6566 — no additional Kubernetes Service is cr
279279
> **Dependency**: the feature server image must include `feast[mcp]` (`fastapi-mcp`).
280280
> Without it the server starts normally but MCP routes are not registered.
281281

282+
### Registry MCP
283+
284+
MCP can also be enabled on the **registry REST server**, exposing registry metadata
285+
(entities, feature views, feature services) as MCP tool endpoints. This is configured
286+
under `registry.local.server.mcp` and requires `restAPI: true`.
287+
288+
```yaml
289+
services:
290+
registry:
291+
local:
292+
server:
293+
restAPI: true
294+
mcp:
295+
enabled: true
296+
persistence:
297+
store:
298+
type: sql
299+
secretRef:
300+
name: feast-data-stores
301+
```
302+
303+
The operator writes `registry.mcp.enabled: true` into `feature_store.yaml` when
304+
this field is set. A CEL validation rule enforces that `restAPI` must be `true`
305+
when MCP is enabled.
306+
307+
> **Note**: Registry MCP uses only the `enabled` field — `serverName`, `serverVersion`,
308+
> and `transport` are not applicable to the registry server.
309+
282310
---
283311

284312
## `serving` vs `server` — summary

‎docs/how-to-guides/feast-operator/04-registry-topology.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,32 @@ registry:
7575
grpc: true # enable gRPC (default: true when server is set)
7676
```
7777

78+
### MCP on the registry server
79+
80+
When the REST API is enabled, you can additionally expose registry metadata as
81+
MCP (Model Context Protocol) tool endpoints for LLM agents:
82+
83+
```yaml
84+
services:
85+
registry:
86+
local:
87+
server:
88+
restAPI: true
89+
mcp:
90+
enabled: true
91+
persistence:
92+
store:
93+
type: sql
94+
secretRef:
95+
name: feast-data-stores
96+
```
97+
98+
The operator writes `registry.mcp.enabled: true` into `feature_store.yaml`.
99+
A validation rule enforces that `restAPI` must be `true` when `mcp.enabled` is `true`.
100+
101+
See [Guide 3 — Serving & Observability](03-serving-and-observability.md#registry-mcp)
102+
for more details and the full MCP configuration reference.
103+
78104
---
79105

80106
## Remote registry
@@ -188,4 +214,5 @@ spec:
188214
- [API reference — `RemoteRegistryConfig`](https://github.com/feast-dev/feast/blob/stable/infra/feast-operator/docs/api/markdown/ref.md#remoteregistryconfig)
189215
- [Sample: all remote servers](https://github.com/feast-dev/feast/blob/stable/infra/feast-operator/config/samples/v1_featurestore_all_remote_servers.yaml)
190216
- [Sample: DB persistence](https://github.com/feast-dev/feast/blob/stable/infra/feast-operator/config/samples/v1_featurestore_db_persistence.yaml)
217+
- [Sample: MCP](https://github.com/feast-dev/feast/blob/stable/infra/feast-operator/config/samples/v1_featurestore_mcp.yaml)
191218
- [Feast SDK — Registries](../reference/registries/)

‎docs/reference/feature-store-yaml.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,29 @@ feature_server:
4949
offline_push_batching_batch_interval_seconds: 5 # Maximum time rows may remain buffered before a forced flush.
5050
```
5151
52+
### registry
53+
54+
The `registry` field can be a simple path string or an object with additional
55+
configuration. When using the REST registry server, MCP support can be enabled:
56+
57+
```yaml
58+
registry:
59+
registry_type: sql
60+
path: postgresql+psycopg://feast:feast@localhost:5432/feast #pragma: allowlist secret
61+
mcp:
62+
enabled: true
63+
```
64+
65+
| Field | Type | Default | Description |
66+
|-------|------|---------|-------------|
67+
| `registry_type` | string | `file` | Registry backend (`file`, `sql`, etc.) |
68+
| `path` | string | — | Connection string or file path |
69+
| `mcp.enabled` | bool | `false` | Enable MCP (Model Context Protocol) on the REST registry server |
70+
71+
When `registry.mcp.enabled` is `true`, the REST registry server exposes registry
72+
metadata (entities, feature views, feature services) as MCP tool endpoints for
73+
LLM agents. Requires `feast[mcp]` to be installed.
74+
5275
## Providers
5376

5477
The `provider` field defines the environment in which Feast will execute data flows. As a result, it also determines the default values for other fields.

‎infra/feast-operator/api/v1/featurestore_types.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ type WorkerConfigs struct {
770770

771771
// RegistryServerConfigs creates a registry server for the feast service, with specified container configurations.
772772
// +kubebuilder:validation:XValidation:rule="self.restAPI == true || self.grpc == true || !has(self.grpc)", message="At least one of restAPI or grpc must be true"
773+
// +kubebuilder:validation:XValidation:rule="!has(self.mcp) || !self.mcp.enabled || (has(self.restAPI) && self.restAPI == true)", message="MCP requires restAPI to be true"
773774
type RegistryServerConfigs struct {
774775
ServerConfigs `json:",inline"`
775776

@@ -778,6 +779,11 @@ type RegistryServerConfigs struct {
778779

779780
// Enable gRPC registry server. Defaults to true if unset.
780781
GRPC *bool `json:"grpc,omitempty"`
782+
783+
// Mcp enables MCP (Model Context Protocol) on the REST registry server.
784+
// Requires restAPI to be true. Reuses the same McpConfig struct as the online store.
785+
// +optional
786+
Mcp *McpConfig `json:"mcp,omitempty"`
781787
}
782788

783789
// CronJobContainerConfigs k8s container settings for the CronJob

‎infra/feast-operator/api/v1/zz_generated.deepcopy.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎infra/feast-operator/bundle/manifests/feast-operator.clusterserviceversion.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ metadata:
135135
}
136136
]
137137
capabilities: Basic Install
138-
createdAt: "2026-05-04T03:44:24Z"
138+
createdAt: "2026-05-12T07:35:41Z"
139139
operators.operatorframework.io/builder: operator-sdk-v1.41.0
140140
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
141141
name: feast-operator.v0.63.0

‎infra/feast-operator/bundle/manifests/feast.dev_featurestores.yaml‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3061,6 +3061,31 @@ spec:
30613061
- error
30623062
- critical
30633063
type: string
3064+
mcp:
3065+
description: |-
3066+
Mcp enables MCP (Model Context Protocol) on the REST registry server.
3067+
Requires restAPI to be true.
3068+
properties:
3069+
enabled:
3070+
description: Enable the MCP server.
3071+
type: boolean
3072+
serverName:
3073+
description: MCP server name for identification.
3074+
Defaults to "feast-mcp-server".
3075+
type: string
3076+
serverVersion:
3077+
description: MCP server version string. Defaults
3078+
to "1.0.0".
3079+
type: string
3080+
transport:
3081+
description: MCP transport protocol.
3082+
enum:
3083+
- sse
3084+
- http
3085+
type: string
3086+
required:
3087+
- enabled
3088+
type: object
30643089
metrics:
30653090
description: Metrics exposes Prometheus-compatible
30663091
metrics for the Feast server when enabled.
@@ -9031,6 +9056,31 @@ spec:
90319056
- error
90329057
- critical
90339058
type: string
9059+
mcp:
9060+
description: |-
9061+
Mcp enables MCP (Model Context Protocol) on the REST registry server.
9062+
Requires restAPI to be true.
9063+
properties:
9064+
enabled:
9065+
description: Enable the MCP server.
9066+
type: boolean
9067+
serverName:
9068+
description: MCP server name for identification.
9069+
Defaults to "feast-mcp-server".
9070+
type: string
9071+
serverVersion:
9072+
description: MCP server version string. Defaults
9073+
to "1.0.0".
9074+
type: string
9075+
transport:
9076+
description: MCP transport protocol.
9077+
enum:
9078+
- sse
9079+
- http
9080+
type: string
9081+
required:
9082+
- enabled
9083+
type: object
90349084
metrics:
90359085
description: Metrics exposes Prometheus-compatible
90369086
metrics for the Feast server when enabled.

‎infra/feast-operator/config/crd/bases/feast.dev_featurestores.yaml‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3061,6 +3061,31 @@ spec:
30613061
- error
30623062
- critical
30633063
type: string
3064+
mcp:
3065+
description: |-
3066+
Mcp enables MCP (Model Context Protocol) on the REST registry server.
3067+
Requires restAPI to be true.
3068+
properties:
3069+
enabled:
3070+
description: Enable the MCP server.
3071+
type: boolean
3072+
serverName:
3073+
description: MCP server name for identification.
3074+
Defaults to "feast-mcp-server".
3075+
type: string
3076+
serverVersion:
3077+
description: MCP server version string. Defaults
3078+
to "1.0.0".
3079+
type: string
3080+
transport:
3081+
description: MCP transport protocol.
3082+
enum:
3083+
- sse
3084+
- http
3085+
type: string
3086+
required:
3087+
- enabled
3088+
type: object
30643089
metrics:
30653090
description: Metrics exposes Prometheus-compatible
30663091
metrics for the Feast server when enabled.
@@ -3255,6 +3280,9 @@ spec:
32553280
x-kubernetes-validations:
32563281
- message: At least one of restAPI or grpc must be true
32573282
rule: self.restAPI == true || self.grpc == true || !has(self.grpc)
3283+
- message: MCP requires restAPI to be true
3284+
rule: '!has(self.mcp) || !self.mcp.enabled || (has(self.restAPI)
3285+
&& self.restAPI == true)'
32583286
type: object
32593287
remote:
32603288
description: RemoteRegistryConfig points to a remote feast
@@ -9031,6 +9059,31 @@ spec:
90319059
- error
90329060
- critical
90339061
type: string
9062+
mcp:
9063+
description: |-
9064+
Mcp enables MCP (Model Context Protocol) on the REST registry server.
9065+
Requires restAPI to be true.
9066+
properties:
9067+
enabled:
9068+
description: Enable the MCP server.
9069+
type: boolean
9070+
serverName:
9071+
description: MCP server name for identification.
9072+
Defaults to "feast-mcp-server".
9073+
type: string
9074+
serverVersion:
9075+
description: MCP server version string. Defaults
9076+
to "1.0.0".
9077+
type: string
9078+
transport:
9079+
description: MCP transport protocol.
9080+
enum:
9081+
- sse
9082+
- http
9083+
type: string
9084+
required:
9085+
- enabled
9086+
type: object
90349087
metrics:
90359088
description: Metrics exposes Prometheus-compatible
90369089
metrics for the Feast server when enabled.
@@ -9231,6 +9284,9 @@ spec:
92319284
true
92329285
rule: self.restAPI == true || self.grpc == true
92339286
|| !has(self.grpc)
9287+
- message: MCP requires restAPI to be true
9288+
rule: '!has(self.mcp) || !self.mcp.enabled || (has(self.restAPI)
9289+
&& self.restAPI == true)'
92349290
type: object
92359291
remote:
92369292
description: RemoteRegistryConfig points to a remote feast

‎infra/feast-operator/config/samples/v1_featurestore_mcp.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ spec:
1717
serverVersion: "1.0.0"
1818
# transport can be "sse" (default) or "http"
1919
transport: sse
20+
registry:
21+
local:
22+
server:
23+
# MCP on the registry requires REST API to be enabled.
24+
restAPI: true
25+
mcp:
26+
enabled: true

0 commit comments

Comments
 (0)