Node In Layers MCP Server package

Node In Layers MCP Server package

mcp-server-node-in-layers•bynode-in-layers

A Node In Layers package used to build MCP servers that expose domains, features, and model CRUD operations as MCP tools for AI discovery and execution.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Automatically exposes features and model CRUDs as MCP tools unless they are specifically hidden.
  • •Organizes the MCP tool surface by domain and then by features and models, with tools to list domains, list features, describe a feature, and execute a feature.
  • •Offers a flat mode in which each feature function is exposed as its own MCP tool and the navigation and model CRUD tools are omitted.
  • •Supports hiding domains, specific feature or model paths, or all model CRUD tools from the exposed tool surface.

BEST FOR

  • •Teams building an MCP server around an existing domain-layered Node In Layers system and wanting its features and models callable by AI.
  • •Systems with many tools that need an organized, self-describing MCP tool surface intended to aid AI tool selection and formatting.

ABOUT MCP-SERVER-NODE-IN-LAYERS

Node In Layers MCP Server package is cataloged as an MCP server attributed to node-in-layers. A Node In Layers package used to build MCP servers that expose domains, features, and model CRUD operations as MCP tools for AI discovery and execution. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Node In Layers MCP Server package are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can the MCP server be run standalone or mounted into an existing Express app?

Yes. Use start when the MCP server is the main process, or getApp when you want to mount the MCP app in an existing Express app.

Can custom MCP tools be added alongside the built-in tools?

Yes. Custom tools can be added with addTool and are exposed alongside the built-in domain, feature, and model tools.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 66a3d2baecc6 · 采集于 2026-11-13 11:44:58 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP Server - A Node In Layers Package for building MCP Servers

A Node In Layers package for building MCP servers. It exposes your domains, features, and model CRUDs as MCP tools so an AI can discover and call them. Companion library: @node-in-layers/mcp-client (shared protocols for features, models, and tools).

This system is self-describing and automatically organizes tools into an optimized and efficient system, that reduces the total number of tools. This system also automatically includes prompting and examples that greatly increase AI tool selection and formatting accuracy in systems, to include in systems with hundreds, if not thousands of tools.

API Docs


How To Use This

1. Install

npm install @node-in-layers/mcp-server

2. Configure

// /config.base.mts
import { CoreNamespace } from '@node-in-layers/core'
import { McpNamespace, HttpConnection } from '@node-in-layers/mcp-server'

export default () => ({
  systemName: 'your-system-name',
  [CoreNamespace.root]: {
    /* 1. Add to the Apps List */
    apps: await Promise.all([
      // Other Very Early Modules
      //import('@node-in-layers/data/index.js'),

      // Insert Here
      import('@node-in-layers/mcp-server/index.js'),

      // Insert Your Domains Here
    ]),
    /* 2. Add mcp layer. NOTE: You must have entries between features and mcp */
    layerOrder: ['services', 'features', ['entries', 'mcp']], // can also be ['entries', 'express', 'mcp']
  },
  /* 3. Add Mcp Server Configurations */
  [McpNamespace]: {
    // Required: The configuration of the server itself.
    server: {
      connection: {
        type: 'http',
        url: 'http://localhost',
        port: 4000,
      } as HttpConnection,
    },
    // Optional arguments go here.
  },
})

3. What's Now Available

  1. Features are automatically exposed (unless specifically hidden)
  2. Model CRUDS are automatically exposed (unless specifically hidden)
  3. An mcp layer is now available to features, and includes additional capabilities in the namespace: McpNamespace. (Explained later)

4. Run The Server

You can very easily run the server in a simple script by doing the following:

import { McpNamespace } from '@node-in-layers/mcp-server'
const system: System = (await core.loadSystem<SystemConfig>({
  environment,
})) as any // "System" is your typed System object.
await system.mcp[McpNamespace].start(context)

Example with ./bin/mcp_server.mts file (feel free to copy paste)

#!/usr/bin/env tsx

import esMain from 'es-main'
import { ArgumentParser } from 'argparse'
import * as core from '@node-in-layers/core'
import { McpNamespace } from '@node-in-layers/mcp-server'
import { SystemConfig } from '../src/types.js'
import { System } from '../src/system/types.js'

const _parseArguments = () => {
  const parser = new ArgumentParser({
    description: 'Starts the MCP server.',
  })
  parser.add_argument('environment', {
    help: 'The environment for the service.',
  })
  return parser.parse_args()
}

const startServer = async (environment: string) => {
  const system = (await core.loadSystem<SystemConfig>({
    environment,
  })) as unknown as System
  if (system.config[McpNamespace].server.connection.type === 'http') {
    console.info(
      `Starting MCP server on ${system.config[McpNamespace].server.connection.port}...`
    )
  }
  process.on('SIGINT', async function () {
    await system.services['@node-in-layers/data'].cleanup()
    process.exit()
  })

  await system.mcp[McpNamespace].start(system)
}

if (esMain(import.meta)) {
  const args = _parseArguments()
  startServer(args.environment).catch((error: any) => {
    console.error('Failed to start the server:', error)
    process.exit(1)
  })
}

Background and How This Works

MCP interface (domains, features, models)

The MCP tool surface is organized by domain, then features and models:

  • Domains — The AI can list domains (list_domains), then for each domain list features (list_features) and (if present) list models. Only domains that have features or models exposed will be shown.
  • Features — For a given domain/feature, the AI can get the schema (describe_feature) and run it (execute_feature).
  • Models — For a given domain/model, the AI can get the schema and run save, retrieve, delete, search, bulkInsert, bulkDelete.

The documentation returned to the AI (including what START_HERE returns) is configurable. By default the server provides instructions so the AI will:

  1. List domains.
  2. List features (and models) within a domain.
  3. Describe a feature or model when it needs the schema.
  4. Execute features and model CRUD operations with the right arguments.

So the AI learns the shape of the system from the configurable “start here” and default system entries, then uses the tools to list/describe/execute as needed.

Flat mode (feature tools only)

If you want a very small “front-and-center” tool surface (for example: a system with a single function), you can run the MCP server in flat mode.

In flat mode the server:

  • Exposes each feature function as its own MCP tool named domain_featureName.
  • Does not expose the Node-in-Layers navigation tools (START_HERE, list_domains, list_features, describe_feature, execute_feature).
  • Does not expose any model CRUD tooling (list_models, describe_model, save, retrieve, delete, search, bulkInsert, bulkDelete).
  • Still exposes any tools you explicitly register via addTool() / addAnnotatedFunction().

Enable it with:

// /config.base.mts
import { McpNamespace } from '@node-in-layers/mcp-server'

export default () => ({
  // ...
  [McpNamespace]: {
    mode: 'flat',
    server: { connection: { type: 'cli' } },
  },
})

Hiding components

You can restrict what is visible (as well as executable) to callers (e.g. certain domains, features, or all model CRUDs) so only the intended surface is exposed.

Configure hideComponents under the MCP config:

  • paths — Dot-separated paths to hide, e.g. myDomain, myDomain.myFeature, myDomain.cruds, myDomain.cruds.MyModel.
  • domains — Domain names to hide entirely (they won’t appear in list_domains).
  • allModels — If true, no model CRUD tools are exposed.

Everything not hidden remains available. See Configuration details for the full shape.

Example (partial config):

// /config.base.mts
import { McpNamespace } from '@node-in-layers/mcp-server'

export default () => ({
  // ...
  [McpNamespace]: {
    // ...
    hideComponents: {
      // Completely hide these domains from the MCP surface
      domains: ['internalAdmin', 'experimental'],

      // Hide specific paths (domains, features, or models)
      paths: [
        'billing.cruds', // hide all models in the billing domain
        'users.cruds.ApiKeys', // hide a single model. (The ApiKeys table located in the users domain)
        'debug.internalFeature', // hide a specific feature
      ],

      // Or hide all models everywhere. Good for "feature" oriented systems.
      allModels: false, // set true to hide all model CRUD tools
    },
  },
})

System description

Under systemDescription you set static metadata for your system that is included in the start-here response:

  • description — Short system description for the AI.
  • version — System version string.

This is the right place for “what this system is” and version; it does not control which tools exist or what the START_HERE tool includes (that is under startHere).

Example (partial config):

// /config.base.mts
import { McpNamespace } from '@node-in-layers/mcp-server'

export default () => ({
  // ...
  [McpNamespace]: {
    // ...
    systemDescription: {
      description: 'Order management and billing system for ACME Corp.',
      version: '2.3.0',
    },
  },
})

Start here

The START_HERE tool is what makes the system navigable: the AI is instructed to call it first (or when the user asks for help). Its response is built from:

  1. System metadata — systemName, systemDescription, systemVersion from config.
  2. Default system entries — Built-in docs (e.g. “this is a domain-layered system”, “MCP navigation workflow”, “cross-layer props”). You can turn these off with startHere.hideDefaultSystemEntries.
  3. Optional: include domains / include features — If startHere.includeDomains is true, the response includes the current list of domains (as if list_domains had been called). If startHere.includeFeatures is true, it also includes the list of features per domain (as if list_features had been called for each). So the AI gets domains and/or features without making extra tool calls.
  4. Examples of use — Custom entries you add under startHere.examplesOfUse. These are where you document higher-level flows (e.g. “run feature A, then B, then C”). The built-in docs explain domains, features, and models; they do not explain your app-specific sequences. Put those in examplesOfUse, as JSON object examples with minimal prose so the AI can apply them directly.

Include domains / include features
Enabling these is like pre-running list_domains and/or list_features and embedding the result in START_HERE. The downside is context size: for large systems (many tools), that can consume a lot of context and add noise. For small systems (on the order of 1–10 tools) it’s usually fine. For larger systems, prefer examples of use and let the AI call list_domains / list_features when needed.

Example (partial config):

// /config.base.mts
import { McpNamespace } from '@node-in-layers/mcp-server'

export default () => ({
  // ...
  [McpNamespace]: {
    // ...
    startHere: {
      // Optional: override tool identity
      name: 'START_HERE',
      description:
        'BEFORE YOU DO ANYTHING, call this first to learn how to navigate the system.',

      // What to include in the start-here response
      hideDefaultSystemEntries: false, // do we want the ones that come by default? Usually this is yes.
      includeDomains: true, // Should we go ahead and tell it the domains? Commonly this should be true.
      includeFeatures: false, // Should we tell them all the features on the first go? In most cases this should be FALSE. Unless its a small system with few functions.

      // Higher-level flows through your system
      examplesOfUse: [
        {
          name: 'Create order then fetch it',
          description: 'Typical flow that creates an order and then retrieves it.',
          // Giving ACTUAL examples (json data, + small annotations) works amazingly.
          example: `
```markdown
// 1. Create an order
{ "tool": "execute_feature", "args": { "domain": "orders", "featureName": "createOrder" } }
// 2. Get the order by id (using the id from step 1)
{ "tool": "execute_feature", "args": { "domain": "orders", "featureName": "getOrderById" } }
      `,
      tags: ['orders', 'flow'],
    },
  ],
},

}, })

---

## Extending with custom tools

You can add your own MCP tools via the MCP layer using `addTool`. Use this from a layer that has access to `mcp[McpNamespace]` (e.g. after the MCP layer in the stack).

Example (conceptual):

```typescript
// In a layer that runs after the MCP layer and has context.mcp[McpNamespace]
const mcp = context.mcp[McpNamespace]
mcp.addTool({
  name: 'my_custom_tool',
  description: 'Does something custom',
  inputSchema: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] },
  outputSchema: { type: 'object' },
  execute: async (input) => ({ result: input.id }),
})

Your tool is then exposed alongside the built-in domain/feature/model tools.


How to run the server

  • start — Start the MCP server (listens on the connection defined in config).
    mcp[McpNamespace].start(systemContext, options?)
  • getApp — Get the Express app (for HTTP/SSE) so you can mount it in your own server.
    mcp[McpNamespace].getApp(options?)

Use start when the MCP server is the main process. Use getApp when you compose with an existing Express app (e.g. mount the MCP app at a path).


Middleware and routes

  • addPreRouteMiddleware(middleware) — Add Express middleware that runs before MCP route handling.
  • addCrossLayerPropMiddleware(middleware) — Add middleware to extract and pass request-level data (e.g., an authenticated user) into cross-layer properties for downstream functions to consume.
  • addAdditionalRoute(route) — Register an extra Express route (e.g. health or admin) on the same app.

Call these during setup (e.g. from a layer that has access to mcp[McpNamespace]) before the server is started or the app is used.


Changing logging configuration

Logging is configured under the logging section of the MCP config. You can control log levels and optionally add structured data to each request/response log entry.

  • requestLogLevel / responseLogLevel: Override the default log level (info) for incoming requests and outgoing responses.
  • requestLogGetData(input): Function that maps the raw request input into extra data to log.
  • responseLogGetData(result): Function that maps the raw tool result into extra data to log.

Example (partial config):

// /config.base.mts
import { McpNamespace } from '@node-in-layers/mcp-server'

export default () => ({
  // ...
  [McpNamespace]: {
    // ...
    logging: {
      // Adjust verbosity
      requestLogLevel: 'debug',
      responseLogLevel: 'info',

      // Attach additional request information to the log.
      requestLogGetData: (input: Request) => ({
        something: input.something,
      }),
      responseLogGetData: (input: Request) => ({
        // Shape this to your needs; example:
        truncated: true,
      }),
    },
  },
})

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Node In Layers MCP Server package from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-server-node-in-layers)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools