Skip to main content
Glama
CaptainCrouton89

MCP Server Boilerplate

MCP Server Boilerplate

A starter template for building MCP (Model Context Protocol) servers. This boilerplate provides a clean foundation for creating your own MCP server that can integrate with Claude, Cursor, or other MCP-compatible AI assistants.

Purpose

This boilerplate helps you quickly start building:

  • Custom tools for AI assistants

  • Resource providers for dynamic content

  • Prompt templates for common operations

  • Integration points for external APIs and services

Related MCP server: MCP Inspector Server

Features

  • Simple "hello-world" tool example

  • TypeScript support with proper type definitions

  • Easy installation scripts for different MCP clients

  • Clean project structure ready for customization

How It Works

This MCP server template provides:

  1. A basic server setup using the MCP SDK

  2. Example tool implementation

  3. Build and installation scripts

  4. TypeScript configuration for development

The included example demonstrates how to create a simple tool that takes a name parameter and returns a greeting.

Getting Started

# Clone the boilerplate
git clone <your-repo-url>
cd mcp-server-boilerplate

# Install dependencies
pnpm install

# Build the project
pnpm run build

# Start the server
pnpm start

Installation Scripts

This boilerplate includes convenient installation scripts for different MCP clients:

# For Claude Desktop
pnpm run install-desktop

# For Cursor
pnpm run install-cursor

# For Claude Code
pnpm run install-code

# Generic installation
pnpm run install-server

These scripts will build the project and automatically update the appropriate configuration files.

Usage with Claude Desktop

The installation script will automatically add the configuration, but you can also manually add it to your claude_desktop_config.json file:

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

Then restart Claude Desktop to connect to the server.

Customizing Your Server

Adding Tools

Tools are functions that the AI assistant can call. Here's the basic structure:

server.tool(
  "tool-name",
  "Description of what the tool does",
  {
    // Zod schema for parameters
    param1: z.string().describe("Description of parameter"),
    param2: z.number().optional().describe("Optional parameter"),
  },
  async ({ param1, param2 }) => {
    // Your tool logic here
    return {
      content: [
        {
          type: "text",
          text: "Your response",
        },
      ],
    };
  }
);

Adding Resources

Resources provide dynamic content that the AI can access:

server.resource(
  "resource://example/{id}",
  "Description of the resource",
  async (uri) => {
    // Extract parameters from URI
    const id = uri.path.split("/").pop();

    return {
      contents: [
        {
          uri,
          mimeType: "text/plain",
          text: `Content for ${id}`,
        },
      ],
    };
  }
);

Adding Prompts

Prompts are reusable templates:

server.prompt(
  "prompt-name",
  "Description of the prompt",
  {
    // Parameters for the prompt
    topic: z.string().describe("The topic to discuss"),
  },
  async ({ topic }) => {
    return {
      description: `A prompt about ${topic}`,
      messages: [
        {
          role: "user",
          content: {
            type: "text",
            text: `Please help me with ${topic}`,
          },
        },
      ],
    };
  }
);

Project Structure

├── src/
│   └── index.ts          # Main server implementation
├── scripts/              # Installation and utility scripts
├── dist/                 # Compiled JavaScript (generated)
├── package.json          # Project configuration
├── tsconfig.json         # TypeScript configuration
└── README.md            # This file

Development

  1. Make changes to src/index.ts

  2. Run pnpm run build to compile

  3. Test your server with pnpm start

  4. Use the installation scripts to update your MCP client configuration

Next Steps

  1. Update package.json with your project details

  2. Customize the server name and tools in src/index.ts

  3. Add your own tools, resources, and prompts

  4. Integrate with external APIs or databases as needed

License

MIT

Available Tools

4 tools
get-network-detailsA

Get detailed information about a specific network request including headers, payload, and response body

ParametersJSON Schema
NameRequiredDescriptionDefault
requestIdYesThe request ID to get details for
includeHeadersNoInclude request and response headers in the output

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the output content (headers, payload, response body) but does not mention side effects, error behavior for invalid IDs, or any rate limits. The read-only nature is implied by the action 'get', but not explicitly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that states the core action and the scope of output in a concise, efficient manner without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a simple tool with two well-documented parameters and no output schema, so the description is largely complete for a detail-retrieval operation. However, a brief mention of obtaining requestId via query-network-traffic would improve contextual completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema fully describes both parameters (requestId and includeHeaders) with clear descriptions. The tool description adds no parameter-specific meaning beyond what the schema already provides, matching the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: retrieving detailed information about a specific network request, including headers, payload, and response body. This specificity distinguishes it from sibling tools like query-network-traffic, which likely offers a broader list/summary of requests.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a specific request ID is known, but it does not explicitly mention alternatives or prerequisites. No comparison to sibling tools (e.g., using query-network-traffic to find the request ID first) is provided, so guidance is only implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

open-urlA

Open a specific URL in the Chrome debug browser window and wait for network traffic to settle

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses a key behavioral trait: it waits for network traffic to settle after navigation. It also specifies the target context (Chrome debug browser window), which adds transparency. It doesn't mention side effects or prerequisites, but for a simple navigation tool this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no redundant information. Every word earns its place: it states the action, the target, and the key post-navigation behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one required parameter and no output schema, the description is complete. It explains what happens (open + wait for settle), where (Chrome debug browser window), and is complemented by sibling tool context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description ('Open a specific URL') adds no extra meaning beyond the schema's 'The URL to navigate to'. The parameter semantics are fully captured by the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'open', the resource 'a specific URL', and the context 'Chrome debug browser window'. It also distinguishes itself from siblings: it navigates the browser, while start-chrome-debug launches it and query-network-traffic/get-network-details inspect network data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies a workflow: after starting the debug browser (start-chrome-debug), this tool navigates to a URL and waits for network traffic to settle before inspecting it. Though it doesn't explicitly name alternatives, the behavior of waiting for network settle clarifies its role in a sequence.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

query-network-trafficB

Query network requests by URL pattern or time range from the active Chrome debugging session. Pages take a few seconds to load, so wait a few seconds before querying.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of requests to return
methodNoHTTP method filter (GET, POST, etc.)
urlFilterNoURL pattern to filter requests (supports wildcards)
statusCodeNoHTTP status code filter

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the transparency burden. It discloses the latency behavior (pages take seconds to load), which is useful, but it does not mention the return format, read-only nature, or any error/edge-case behavior. This leaves significant gaps for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at two sentences, front-loading the main query capability and timing advice. The 'time range' phrase is inaccurate and wastes words, preventing a perfect score, but the overall structure is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks essential context: it does not specify what the tool returns (e.g., a list of requests), how it relates to get-network-details, or any output format. Given no output schema and no annotations, the description is incomplete for an agent to confidently use the tool and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions cover 100% of the parameters, so the baseline is 3. However, the description mentions 'time range' which is not a parameter in the schema, actively misleading agents into thinking a time filter exists. It also fails to reference method, statusCode, or limit, adding no value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool queries network requests and specifies the source (active Chrome debugging session), distinguishing it from siblings like get-network-details. However, the mention of 'time range' is misleading because no time range parameter exists in the schema, slightly clouding the tool's actual filtering capabilities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly notes the prerequisite of an active Chrome debugging session and advises waiting a few seconds for pages to load, giving clear timing guidance. It does not mention exclusions or alternatives, but the context is sufficient for basic usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

start-chrome-debugA

Start Chrome browser with remote debugging enabled. Use this tool to view network traffic and request details.

ParametersJSON Schema
NameRequiredDescriptionDefault
headlessNoRun Chrome in headless mode
userDataDirNoCustom user data directory path (optional)

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden of behavioral disclosure. It mentions remote debugging is enabled, which is key, but lacks details about process lifecycle (e.g., whether it blocks, how to access the debugging interface, potential side effects on existing Chrome instances).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action and purpose, and contains zero unnecessary words. It is efficient and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description leaves significant gaps: it does not explain how the debugging interface is accessed (e.g., port, URL), whether the tool returns immediately or blocks, or how it fits into the workflow with sibling network tools. This is under-specified for an action-oriented tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both headless and userDataDir having descriptive text. The tool description adds no additional parameter meaning beyond the schema, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool starts Chrome with remote debugging enabled, naming the specific verb and resource. This distinguishes it from sibling tools like query-network-traffic and get-network-details, which focus on retrieving network data rather than launching a browser.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides clear context by stating 'Use this tool to view network traffic and request details,' implying the tool is a precursor to network inspection. However, it does not explicitly mention when not to use it or name alternatives, despite the existence of sibling query tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.1
    • First observedget-network-details
    • First observedopen-url
    • First observedquery-network-traffic
    • First observedstart-chrome-debug

TDQS

A4/5.0
Disambiguation5/5

Each tool serves a distinct step in the debugging workflow: starting the browser, opening a URL, querying traffic, and inspecting details. Their purposes are clearly different and the descriptions reinforce the separation.

Naming Consistency5/5

All tool names follow a consistent hyphen-separated, verb-first pattern (start-, open-, query-, get-), making the naming predictable and uniform.

Tool Count5/5

Four tools is well-scoped for a Chrome network debugging server; each tool covers a fundamental operation without unnecessary bloat.

Completeness4/5

The core workflow is covered, but there is no explicit stop or teardown tool for the debugging session, leaving a minor gap in lifecycle management.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    C
    quality
    D
    maintenance
    A starter template for building MCP servers that can integrate with Claude, Cursor, or other MCP-compatible AI assistants to create custom tools, resource providers, and prompt templates.
    2
    0
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    A basic MCP server template that provides a foundation for building custom tools, resources, and prompts. Serves as a starting point for developers to create their own MCP server functionality.
    -
  • F
    license
    A
    quality
    D
    maintenance
    A starter template for building custom MCP servers with example implementations of tools, resources, and prompts. Includes TypeScript support and installation scripts for Claude Desktop, Cursor, and other MCP-compatible clients.
    2
    14
    -
  • F
    license
    C
    quality
    D
    maintenance
    A starter template for building custom MCP servers with example tools, TypeScript support, and multi-client installation scripts for Claude Desktop, Cursor, and other MCP-compatible AI assistants.
    2
    16
    84
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CaptainCrouton89/browser-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server