withseismic-mcp
by: dougwithseismic
Withseismic MCP Server - Model Control Protocol, the ://WITHSEISMIC way
πOverview
Purpose: To provide a production-ready MCP server template for hosting AI tools and prompts, facilitating easy deployment and development for developers and teams.
Overview: The MCP server enables users to expose tools to AI models through two operational modes: a remote server for scalable production deployments and a local mode for development and testing. This flexibility caters to various user needs, allowing both individual developers and teams to interact effectively with AI models.
Key Features:
-
Remote Server Mode (SSE): Allows multiple clients to connect simultaneously in a secure and scalable environment, ideal for production use.
-
Local Mode (stdio): Facilitates rapid local development and testing with direct communication for fast iteration and debugging.
-
Tools: Define executable functions callable by AI models, with automatic registration and support for input/output schema validation.
-
Prompts: Create template-based message generators that ensure consistent model interactions and automatic registration.
-
Type Safety: Full TypeScript support provides robust type validation and inference across the server's components, enhancing development efficiency and reducing errors.
D0UGWITHSEISMIC/WITHSEISMIC-MCP
SYSTEMS ONLINE β’ NEURAL INTERFACE ACTIVE β’ COMBAT DATA ANALYSIS β’ TACTICAL OVERLAY ENABLED β’ PERFORMANCE METRICS NOMINAL
A production-ready MCP server template for hosting your own AI tools and prompts. Deploy remotely or run locally β built for developers who want to expose their tools to AI models without infrastructure headaches.
WHO IS THIS FOR?
This template is perfect for:
- AI Tool Developers: Build and host your own tools that AI models can interact with
- Teams & Organizations: Set up a shared MCP server for your AI applications
- Individual Developers: Quick-start your MCP development with a production-ready setup
- API Providers: Expose your services to AI models through a standardized interface
Use cases:
- π Host a remote MCP server that multiple clients can connect to
- π§ Run locally via stdio for development and testing
- π Deploy a production-ready MCP implementation
- π οΈ Build tools without worrying about infrastructure
OVERVIEW
The MCP server provides two ways to expose your tools to AI models:
-
Remote Server Mode (SSE): Deploy as a remote server multiple clients can connect to
- Perfect for production deployments (
pnpm start:sse
) - Supports multiple simultaneous connections
- Easy deployment to platforms like Railway
- Secure and scalable
- Perfect for production deployments (
-
Local Mode (stdio): Run locally for development and testing (
pnpm start
)- Great for local development
- Direct stdio communication
- Fast iteration and debugging
Key Features:
- Tools: Executable functions that models can call
- Prompts: Template-based message generators
- Auto-Discovery: Automatic registration of your components
- Type Safety: Full TypeScript support throughout
WHY USE THIS MCP SERVER TEMPLATE?
MCP is in early stages, and rapid adoption requires frictionless development. This implementation focuses on letting developers build great tools without infrastructure hassles.
INSTANT DEPLOYMENT
# Option 1: One-Click Deploy
Click the "Deploy on Railway" button above βοΈ
# Option 2: Local Setup
pnpm install && pnpm dev
ZERO FRICTION DEVELOPMENT
- No Boilerplate: Define your tool, import it, and you're done.
- Auto-Registration: Tools and prompts are automatically discovered.
- Type Safety: Full TypeScript support with zero configuration.
BATTLE-TESTED ARCHITECTURE
- Production Ready: Reliable and performant.
- Scalable Design: Supports simple to complex AI interactions.
- Error Resilient: Robust error handling and debugging.
DEVELOPER EXPERIENCE FIRST
export const myTool = new Tool(
{
name: "myTool",
description: "What my tool does",
inputSchema: z.object({ query: z.string() }),
outputSchema: z.object({ result: z.string() }),
},
async (args) => {
return { result: "Done!" };
},
);
We handle:
- β‘ Connection management
- π Tool registration
- π‘οΈ Input validation
- π¦ State management
- π¨ Error handling
- π Logging and metrics
You focus on:
- π― Building amazing tools
- π§ Creating powerful prompts
- π Shipping features
GETTING STARTED
INSTALLATION
pnpm install
RUNNING THE SERVER
Two modes:
- Standard mode (stdio):
pnpm dev # Development with hot reload
pnpm start # Production
- SSE (Server-Sent Events) mode:
pnpm dev:sse # Development with hot reload
pnpm start:sse # Production
In SSE mode, connect to: http://localhost:3001/sse
CORE CONCEPTS
TOOLS
Tools are executable functions that models can invoke. Each tool:
- Uses Zod for input/output schemas
- Automatically registered
- Performs any operation (calculation, I/O, API calls, etc.)
Example:
import { z } from "zod";
import { Tool } from "../core";
const MyToolInputSchema = z.object({
param1: z.string().describe("Parameter description"),
});
const MyToolOutputSchema = z.object({
result: z.string().describe("Result description"),
});
export const myTool = new Tool(
{
name: "myTool",
description: "What my tool does",
inputSchema: MyToolInputSchema,
outputSchema: MyToolOutputSchema,
},
async (args) => {
const input = MyToolInputSchema.parse(args);
return { result: "processed result" };
},
);
PROMPTS
Prompts generate messages to structure model interactions:
- Define argument schema
- Generate consistent messages
- Auto-registered
Example:
import { Prompt } from "../core";
export const myPrompt = new Prompt(
{
name: "myPrompt",
description: "What my prompt does",
arguments: [
{
name: "arg1",
description: "Argument description",
required: true,
},
],
},
async (args) => {
return [
{
role: "system",
content: {
type: "text",
text: `Generated message using ${args.arg1}`,
},
},
];
},
);
ADDING NEW COMPONENTS
Creating a New Tool
- Create a new file in
src/modules/tools/
- Define input/output schemas using Zod
- Create and export your tool instance
- Add the export to
src/modules/tools/index.ts
The registry will:
- Register your tool
- Make it available to models
- Handle validation and error handling
Creating a New Prompt
- Create a new file in
src/modules/prompts/
- Define argument schema
- Create and export your prompt instance
- Add the export to
src/modules/prompts/index.ts
The registry will:
- Register your prompt
- Make it available to models
- Handle message generation and errors
ARCHITECTURE
Core Components
- Registry: Manages tools and prompts
- Tool: Base class for executable functions
- Prompt: Base class for message generators
- Server: MCP protocol implementation
Auto-Registration
Uses a singleton Registry pattern that:
- Registers tools and prompts on import
- Provides type-safe component access
- Handles MCP protocol interactions
Error Handling
- Type validation via Zod schemas
- Execution error wrapping
- Detailed error messages for debugging
DEVELOPMENT
Type Safety
- Full TypeScript support
- Input/output schemas with Zod
- Type inference for arguments and results
- Comprehensive error types
Testing
pnpm test
Best Practices
- Define clear input/output schemas
- Use descriptive names and documentation
- Handle errors gracefully
- Follow TypeScript guidelines
CONTRIBUTING
NEURAL INTERFACE DETECTED β’ INITIATING COLLABORATION PROTOCOLS β’ READY FOR UPLINK
We welcome contributions! See the Contributing Guide for:
- Development workflow
- Code style guidelines
- Pull request process
- Issue reporting
Join our Discord community to connect with other contributors!
SUPPORT
SUPPORT PROTOCOLS ACTIVE β’ COMMUNICATION CHANNELS OPEN β’ READY TO ASSIST
- π« Email: hello@withseismic.com
- π¬ Discord: Join our server
LICENSE
This project is licensed under the MIT License - see the LICENSE file for details.
Β© 2025 Doug, at WithSeismic dot com.