We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hmbown/aleph'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
mcp_server.py•909 B
"""Run Aleph as an MCP server.
Requires the optional dependency:
pip install -e '.[mcp]'
Then run:
python examples/mcp_server.py
This uses stdio transport.
"""
from __future__ import annotations
import asyncio
import argparse
import sys
from pathlib import Path
# Ensure the repository root is on sys.path when running as a script.
ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
def main() -> None:
parser = argparse.ArgumentParser(description="Run Aleph MCP server")
parser.parse_args()
try:
from aleph.mcp.local_server import AlephMCPServerLocal
except Exception as e:
raise SystemExit(
"MCP support not installed. Install with `pip install -e '.[mcp]'`\n\n" + str(e)
)
server = AlephMCPServerLocal()
asyncio.run(server.run())
if __name__ == "__main__":
main()