@base-works/mcp (0.2.0)
Installation
@base-works:registry=https://git.muddlab.com/api/packages/ahmadsholehin/npm/npm install @base-works/[email protected]"@base-works/mcp": "0.2.0"About this package
@base-works/mcp
Optional local Model Context Protocol transport
over @base-works/intelligence. It lets a compatible coding-agent host query a
generated BaseWorks application's installed components, patterns, semantic
slots, copied Stack capabilities, and bounded source locations.
The package contains no catalogue, ranking, validation, or source-analysis
logic of its own. The Intelligence API is authoritative, the base-works CLI
remains the universal interface, and removing MCP removes no capability.
Run
Install this package only when the project owner has chosen an MCP-capable host, then configure that host to launch the server from the generated-project root:
pnpm exec base-works-mcp
The server uses local stdio only. Standard output is reserved for MCP messages; diagnostics go to standard error. It exposes no HTTP listener, accepts no project-root argument from a model, and uses the process working directory as the project trust boundary.
Tools
| Tool | Intelligence operation |
|---|---|
search_components |
Federated catalogue search |
describe_component |
Exact compact catalogue record |
find_patterns |
Source-backed pattern discovery |
find_compatible |
Semantic-slot compatibility |
locate_implementation |
Bounded implementation ranges from the static source graph |
describe_platform_capability |
Exact copied Stack capability and its evidence |
validate_composition |
Static slot, cardinality, status, and availability checking |
All seven tools are read-only, bounded, and return structured JSON plus a JSON text fallback. Search first, describe only relevant IDs, and locate source only when implementation inspection is necessary. Tools guide ordinary TypeScript and React composition; they do not generate, edit, render, or execute project code.
Programmatic host
import { createBaseWorksMcpServer } from "@base-works/mcp";
const server = createBaseWorksMcpServer({ cwd: process.cwd() });
The host owns transport connection and lifecycle. The public package also exports the fixed tool-name list and the schema-context measurement helper used by repository tests.
Dependencies
Dependencies
| ID | Version |
|---|---|
| @base-works/intelligence | ^0.2.0 |
| @modelcontextprotocol/server | ^2.0.0 |
| zod | ^4.3.0 |
Development Dependencies
| ID | Version |
|---|---|
| @base-works/cli | ^0.2.0 |
| @modelcontextprotocol/client | ^2.0.0 |
| @types/node | ^24.10.0 |