MCP Framework
A framework for writing modelcontextprotocol (MCP) servers in Typescript
š MCP Tools
Overview
MCP-Framework
Description:
A TypeScript framework for building elegant and type-safe server implementations
Category: Development Framework
Overview:
MCP-Framework provides a structured approach to building servers with automatic directory-based discovery for tools, resources, and prompts. It offers powerful abstractions with full type safety and includes a CLI for rapid development.
Key Features:
- Automatic directory discovery for tools, prompts, and resources
- Type-safe abstractions using TypeScript and Zod
- CLI tools for project management
- Built-in error handling and response formatting
- Support for HTTP requests and dynamic prompt templates
Quick Start:
# Install globally
npm install -g mcp-framework
# Create new project
mcp create my-mcp-server
# Navigate to project
cd my-mcp-server
Claude Desktop Configuration:
{
"mcpServers": {
"my-mcp-server": {
"command": "node",
"args": ["/absolute/path/to/my-mcp-server/dist/index.js"],
"env": {
"SECRET_INFO": "YOUR_API_SECRET"
}
}
}
}
Project Structure:
your-project/
āāā src/
ā āāā tools/ # Required
ā āāā prompts/ # Optional
ā āāā resources/ # Optional
ā āāā index.ts
āāā package.json
āāā tsconfig.json
Development Commands:
# Add components
mcp add tool tool-name
mcp add prompt prompt-name
mcp add resource resource-name
# Build
npm run build
The framework automatically handles feature discovery and provides base classes (MCPTool, MCPPrompt, MCPResource) with built-in validation using Zod.