mcp-near-bos-component-builder
v0.1.0
Published
MCP server for scaffolding BOS components and automating NEAR Social deployment
Maintainers
Readme
mcp-near-bos-component-builder
MCP server for building and deploying NEAR BOS (Blockchain Operating System) components.
It ships three core capabilities required by the job:
- BOS component scaffolding
- Multiple ready templates
- Deployment automation for NEAR Social (
social.near)
Features
bos_list_templates: discover built-in templatesbos_scaffold_component: generate project scaffold with source + scripts + configbos_deploy_component: generate NEAR Social payload/CLI command and optionally execute
Built-in templates:
minimaltoken-swap-widgetportfolio-card
Generated example scaffolds are included in:
examples/demo-minimalexamples/demo-token-swapexamples/demo-portfolio
Install
npm install -g mcp-near-bos-component-builderMCP configuration example (Claude Desktop)
Add this entry to your MCP config:
{
"mcpServers": {
"near-bos-builder": {
"command": "mcp-near-bos-component-builder"
}
}
}Or run from source:
{
"mcpServers": {
"near-bos-builder": {
"command": "node",
"args": ["/absolute/path/to/near-mcp-bos-component-builder/dist/index.js"]
}
}
}Tool reference
1) bos_list_templates
Lists available templates with descriptions/tags.
Input: none
2) bos_scaffold_component
Generates a ready-to-edit BOS project folder.
Input:
output_dir(required)component_name(required)template(minimal|token-swap-widget|portfolio-card, defaultminimal)account_id(optional)description(optional)
Output includes:
rootfiles[]componentPathdeployScriptPathdeployPowerShellPathwidgetId
Generated scaffold contains:
src/<component>.jsxbos.config.jsonscripts/generate-payload.mjsscripts/deploy.shscripts/deploy.ps1- local
README.md
3) bos_deploy_component
Creates deployment payload and command for NEAR Social publishing.
Input:
source_file(required)account_id(required)component_name(required)network(mainnet|testnet, defaultmainnet)contract_id(optional, defaultsocial.near)workdir(optional)execute(optional, defaultfalse)
Behavior:
- always writes
.deploy/<component>.<network>.payload.json - returns ready
near call ...command - if
execute=true, runs command and returns stdout/stderr/exit code
Local development
npm install
npm run build
npm testNEAR Social deployment notes
- Ensure
nearCLI is installed and authorized (near login). - Deploy uses
0.01NEAR deposit and300 Tgasdefaults. - Widget key format:
<account_id>/widget/<component_name>
Publish checklist
npm run build
npm test
npm publish --access publicLicense
MIT
