Public mirror for @nebutra/mcp from Nebutra/Nebutra-Sailor.
This repository is generated from the Nebutra Sailor monorepo. Package releases are cut from the monorepo and mirrored here for discovery, standalone cloning, and contribution intake.
- Canonical source:
packages/ai/mcpinNebutra/Nebutra-Sailor - Package registry: npm and GitHub Packages
- Contributions: open issues or PRs here; maintainers port accepted changes back into the monorepo source package
Model Context Protocol primitives for Nebutra agent and tool surfaces.
This package provides a registry, client, middleware, consent store, debug
helpers, and internal-server registration seams around the official
@modelcontextprotocol/sdk runtime.
Experimental public package. The package is published for reuse and contribution intake, but its package metadata still marks these production gaps explicitly:
- no production app integrations yet
- no production MCP transports beyond HTTP/local seams
- no durable remote tool discovery or app-level integration layer
Use it for local tools, integration prototypes, and package development. Keep production deployments behind the application-level gateway and approval model.
pnpm add @nebutra/mcp| Path | Description |
|---|---|
@nebutra/mcp |
Main registry, client, host, consent, debug, middleware, server, and type exports |
@nebutra/mcp/client |
MCPClient and the shared mcpClient instance |
@nebutra/mcp/server |
Internal server registration helpers |
@nebutra/mcp/middleware |
Rate-limit, audit, access-control, and middleware composition helpers |
import { MCPClient, serverRegistry } from "@nebutra/mcp";
serverRegistry.register({
id: "workspace",
name: "Workspace tools",
description: "Local workspace utility tools",
endpoint: "local",
transport: "local",
tools: [
{
name: "echo",
description: "Return the provided message",
parameters: {
message: { type: "string", required: true },
},
allowedPlans: ["PRO", "ENTERPRISE"],
},
],
handlers: {
echo: (args) => ({ message: args.message }),
},
allowedPlans: ["PRO", "ENTERPRISE"],
});
const client = new MCPClient(serverRegistry);
const result = await client.executeTool(
"workspace:echo",
{ message: "hello" },
{
requestId: "req_123",
tenantId: "org_123",
userId: "user_123",
plan: "PRO",
},
);import { getInternalServerIds, registerInternalServers } from "@nebutra/mcp";
registerInternalServers();
const internalServerIds = getInternalServerIds();import {
composeMCPMiddleware,
createAccessControlMiddleware,
createAuditMiddleware,
createRateLimitMiddleware,
} from "@nebutra/mcp/middleware";
const middleware = composeMCPMiddleware([
createRateLimitMiddleware({ maxRequests: 100, windowMs: 60_000 }),
createAccessControlMiddleware({ blockedTools: [] }),
createAuditMiddleware({ onLog: (entry) => auditSink.write(entry) }),
]);- HTTP execution uses
StreamableHTTPClientTransportfrom the official MCP SDK. - Local execution resolves registered handlers directly.
- WebSocket execution is not implemented in this package.
stdioexecution is rejected for browser/serverless contexts.- Tool access is checked at both server and tool level for plan, tenant, and permission gates.
MIT