Back to MCP Catalog

Framework MCP Server

Developer ToolsTypeScript
A framework for building Model Context Protocol servers in TypeScript

MCP Framework provides a robust architecture for developing Model Context Protocol (MCP) servers using TypeScript. It offers automatic directory-based discovery for tools, resources, and prompts, allowing developers to define MCP components elegantly with full type safety. The framework includes multiple transport support, authentication for SSE endpoints, and is built on the official MCP SDK to ensure compatibility and performance.

Overview

MCP Framework simplifies the development of Model Context Protocol servers by providing a structured, TypeScript-first approach. The framework handles the complex aspects of MCP server implementation, allowing you to focus on building your tools, resources, and prompts.

Installation

Using the CLI (Recommended)

The easiest way to get started with MCP Framework is by using its CLI:

# Install the framework globally
npm install -g mcp-framework

# Create a new MCP server project
mcp create my-mcp-server

# Navigate to your project
cd my-mcp-server

Project Structure

After creating a project, you'll have a directory structure that follows MCP Framework conventions:

  • src/tools/ - Directory for your tool implementations
  • src/prompts/ - Directory for your prompt definitions
  • src/resources/ - Directory for your resource implementations

Adding Components

The CLI makes it easy to add new components to your project:

# Add a new tool
mcp add tool my-tool-name

# Add a new prompt
mcp add prompt my-prompt-name

# Add a new resource
mcp add resource my-resource-name

Each command generates the appropriate TypeScript files with the necessary base classes and structure.

Building Your Project

To build your MCP server:

npm run build

This compiles your TypeScript code into JavaScript in the dist/ directory.

Configuration Options

MCP Framework supports several environment variables for configuration:

  • MCP_ENABLE_FILE_LOGGING - Enable logging to files (true/false, default: false)
  • MCP_LOG_DIRECTORY - Directory where log files will be stored (default: logs)
  • MCP_DEBUG_CONSOLE - Display debug level messages in console (true/false)

Transport Options

When creating a project, you can specify different transport options:

# Create with HTTP transport
mcp create my-server --http --port 1337 --cors

Options:

  • --http - Use HTTP transport instead of default stdio
  • --port - Specify HTTP port (default: 8080)
  • --cors - Enable CORS with wildcard (*) access

Using with Claude Desktop

For Local Development

Add this configuration to your Claude Desktop config file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "my-mcp-server": {
      "command": "node",
      "args": ["/absolute/path/to/my-mcp-server/dist/index.js"]
    }
  }
}

After Publishing Your Server

After publishing your MCP server as an npm package:

{
  "mcpServers": {
    "my-mcp-server": {
      "command": "npx",
      "args": ["my-mcp-server"]
    }
  }
}

Development Workflow

  1. Create your project with mcp create
  2. Add tools, prompts, and resources as needed
  3. Implement your functionality in the generated files
  4. Build with npm run build
  5. Configure Claude Desktop to use your server
  6. Test and iterate on your implementation

Related MCPs

Apple Shortcuts
Developer ToolsJavaScript

Control Apple Shortcuts automations from AI assistants

Clojars Dependency Lookup
Developer ToolsJavaScript

Fetch dependency information from Clojars, the Clojure community's artifact repository

Simple Timeserver
Developer ToolsPython

Provides Claude with current time and timezone information

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.