achmadya-dev/mcp-core
Provides a shared MCP SDK wrapper for building MCP servers with stdio transport, tool registration, JSON-safe responses, and environment helpers.
README
@achmadya-dev/mcp-core
Shared MCP SDK wrapper for @achmadya-dev servers: stdio transport, tool registration, JSON-safe responses, and env helpers.
Built on MCP TypeScript SDK v2 (@modelcontextprotocol/server). Tool schemas use Standard Schema — pick any compatible library in your package.
Install
pnpm add @achmadya-dev/mcp-core
# plus a Standard Schema library in your MCP package, e.g. zod, valibot, arktype, …
Installed automatically as a dependency of @achmadya-dev/mcp-*-query servers.
Usage
Pass a Standard Schema object to inputSchema / outputSchema. Examples below use the same tool shape; only the schema library differs.
Zod
pnpm add zod
import * as z from "zod";
import { defineTool, startMcpServer } from "@achmadya-dev/mcp-core";
const myTool = defineTool({
name: "my_tool",
description: "Does something",
inputSchema: z.object({
name: z.string().describe("Item name"),
}),
outputSchema: z.object({ ok: z.boolean() }),
handler: async ({ name }) => ({ ok: true }),
});
await startMcpServer({ name: "My MCP", version: "1.0.0", tools: [myTool] });
Valibot
pnpm add valibot @valibot/to-json-schema
import * as v from "valibot";
import { toStandardJsonSchema } from "@valibot/to-json-schema";
import { defineTool, startMcpServer } from "@achmadya-dev/mcp-core";
const myTool = defineTool({
name: "my_tool",
description: "Does something",
inputSchema: toStandardJsonSchema(
v.object({ name: v.pipe(v.string(), v.description("Item name")) })
),
outputSchema: toStandardJsonSchema(v.object({ ok: v.boolean() })),
handler: async ({ name }) => ({ ok: true }),
});
await startMcpServer({ name: "My MCP", version: "1.0.0", tools: [myTool] });
Other (ArkType, JSON Schema, …)
ArkType — Standard Schema native:
pnpm add arktype
import { type } from "arktype";
import { defineTool, startMcpServer } from "@achmadya-dev/mcp-core";
defineTool({
name: "my_tool",
description: "Does something",
inputSchema: type({ name: "string" }),
outputSchema: type({ ok: "boolean" }),
handler: async ({ name }) => ({ ok: true }),
});
Raw JSON Schema — via MCP SDK adapter:
import { fromJsonSchema } from "@modelcontextprotocol/server";
import { defineTool } from "@achmadya-dev/mcp-core";
defineTool({
name: "my_tool",
description: "Does something",
inputSchema: fromJsonSchema({
type: "object",
properties: { name: { type: "string", description: "Item name" } },
required: ["name"],
}),
handler: async ({ name }) => ({ ok: true }),
});
Tools with no parameters: use an empty object schema from your library (e.g. z.object({}), toStandardJsonSchema(v.object({})), type({})).
Exports
Server,defineTool,ToolError,startMcpServerenvStr,envInt,envBool- Types:
ToolDefinition,ToolInput,JsonValue,RegisterableTool,ServerConfig,StandardSchemaWithJSON, …
Schema builders and runtime validation stay in each @achmadya-dev/mcp-* package.
Release
Uses Changesets — same flow as achmadya-dev/mcp.
-
Add a changeset when you ship user-facing changes:
pnpm changeset -
Push to
main. GitHub Actions opens a Version packages PR (version bump +CHANGELOG.md). -
Merge that PR. Next push to
mainpublishes to npm (@achmadya-dev/mcp-core).
Remote prerequisites: GitHub secret NPM_TOKEN (npm automation token with bypass 2FA for @achmadya-dev).
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.