MCP Starter Server
A TypeScript starter template for building Model Context Protocol servers, enabling quick setup for custom tools and integration.
README
MCP Starter Server
A TypeScript starter template for building Model Context Protocol (MCP) servers.
Quick Start
Prerequisites
- Node.js 18+
- npm or yarn
Installation
npm install
Build
npm run build
Run
npm run dev
Architecture
- src/index.ts - Main server file with tool definitions
- tsconfig.json - TypeScript configuration
- package.json - Dependencies and scripts
Adding Tools
Edit src/index.ts to add new tools:
- Define a Zod schema for input validation
- Add the tool to the
toolsarray with name, description, and inputSchema - Handle the tool in the CallToolRequestSchema handler
Example:
const MyToolSchema = z.object({
param1: z.string().describe("Description"),
});
const tools: Tool[] = [
{
name: "my_tool",
description: "What this tool does",
inputSchema: {
type: "object",
properties: {
param1: {
type: "string",
description: "Description",
},
},
required: ["param1"],
},
},
];
server.setRequestHandler(CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request;
if (name === "my_tool") {
const parsed = MyToolSchema.parse(args);
return {
content: [
{
type: "text",
text: `Result: ${parsed.param1}`,
},
],
};
}
});
Testing
Use the MCP Inspector to test your server:
npx @modelcontextprotocol/inspector node build/index.js
Next Steps
- Add your first custom tool
- Connect to an external API
- Test with MCP Inspector
- Deploy to production
Resources
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.