Content
# Type-Sync Bridge (type-sync-mcp)
It is a Model Context Protocol (MCP) server that natively extracts struct definitions using Rust's AST parsing (`syn` crate) and safely converts them to TypeScript interfaces locally. It is particularly powerful for hybrid application development using Svelte or Tauri.
## Notes for AI Agents
The optimal prompts and usage for this tool are described in [SKILL.md](./SKILL.md), so be sure to follow them.
## Features
- **Zero Hallucination**: Maps types using rigorous AST analysis, not just speculation.
- **Smart Detection of Serde Attributes**: Automatically detects settings such as `#[serde(rename_all="camelCase")]` and `#[serde(skip_serializing_if)]` to perfectly prevent type and naming discrepancies between the backend and frontend.
## Setup
### 0. Prerequisites
- **Rust build toolchain only** ([install with rustup](https://rustup.rs/))
*No pre-installation of other tools is required, as it has a built-in parsing engine!*
### 1. Installation (One-Command Installation)
You can install, build, and deploy it remotely from GitHub with a single command.
```powershell
cargo install --git https://github.com/adasima/type-sync-mcp
```
*(`type-sync-mcp.exe` will be automatically placed in `$HOME/.cargo/bin/`)*
### 2. Agent Configuration
#### Claude Desktop
Configuration file: `%APPDATA%\Claude\claude_desktop_config.json`
```json
"mcpServers": {
"type-sync-mcp": {
"command": "type-sync-mcp"
}
}
```
*(Make sure to run `cargo install --git https://github.com/adasima/type-sync-mcp --force` beforehand)*