About Compiler
Compiler is an MCP server published by kolodny in the Developer Tools category: turns vague requests into structured prompts, execution plans, and policy-aware workflows — with readiness verdicts, PR merge-safety checks, agent packs, and MCP tool exports. Offline-first, deterministic, provider-agnostic.
The repository has 1 stars and 0 forks, with the last commit 5 months ago. Recent commit activity is the strongest signal that reported issues will get attention.
Install
git clone https://github.com/kolodny/mcp-compilerThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Compiler
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
4 checks have not been run yet.
README
mcp-compiler
Transform plain TypeScript functions into an MCP server.
Installation
npm install mcp-compiler
Usage
// tools.ts
/** add number */
export const add = async (num1: number, num2?: number) => num1 + (num2 ?? 0);
/** say hi to user */
export const sayHi = (name: string) => `Hi, ${name}`;
export const makeUser = (user: {
/** Name of user */ name: string;
/** Age of user */ age?: number;
}) => user;
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import * as z from 'zod/v4';
import { compile, generateSchemas } from 'mcp-compiler';
import * as tools from './tools';
const pathToTools = `${__dirname}/tools.ts`;
const schemas = generateSchemas(pathToTools); // OK for dev, pre-build and load from file for release.
const compiled = compile({ tools, schemas, z });
const server = new McpServer(
{ name: 'My-Server', version: '1.0.0' },
{ capabilities: { tools: {} } }
);
for (const { name, description } of compiled.tools) {
const zodSchemas = compiled.makeZodSchemas(name);
const fn = compiled.callTool.bind(null, name);
server.registerTool(name, { ...zodSchemas, description }, fn);
}
async function runServer() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error(`MCP Server running on stdio`);
}
runServer().catch((error) => {
console.error(`Fatal error running server:`, error);
process.exit(1);
});
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from '@modelcontextprotocol/sdk/types.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { compile, generateSchemas } from 'mcp-compiler';
import * as tools from './tools';
const pathToTools = `${__dirname}/tools.ts`;
const schemas = generateSchemas(pathToTools); // OK for dev, pre-build and load from file for release.
const compiled = compile({ tools, schemas });
const server = new Server(
{ name: 'My-Server', version: '1.0.0' },
{ capabilities: { tools: {} } }
);
server.setRequestHandler(ListToolsRequestSchema, compiled.ListToolsHandler);
server.setRequestHandler(CallToolRequestSchema, compiled.CallToolHandler);
async function runServer() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error(`MCP Server running on stdio`);
}
runServer().catch((error) => {
console.error(`Fatal error running server:`, error);
process.exit(1);
});
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.