NSTOK AI Software Factory MCP Server
OfficialProvides sandboxed Git repository management for NSTOK repositories, including status inspection, diffs, feature branch creation, conventional commits, and pull requests for human review.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NSTOK AI Software Factory MCP Server Analyze this PRD and create an app plan reusing existing features."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NSTOK AI Software Factory MCP Server (TypeScript)
An enterprise-grade Model Context Protocol (MCP) server implemented in TypeScript that powers the NSTOK AI Software Factory. It allows reasoning agents (such as Codex, Antigravity, or Claude) to construct production-ready NSTOK applications directly from PRDs by discovering and reusing existing ecosystem capabilities, UI components, database models, and templates.
šÆ Core Architectural Philosophy
SEARCH ā REUSE ā ADAPT ā CREATEThe system strictly enforces the principle: Never generate code from scratch if an existing asset can satisfy or be adapted to the requirement.
Reuse First: Prioritize existing business features (
Nstok-feature-*), UI components (Nstok-ui), and database models (Nstok-db).Template First: Applications start from
Nstok-app-template; features start fromNstok-feature-template.Knowledge Before Code: Understand architecture, dependencies, and patterns before mutating code.
Plan Before Mutation:
Analyze ā Plan ā Approve ā Implement ā Validate.Closed Knowledge Loop: Every newly generated application or feature enriches the central Knowledge Graph (
Nstok-knowledge-master).
Related MCP server: Vibe Coder MCP Server
šļø High-Level Architecture
āāāāāāāāāāāāāāāāāāāāāāāāā
ā CODEX ā
ā User / PRD / Task ā
āāāāāāāāāāāāā¬āāāāāāāāāāāā
ā MCP (Stdio / SSE)
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā NSTOK MCP SERVER ā
ā ā
ā ⢠PRD Analysis ā
ā ⢠Knowledge Graph & Vector ā
ā ⢠Feature & UI Discovery ā
ā ⢠Template Orchestrator ā
ā ⢠Architecture Validator ā
ā ⢠Sandboxed Git Management ā
āāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāā
ā ā ā
ā¼ ā¼ ā¼
āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā
ā Knowledge ā ā Repositories ā ā Job Runner ā
ā Master ā ā Ecosystem ā ā (Worker) ā
ā ā ā ā ā ā
ā Graph + RAG ā ā UI, DB, Apps ā ā Test / Lint ā
ā & Metadata ā ā & Features ā ā Typecheck ā
āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāš¦ Project Structure
nstok-mcp/
āāā src/
ā āāā index.ts # CLI entrypoint (Stdio transport)
ā āāā server.ts # MCP server instance & tool registration
ā ā
ā āāā config/
ā ā āāā environment.ts # Environment variables, security allowlists, timeouts
ā ā
ā āāā domain/ # Core domain models & graph types
ā ā āāā app.ts # Application entity
ā ā āāā feature.ts # Feature & capability interfaces
ā ā āāā component.ts # UI component definitions
ā ā āāā database.ts # DB entities & relations
ā ā āāā repository.ts # Repository metadata & graph relationships
ā ā āāā plan.ts # Structured AppPlan & FeaturePlan schemas
ā ā āāā graph.ts # Graph nodes, edges & traversal results
ā ā
ā āāā services/ # Business logic layers
ā ā āāā knowledge.service.ts # Hybrid search & graph traversal engine
ā ā āāā repository.service.ts # Sandboxed workspace operations & template cloning
ā ā āāā generation.service.ts # PRD analysis & Reuse Decision Engine
ā ā āāā git.service.ts # Git branching, commit, diff & PR workflow
ā ā āāā validation.service.ts # Architecture validator (UI-001, DB-001) & jobs
ā ā āāā audit.service.ts # Audit logging for tracking operations
ā ā
ā āāā tools/ # MCP Tool definitions
ā ā āāā knowledge/ # search_knowledge, find_features, find_ui_components, etc.
ā ā āāā generation/ # analyze_prd, create_app_plan, create_app, etc.
ā ā āāā repository/ # read_file, write_file, search_repo_code, git ops
ā ā āāā validation/ # validate_architecture, run_tests, update_knowledge
ā ā
ā āāā data/
ā āāā seed.ts # Pre-seeded NSTOK ecosystem metadata & graph
ā
āāā tests/
ā āāā knowledge.test.ts # Discovery & graph traversal tests
ā āāā generation.test.ts # PRD analysis & planning tests
ā āāā validation.test.ts # Architecture validation tests
ā āāā server.test.ts # Server instantiation & tool registration tests
ā
āāā package.json
āāā tsconfig.json
āāā README.mdš ļø Tool Catalog
1. Discovery & Knowledge Tools
Tool | Description |
| Hybrid keyword and semantic search across knowledge assets, features, UI, and DB entities. |
| Discover reusable business features ( |
| Find reusable design system components in |
| Search database schemas and entity definitions in |
| Search established architectural patterns, code conventions, and guidelines in NSTOK. |
| Retrieve full repository metadata, contained assets, and graph edges for any NSTOK repo. |
| Deep-dive feature context (routes, UI/DB dependencies, and graph traversal). |
| Retrieve full composition details and graph relations for an application. |
2. Planning Tools
Tool | Description |
| Analyze raw PRD text, extract required capabilities, match reusable vs missing assets, and calculate reuse score. |
| Generate a structured application implementation plan following |
| Generate a structured feature development plan scaffolded from |
3. Generation & Template Tools
Tool | Description |
| Clone |
| Clone |
| Link and integrate an existing or new feature module into an application. |
| End-to-end scaffolding orchestrator: clones template, wires reused features, creates missing features, and outputs app composition. |
| Scaffold a new feature module from template when missing capabilities are required. |
4. Repository & Git Tools
Tool | Description |
| Safely read file content within an NSTOK repository with audit logging. |
| Safely write or update a file within an NSTOK repository with audit logging. |
| Search for code snippets and symbols within an NSTOK repository. |
| Get git status, active branch, and modified files for a repository. |
| Inspect git diff before committing changes. |
| Create a feature branch ( |
| Create a structured commit with conventional commit message. |
| Propose a Pull Request to |
5. Validation & Knowledge Loop Tools
Tool | Description |
| Enforce architecture rules: |
| Run unit and integration test suites in an isolated environment. |
| Run linting and static analysis on a repository. |
| Run project build and TypeScript compilation. |
| Feed newly generated application or feature metadata back into |
ā” Quickstart & Installation
Prerequisites
Node.js >= 18 (Tested on Node.js 24)
npm >= 9
1. Installation
git clone <repository_url> nstok-mcp
cd nstok-mcp
npm install2. Build
npm run build3. Run Tests
npm test4. Run Development Server
npm run devš Configuration for MCP Clients
Codex / Antigravity / Claude Desktop Configuration
Add the following snippet to your mcp_config.json or claude_desktop_config.json:
{
"mcpServers": {
"nstok-software-factory": {
"command": "node",
"args": ["<PATH_TO_NSTOK_MCP>/dist/index.js"],
"env": {
"NODE_ENV": "production",
"ENABLE_AUDIT_LOG": "true"
}
}
}
}š Example End-to-End Workflow
When a developer requests:
"Codex, please build
nstok-app-wbased on this PRD: POS with authentication, product catalog, inventory, checkout, and daily sales report."
The MCP server coordinates the following pipeline:
1. analyze_prd("Nstok-app-w", PRD)
āāā Extracted: auth, product, inventory, checkout, payment, sales-report
āāā Reused: Nstok-feature-a, Nstok-feature-b, Nstok-feature-c, checkout-payment
āāā Missing: sales-report (Scaffold Nstok-feature-sales-report)
āāā Reuse Score: 80%
2. create_app_plan("Nstok-app-w", PRD)
āāā Generates structured implementation plan
3. create_branch("Nstok-app-w", "feature/ai/create-nstok-app-w")
4. create_app("Nstok-app-w", PRD)
āāā Clones Nstok-app-template
āāā Links reused features
āāā Scaffolds Nstok-feature-sales-report from Nstok-feature-template
5. validate_architecture("Nstok-app-w")
āāā Checks UI-001 (all UI from Nstok-ui) and DB-001 (all schema from Nstok-db)
6. run_tests("Nstok-app-w") & run_build("Nstok-app-w")
7. create_commit("Nstok-app-w", "feat: initial scaffolding for nstok-app-w")
8. create_pull_request("Nstok-app-w", "feat: nstok-app-w implementation", summary)
9. update_knowledge(...)
āāā Central graph updated so future apps can reuse Nstok-feature-sales-report!š Security Model
Repository Allowlist: Enforces
Nstok-*repository naming pattern.Path Traversal Protection: All filesystem reads and writes are sandboxed to the active workspace.
Audit Trail: Every mutation (
write_file,create_branch,create_commit,create_pull_request) is appended toaudit.log.jsonl.Command Allowlist: Strict restrictions on executable commands (
node,npm,npx,git,tsc).
š License
MIT Ā© NSTOK Engineering
Available Tools
29 toolsadd_feature_to_appB
Integrate and link an existing or newly created feature into an application workspace.
Inputs: appName (required), featureRepository (required).
analyze_prdB
Analyze a PRD text, extract required capabilities, match reusable vs missing assets, and compute reuse score.
Inputs: prd (required), appName (required).
clone_app_templateB
Clone the standard baseline Nstok-app-template to initialize a new application workspace.
Inputs: appName (required), templateName.
clone_feature_templateC
Clone the standard Nstok-feature-template to initialize a new feature repository.
Inputs: description (required), featureName (required), templateName.
create_appC
Orchestrate end-to-end application generation from PRD, prioritizing feature reuse and template baselines.
Inputs: prd (required), name (required), template.
create_app_planC
Generate a structured application implementation plan following the SEARCH -> REUSE -> ADAPT -> CREATE principle.
Inputs: prd (required), appName (required), template.
create_branchC
Create a new feature branch (e.g. feature/ai/create-nstok-app-w) following NSTOK git workflow.
Inputs: branchName (required), repository (required).
create_commitC
Create a structured git commit with a conventional commit message.
Inputs: message (required), repository (required), files.
create_featureB
Scaffold a new feature module from Nstok-feature-template when missing capabilities are required.
Inputs: featureName (required), capabilities (required), description.
create_feature_planC
Generate a structured feature development plan scaffolded from Nstok-feature-template.
Inputs: featureName (required), capabilities (required).
create_pull_requestB
Propose a Pull Request to main branch for human review and approval.
Inputs: body (required), title (required), repository (required), targetBranch.
find_db_entitiesC
Search database schemas and entity definitions in Nstok-db (Product, Inventory, Sale, User, etc.).
Inputs: query.
find_existing_patternsC
Search established architectural patterns, code conventions, and guidelines in NSTOK.
Inputs: query, category.
find_featuresB
Discover reusable business features from the NSTOK ecosystem (e.g. Nstok-feature-a, b, c) matching capabilities or keywords.
Inputs: query, capabilities.
find_ui_componentsB
Find reusable design system UI components in Nstok-ui (DataTable, ProductTable, SearchInput, Button, etc.).
Inputs: query, category.
get_app_contextB
Get full application architecture and composition details for a generated or production app.
Inputs: appName (required).
get_feature_contextA
Get deep-dive context for a specific feature, including capabilities, routes, UI/DB deps, and graph traversal.
Inputs: featureId (required).
get_project_contextC
Get full repository context, contained assets, and graph relationships for any NSTOK repo.
Inputs: repositoryName (required).
git_diffB
Inspect git diff in a repository before committing mutations.
Inputs: repository (required), staged.
git_statusB
Get git status, active branch, and modified files for a repository.
Inputs: repository (required).
read_fileB
Safely read a file inside an NSTOK repository with audit logging and sandbox isolation.
Inputs: path (required), repository (required).
run_buildC
Run build and TypeScript type-checking for an application or feature.
Inputs: repository (required).
run_lintC
Run linting and static analysis on an NSTOK repository.
Inputs: repository (required).
run_testsC
Run unit and integration test suites in an isolated environment.
Inputs: repository (required), testFilter.
search_knowledgeC
Search across all NSTOK knowledge assets, features, UI components, DB entities, patterns, and repositories using hybrid search.
Inputs: query (required), type, repository.
search_repo_codeC
Search for code snippets, symbol definitions, and text within an NSTOK repository.
Inputs: query (required), repository (required), extensions.
update_knowledgeC
Feed newly generated application or feature metadata back into Nstok-knowledge-master.
Inputs: id (required), name (required), type (required), repository (required), +6 more.
validate_architectureC
Validate that code obeys NSTOK architectural rules (UI-001, DB-001, ARCH-001, DEP-001).
Inputs: repository (required).
write_fileB
Safely write or update a file inside an NSTOK repository with audit logging.
Inputs: path (required), content (required), repository (required), overwrite.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 29 tools
Several tools have overlapping purposes: search_knowledge, find_features, find_ui_components, find_db_entities, find_existing_patterns, and search_repo_code all perform search-like operations. Similarly, create_app_plan and create_feature_plan both generate plans. However, descriptions provide some distinction through specific resource types and workflows.
Most tools follow a verb_noun pattern (e.g., search_knowledge, find_features, create_app_plan, clone_app_template). Minor deviations like get_project_context and run_tests are still readable and consistent with the pattern. Overall naming is predictable and consistent.
With 29 tools, the set is heavy and may overwhelm an agent. The high count is somewhat justified by the complex domain of software generation and knowledge management, but several tools appear redundant (e.g., multiple find_ tools, multiple create_plan tools), suggesting over-scoping.
The surface covers search, planning, creation, file operations, git workflow, validation, testing, and knowledge updating, which is comprehensive for a software factory. Minor gaps might include direct code editing tools or more granular git operations (e.g., merge, delete branch), but core workflows appear covered.
Related MCP Connectors
Turn PRDs and product ideas into structured specs so coding agents build your intent, not theirs.
Git-backed platform for skills, tools, and context for AI agents
Register, deploy, review, and govern internal applications built with coding agents.
Intelligent product canvas: iterate on your product's design with your coding agent, synced to code.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to research topics, generate product requirements and user stories, map codebases, curate context, scaffold full-stack starter projects, and run multi-step development workflows.69 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to research, plan, generate requirements, map codebases, curate context, manage tasks, scaffold projects, and run multi-step software development workflows.69 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to conduct research, plan projects, generate PRDs, user stories and task lists, scaffold full-stack starter kits, map codebases, curate context, and execute multi-step development workflows.69 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to register, self-assign and coordinate tasks, track progress, review work, and manage GitHub Projects v2 with AI-powered PRD generation, sprint planning, issue triage, and PRD-to-issues pipelines backed entirely by GitHub-native storage.1,038 npmMIT