UNPKG

@cabbages-pre/memory-pickle-mcp-pre

Version:

Simplified MCP server for AI agent project management - 8 essential tools for session memory and task tracking

46 lines (45 loc) 1.41 kB
import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { getVersion } from '../utils/version.js'; /** * MCP Server configuration */ export const SERVER_CONFIG = { name: "memory-pickle-mcp", version: getVersion(), }; /** * Server capabilities configuration */ export const SERVER_CAPABILITIES = { capabilities: { resources: {}, tools: {}, }, }; /** * Creates and configures an MCP server instance with predefined settings and capabilities. * * @returns A new {@link Server} initialized with the server's configuration and capabilities. */ export function createServer() { return new Server(SERVER_CONFIG, SERVER_CAPABILITIES); } /** * Creates and returns a transport for server communication over standard input and output streams. * * @returns A {@link StdioServerTransport} instance for stdio-based server communication. */ export function createTransport() { return new StdioServerTransport(); } /** * Connects the server to the provided stdio transport and starts processing MCP requests. * * @remark * Does not log startup messages to prevent interference with stdio-based MCP communication. */ export async function startServer(server, transport) { await server.connect(transport); // Server is now running and ready to handle MCP requests }