Skip to content

feat: v1.3 — HTTP/REST Transport + Auth#15

Merged
devwhodevs merged 10 commits intomainfrom
feature/v1.3-http-rest
Mar 26, 2026
Merged

feat: v1.3 — HTTP/REST Transport + Auth#15
devwhodevs merged 10 commits intomainfrom
feature/v1.3-http-rest

Conversation

@devwhodevs
Copy link
Copy Markdown
Owner

Summary

  • New module: http.rs — axum-based HTTP REST API running alongside MCP stdio
  • 20 REST endpoints mirroring all 19 MCP tools + update-metadata backward compat
  • API key autheg_ prefixed keys with read/write permission levels via Authorization: Bearer header
  • Rate limiting — configurable per-key token bucket (requests/minute), 429 with Retry-After
  • CORS — configurable allowed origins for web-based agents (ChatGPT Actions ready)
  • Graceful shutdown — CancellationToken coordinates MCP + HTTP + watcher lifecycle
  • MCP resilience — HTTP stays alive even when MCP stdio has no stdin (e.g., running HTTP-only)
  • CLI: engraph serve --http [--port 3000] [--host 127.0.0.1] [--no-auth]
  • Key management: engraph configure --add-api-key/--list-api-keys/--revoke-api-key
  • Config: new [http] section with port, host, rate_limit, cors_origins, api_keys

Stats

Metric Before After
Modules 23 24
Tests 361 385
Clippy warnings 0 0
New deps axum, tower-http, tower, rand, tokio-util

Test plan

  • cargo test --lib — 385 pass
  • cargo clippy -- -D warnings — 0 warnings
  • cargo fmt --check — clean
  • Live vault: HTTP server starts alongside MCP
  • Health check endpoint returns 200
  • Vault map via HTTP with auth — returns folders/tags
  • Search via HTTP — returns results with confidence %
  • Health report — returns orphans/file counts
  • Unauthorized request — 401 with error JSON
  • MCP transport failure — HTTP stays alive
  • API key create/list/revoke via CLI
  • --no-auth mode works on 127.0.0.1

@devwhodevs devwhodevs merged commit 0362525 into main Mar 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant