Skip to main content
Glama

Modular MCP Server

Modular MCP Server

This is a modular, auto-discovering Model Context Protocol (MCP) server built with Python and FastAPI. It's designed to be a scalable foundation for providing tools to Large Language Models (LLMs).

Features

  • Auto-Discovery: Automatically loads tools from the /tools directory on startup.
  • Modular: Tools are self-contained in their own files.
  • Configurable: Uses a .env file for all configuration.
  • Secure: Includes best practices like read-only database users and whitelisting.
  • Performant: Runs on a high-performance Unix socket and uses an async database connection pool.

Setup

  1. Clone the repository:
    git clone <repository_url> cd mcp
  2. Create and activate a virtual environment:
    python3 -m venv .venv source .venv/bin/activate
  3. Install dependencies:
    pip install -r requirements.txt
  4. Configure your environment:
    cp .env.example .env
    Now, edit the .env file with your actual database credentials and settings.

Running the Server

To run the server on a Unix socket:

uvicorn mcp_server:app --uds /tmp/mcp.sock

Testing

You can test the running server using curl.

Discover tools:

curl --unix-socket /tmp/mcp.sock http://localhost/mcp/v1/tools | jq

Execute a tool:

curl -X POST \ --unix-socket /tmp/mcp.sock \ -H "Content-Type: application/json" \ -d '{"arguments": {"timezone": "Europe/Istanbul"}}' \ http://localhost/mcp/v1/tools/get_current_time:execute | jq
-
security - not tested
F
license - not found
-
quality - not tested

A scalable, auto-discovering Model Context Protocol server that dynamically loads tools from the tools directory, enabling LLMs to access various capabilities through a standardized interface.

  1. Features
    1. Setup
      1. Running the Server
        1. Testing

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.
            Last updated -
            6
            16
            23
            JavaScript
            MIT License
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that allows LLMs to interact with web content through standardized tools, currently supporting web scraping functionality.
            Last updated -
            Python
            MIT License
            • Linux
            • Apple
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into LLM prompts, helping developers get accurate answers without outdated or hallucinated information.
            Last updated -
            2
            64,839
            22,904
            JavaScript
            MIT License
            • Linux
            • Apple
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that enables LLMs to explore and interact with API specifications by providing tools for loading, browsing, and getting detailed information about API endpoints.
            Last updated -
            4
            10
            13
            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/developkariyer/mcp'

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