@mcpolyglot/core
v0.1.0
Published
Core runtime for mcpolyglot: Connector interface, server, transports, and the non-bypassable security pipeline.
Readme
@mcpolyglot/core
The runtime that powers mcpolyglot. Defines the Connector interface, the McpolyglotServer, the transport abstraction, and the non-bypassable security pipeline that wraps every tool call.
You usually don't depend on this directly — install @mcpolyglot/cli instead. Use this package when you want to embed mcpolyglot in your own host or write a custom connector.
What's in here
McpolyglotServer— wires connectors, security hooks, and a transport into an MCP-compliant server. Every tool call goes through the same pipeline:
Connectors can't opt out.scope check → rate limit → timeout → handler → redact → size cap → wrap → auditConnector— the interface a data-source adapter implements (init,close,health,introspect,listPrimitiveTools,generatePerEntityTools).Transport— minimal contract; ships withStdioTransportandStreamableHttpTransport.ToolDefinition—{ name, description, inputSchema (zod), scopes, readOnly, handler }.
Subpath exports
import { McpolyglotServer } from '@mcpolyglot/core';
import { StdioTransport } from '@mcpolyglot/core/transports/stdio';
import { StreamableHttpTransport } from '@mcpolyglot/core/transports/streamable-http';Docs
- Architecture → https://github.com/ishay60/mcpolyglot/blob/develop/ARCHITECTURE.md
- Pipeline source →
src/server.ts(executeTool)
MIT licensed.
