Skip to main content
Glama

ONEDeFi MCP Server

by JMadhan1
app.py•1.02 kB
import os import logging from flask import Flask from flask_sqlalchemy import SQLAlchemy from sqlalchemy.orm import DeclarativeBase from werkzeug.middleware.proxy_fix import ProxyFix # Configure logging logging.basicConfig(level=logging.DEBUG) class Base(DeclarativeBase): pass db = SQLAlchemy(model_class=Base) # Create the app app = Flask(__name__) app.secret_key = os.environ.get("SESSION_SECRET", "dev-secret-key-change-in-production") app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1) # Configure the database app.config["SQLALCHEMY_DATABASE_URI"] = os.environ.get("DATABASE_URL", "sqlite:///defi_mcp.db") app.config["SQLALCHEMY_ENGINE_OPTIONS"] = { "pool_recycle": 300, "pool_pre_ping": True, } app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False # Initialize the app with the extension db.init_app(app) with app.app_context(): # Import models to ensure tables are created import models # noqa: F401 db.create_all() logging.info("Database tables created successfully")

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/JMadhan1/OneDefi-MCP'

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