Skip to main content
Glama

XMCP Application

by basehub-ai

XMCP Application

This project was created with create-xmcp-app.

Getting Started

First, run the development server:

npm run dev # or yarn dev # or pnpm dev

This will start the MCP server with both SSE and STDIO transport methods.

Project Structure

This project uses the structured approach where tools are automatically discovered from the src/tools directory. Each tool is defined in its own file with the following structure:

import { z } from "zod"; import { type InferSchema } from "xmcp"; // Define the schema for tool parameters export const schema = { a: z.number().describe("First number to add"), b: z.number().describe("Second number to add"), }; // Define tool metadata export const metadata = { name: "add", description: "Add two numbers together", annotations: { title: "Add Two Numbers", readOnlyHint: true, destructiveHint: false, idempotentHint: true, }, }; // Tool implementation export default async function add({ a, b }: InferSchema<typeof schema>) { return { content: [{ type: "text", text: String(a + b) }], }; }

Adding New Tools

To add a new tool:

  1. Create a new .ts file in the src/tools directory
  2. Export a schema object defining the tool parameters using Zod
  3. Export a metadata object with tool information
  4. Export a default function that implements the tool logic

Building for Production

To build your project for production:

npm run build # or yarn build # or pnpm build

This will compile your TypeScript code and output it to the dist directory.

Running in Production

To run your bundled MCP server in production:

npm run start-sse # or npm run start-stdio

Learn More

-
security - not tested
F
license - not found
-
quality - not tested

A server that leverages the XMCP framework to discover and execute tools from the src/tools directory, supporting both SSE and STDIO transport methods for interaction.

  1. Getting Started
    1. Project Structure
      1. Adding New Tools
        1. Building for Production
          1. Running in Production
            1. Learn More

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                An MCP server implementation that standardizes how AI applications access tools and context, providing a central hub that manages tool discovery, execution, and context management with a simplified configuration system.
                Last updated -
                9
                Python
                MIT License
              • -
                security
                A
                license
                -
                quality
                A dynamic MCP server implementation that automatically loads tools, resources, and prompts from their respective directories, allowing for easy extension and configuration.
                Last updated -
                Python
                MIT License
              • -
                security
                F
                license
                -
                quality
                An MCP server that allows users to create custom tools on the fly by stitching together actions from multiple MCP tools into reusable routines.
                Last updated -
                145
                1
                TypeScript

              View all related MCP servers

              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/basehub-ai/mcp'

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