Skip to main content
Glama
lamchantuong

modular-mcp

by lamchantuong

modular-mcp

__manifest__.toml 기반의 Odoo 스타일 애드온과 선택적 FastAPI 웹 레이어를 갖춘 모듈형 MCP 서버입니다.

설정

python -m venv .venv
.venv\Scripts\activate
pip install -e ".[dev]"
copy .env.example .env

설정은 주로 config.toml에서 관리합니다. 환경 변수는 여전히 FastAPI 설정을 재정의합니다(.env 지원).

소스

용도

config.toml

MCP 서버, 로깅, 애드온 경로, FastAPI 기본값

.env / 환경 변수

FastAPI HOST, PORT, LOG_LEVEL 등 재정의

Related MCP server: mcp-app

실행

modular-mcp serve
modular-mcp mcp serve
modular-mcp get hello
  • FastAPI UI: http://127.0.0.1:8000/

  • MCP 기본: http://127.0.0.1:5001의 streamable-http (config.toml 참조)

애드온

각 애드온은 addons/ 아래 폴더이며 다음을 포함합니다:

addons/my_addon/
  __manifest__.toml
  config.toml
  tools.py          # register_tools(mcp, config, logger)

샘플 애드온: kv_get / kv_set이 있는 addons/key_value_store/

애드온 내 공유 임포트:

from app.mcp.utils import format_json, exception_to_error_response
from app.mcp.logging import monitor_performance
from helpers import my_helper  # local module in the same addon folder

dynamic-mcp에서 도구 포팅

# Before
tools/requests_tools.py

# After
addons/requests/
  __manifest__.toml
  config.toml
  tools.py

도구 코드를 tools.py로 옮기고, utils.* 임포트를 app.mcp.utils로 변경한 다음, __manifest__.toml에서 log_key를 설정하세요.

테스트 및 린트

pytest
ruff check .
ruff format --check .
mypy
pyright

Pre-commit

pip install -e ".[dev]"
pre-commit install
pre-commit run --all-files

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables building and running MCP servers over streamable HTTP, exposing tools to AI assistants like Cursor, with examples of mounting multiple servers in FastAPI.
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    Framework for building and running MCP servers as HTTP services. Define tools as pure Python functions, wire up with two lines, run with one command.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables managing multiple Odoo instances from a single panel and exposes MCP tools for interacting with them via a unified service.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    A modular MCP server built with FastAPI, exposing tools via HTTP endpoints with SSE streaming responses.
    -