mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-12 01:45:14 +02:00
Project 14 built-in operations as MCP tools over the /mcp endpoint: health,
snapshot, schema_get, branches_list, commits_list, commits_get, graphs_list,
query, mutate, ingest, branches_create, branches_delete, branches_merge,
schema_apply. Each tool reuses the exact do_* / run_query / run_mutate path
(and the exact Cedar action) its REST route enforces, so there is no new
business logic and no second authorization surface.
- list_tools is Cedar-filtered: a tool is listed only if the actor's policy
permits its action (a policy-engine error propagates; a denial hides).
- call_tool enforces the same gate, masks a denied or unknown tool identically
("unknown tool: <name>", deny == missing), and classifies engine failures as
isError tool results (4xx/409) vs JSON-RPC errors (5xx) per the 2025-11-25
spec split.
- Tool annotations set readOnlyHint / destructiveHint / openWorldHint
explicitly (rmcp defaults destructive + open_world to true).
- The actor and graph handle are read from the request extensions the
bearer/handle middleware attached, threaded through rmcp's RequestContext
(RFC-003 §5.8); a multi-graph tool call resolves the per-request graph for
free.
- Bound MCP request bodies with tower-http RequestBodyLimitLayer at the ingest
limit: rmcp reads the body directly, so axum's DefaultBodyLimit does not
cover /mcp.
Tests (tests/server.rs, 11 MCP cases): tools/list contents + Cedar filtering
by policy, a snapshot read and a mutate write end to end through the extension
passthrough, masked deny, malformed-query isError, unknown-tool JSON-RPC error,
and the read/write annotation hints. docs/user/server.md deferred to the docs
phase per the RFC-003 rollout.
Co-Authored-By: Claude <noreply@anthropic.com>
53 lines
1.9 KiB
TOML
53 lines
1.9 KiB
TOML
[package]
|
|
name = "omnigraph-server"
|
|
version = "0.6.1"
|
|
edition = "2024"
|
|
description = "HTTP server for the Omnigraph graph database."
|
|
license = "MIT"
|
|
repository = "https://github.com/ModernRelay/omnigraph"
|
|
homepage = "https://github.com/ModernRelay/omnigraph"
|
|
documentation = "https://docs.rs/omnigraph-server"
|
|
|
|
[[bin]]
|
|
name = "omnigraph-server"
|
|
path = "src/main.rs"
|
|
|
|
[features]
|
|
default = []
|
|
# Enables the AWS Secrets Manager bearer-token source. Off by default — on-prem
|
|
# and local-dev builds don't pay the AWS SDK compile cost.
|
|
aws = ["dep:aws-config", "dep:aws-sdk-secretsmanager"]
|
|
|
|
[dependencies]
|
|
omnigraph = { package = "omnigraph-engine", path = "../omnigraph", version = "0.6.1" }
|
|
omnigraph-compiler = { path = "../omnigraph-compiler", version = "0.6.1" }
|
|
omnigraph-policy = { path = "../omnigraph-policy", version = "0.6.1" }
|
|
axum = { workspace = true }
|
|
clap = { workspace = true }
|
|
color-eyre = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
tokio = { workspace = true }
|
|
serde_yaml = { workspace = true }
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
tower-http = { workspace = true, features = ["limit"] }
|
|
utoipa = { workspace = true }
|
|
futures = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
subtle = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
arc-swap = { workspace = true }
|
|
dashmap = "6"
|
|
regex = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
aws-config = { version = "1", optional = true, default-features = false, features = ["rustls", "rt-tokio", "credentials-process", "sso"] }
|
|
aws-sdk-secretsmanager = { version = "1", optional = true, default-features = false, features = ["rustls", "rt-tokio"] }
|
|
rmcp = { version = "1.7.0", default-features = false, features = ["server", "transport-streamable-http-server"] }
|
|
|
|
[dev-dependencies]
|
|
tempfile = { workspace = true }
|
|
tower = { workspace = true }
|
|
serial_test = "3"
|
|
lance = { workspace = true }
|
|
lance-index = { workspace = true }
|