Blueprint
README.md
<img width="1574" height="706" alt="rty" src="https://github.com/user-attachments/assets/39a04470-ad3b-4dee-9e48-ae768bfcd198" />
Generated in 4 lines.
# 📖Blueprint
**Blueprint** is a local, secure, token-efficient MCP server that generates code directly on your machine. It uses a schema-driven approach so the AI isn't rewriting the same 500 lines of HTML from scratch every time. At its core is a simple declarative syntax that allows the AI assistant to write to a .txt file & run node generate.js to generate files locally.
The **generate.js** reads the .txt files from **blueprint/**, parses its syntax, matches it with components from the **schema/** library, and uses Node.js's `fs.writeFileSync()` to write generated HTML/CSS/JS directly to the filesystem in the sandbox.
The write tool does surgical, column-accurate string replacement while keeping indentation, with exact line/column feedback.
Blueprint is local. The code runs on your machine, and nothing is sent to a third party. There is no vendor lock-in, cloud dependency, or data leaving your environment.
**Current Development:**
- Javascript-specific components
- Plans to add React support next
- Adding common web patterns to component library
- Ideas for backend patterns coming
- Docker support coming
## Dependencies
- **@modelcontextprotocol/sdk** - ^0.6.0
- **acorn** - ^8.15.0
- **acorn-walk** - ^8.3.4
- **chokidar** - ^4.0.3
- **dotenv** - ^17.2.3
## MCP Server
- Runs automatically on port 3002.
## Filesystem Tools
- **read** - view files, schema, and generated output. Uses absolute paths or relative path from the base directory.
- **write** - writes files in overwrite mode or string replace mode. This will either generate new file or find and replace exact line and column with whitespace normalization to preserve indentation.
- **search** - searches using queries, exact line number, or returns whole functions using an AST parser.
- **execute** - run the generate.js command, list contents of directories, or list components.
- **read_errors** - read browser error logs from the browser formatted nicely.
## Read
- **filename** (required)
- **target** (required)
- **file, index, or generated.**
## Search
All potential search parameters are false by default and can be left off, except for filename.
- **filename** (required)
- **query** - text-based search.
- **line** - jump to exact line of file.
- **context** - lines of context to provide around any given search.
- **case_sensitive** - case sensitivity of result.
- **max_results** - max results for text-based search. default: 10.
- **function_search** - finds and returns complete functions using the Acorn parser.
- **list_functions** - lists all functions, classes, and methods in file, no query needed.
- **discovery** - This is the AI's tools for exploring the schema library. Returns the component object with html, params, CSS, and JS. If not found, will list all available components by name.
## Execute
- **generate**
- Compiles blueprint files to HTML/CSS/JS. Without filename parameter, generates all blueprints in **blueprints/** folder. With filename parameter (e.g., "basic-projects.txt"), generates only that specific blueprint file.
- **list**
- Show files in given directory. Requires directory name.
- **list_components**
- Show names of all components, flows, and blueprints.
## Read_Errors
Finds the file browser_errors.jsonl in sandbox/ and returns using any combination of categories the AI specifies.
**Available filters: timestamp, page, type, message, source, line, column, stack, url, UserAgent**
## Blueprint Syntax
All features except page: (name) and base blueprint template can be left off.
```
page:basic-projects;
blueprint:test/blank;
hero; title="My Projects";
project-cards;
```
## Print
**prt.js** is an automatic file versioning system that saves backups to the **versions/** folder with **/YYYY-MM-DD/H-MM-SS-AM-filename/** timestamping. It's intended to save directory files safely in an AI-assisted environment where the AI will make mistakes constantly. It runs automatically when the MCP server starts and saves using SHA-256 hashing to avoid duplicates.
## Local Installation
**Prerequisites: Node.js (version 16 or higher recommended)**
**Clone the repository:**
```bash
git clone https://github.com/yourusername/Blueprint.git
cd Blueprint
```
**Install dependencies:**
```bash
npm install
```
**Verify installation:** Run node server.js in the Blueprint directory. If it starts without errors, all is well.
## Setup with Claude
**Note:** Claude Desktop the app, not Claude in the browser.
1. Locate your Claude Desktop config file:
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
2. Add Blueprint as an MCP server:
```json
{
"mcpServers": {
"blueprint": {
"command": "node",
"args": ["C:\\Users\\YourName\\Desktop\\Blueprint\\server.js"]
}
}
}
```
3. Replace `C:\\Users\\YourName\\` with your actual Blueprint directory path. This ties the MCP server to Claude Desktop.
4. Restart Claude Desktop. Blueprint will automatically start running on port 3002.
5. Blueprint tools will now be available in your Claude conversations.
**Note:** If testing changes to the MCP server, you will need to completely close Claude Desktop from the system tray. The server Node.js process can get stuck sometimes, so you may need to manually kill it with taskkill /f /im node.exe in Command Prompt before restarting Claude Desktop.
## Development Status & Safety Notice
**Blueprint** is a work in progress -- file system access is currently unrestricted, so use at your own risk. Docker sandboxing will be added at a later stage in development for stronger security and resource limits.
**Do not deploy Blueprint in production or use with sensitive information.**
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo recent community issues