xai-mcp-server
by Wolfe-Jam
Overview
A Rust-native MCP server for Foundational AI-context Format (FAF), providing AI-Readiness scoring and bi-directional synchronization for AI agents to understand project context.
Installation
cargo run --releaseEnvironment Variables
- SUPABASE_URL
- SUPABASE_SERVICE_KEY
- RESEND_API_KEY
- STRIPE_SECRET_KEY
- STRIPE_WEBHOOK_SECRET
Security Notes
The core Rust MCP server (`src/main.rs`) operates over `stdin`/`stdout` JSON-RPC, limiting direct network attack surface. Its exposed tools (`faf_score_aligned`, `bi_sync`) take structured, basic types (numbers, strings), making the Rust component itself relatively robust against common injection attacks. However, the overall project includes a SvelteKit UI with API endpoints (`svelte-ui/src/routes/api/`) that introduce significant vulnerabilities: 1. **Stripe Webhook (`stripe-webhook/+server.ts`):** Critically, the webhook signature is read (`request.headers.get('stripe-signature')`) but *not verified* against `STRIPE_WEBHOOK_SECRET` before processing payment-related events (`checkout.session.completed`, `customer.subscription.updated`, `customer.subscription.deleted`). This allows an attacker to send forged events, potentially leading to unauthorized license generation, status changes, or other financial fraud. 2. **Subscriber Storage (`subscribe/+server.ts`):** The endpoint writes user email data to a local JSON file (`data/subscribers.json`) using `fs.writeFile` with `process.cwd()`. While less critical in a containerized environment like Vercel, this pattern can be susceptible to path traversal attacks if `process.cwd()` is manipulated or if data input can construct malicious paths. 3. **Turbo Analyze (`turbo-analyze/+server.ts`):** This endpoint accepts `fileContent` and `fileName`, writes them to a temporary file (`tmpdir()`) on the server, and then processes the file using external dependencies (`faf-cli`, `yaml`). This introduces potential risks from vulnerabilities in these third-party libraries (e.g., YAML parsing bombs for DoS, or arbitrary code execution if underlying parsers are exploited). The use of `tmpdir()` mitigates some local file system risks but not parser-level vulnerabilities. No `eval` or explicit `unsafe` blocks were found in the Rust code. Overall, the unverified Stripe webhook is a critical flaw that compromises the system's payment and licensing integrity.
Similar Servers
nuxt-mcp-dev
This server provides development context and real-time insights from Vite/Nuxt applications to AI models via a Model Context Protocol (MCP) server.
tmcp
A server implementation for the Model Context Protocol (MCP) to enable LLMs to access external context and tools.
shadcn-svelte-mcp
Provides real-time access to shadcn-svelte component documentation, Bits UI API details, and Lucide Svelte icon search via an MCP server for AI-powered code editors and CLIs.
mcp-framework
A Rust framework for building AI agents with built-in Model Context Protocol (MCP) support, multi-LLM integration, and a web-based inspector for debugging.