o
I�gy � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl
mZ e�e
�Zdd� Ze
d krBejejd
� e�e� � dS dS )z3
Main module for the API documentation MCP server.
� N)�FastMCP)�
ApiDocCrawler)�register_resources)�
ApiRepositoryc � s� �t jdd�} | jdddd� | jdtdd d
� | �� }t� }t|�}t�d|j � �� |�
|j �I dH t|jd
�}t
||� t�d|j� �� |�� I dH dS )z6Main entry point for the API documentation MCP server.zAPI documentation MCP server)Zdescriptionz--urlTz%URL of the API documentation to crawl)Zrequired�helpz--porti@ zPort to run the MCP server on)�type�defaultr z Crawling API documentation from N)�portzStarting MCP server on port )�argparseZArgumentParserZadd_argument�intZ
parse_argsr r �logger�infoZurlZcrawlr r r �start)Zparser�argsZ
repositoryZcrawlerZmcp� r �?C:\Users\apqls\Documents\Github\tkbase\api-docs-mcp\src\main.py�main s �
r �__main__)�level)�__doc__r
ZasyncioZloggingZmcp.server.fastmcpr Zsrc.crawler.crawlerr Zsrc.mcp.resourcesr Zsrc.storage.repositoryr Z getLogger�__name__r r ZbasicConfigZINFO�runr r r r �<module> s
�
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/ShotaNagafuchi/api-docs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server