We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Gelberm/chess-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
server.py•746 B
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Chess.com")
@mcp.tool()
def get_chess_player_profile(username: str) -> str:
"""
Get the profile of a chess.com player by username.
:param username: player username.
:return: player profile information.
"""
from chess.chess_api import get_player_profile
return get_player_profile(username)
@mcp.tool()
def get_chess_player_stats(username: str) -> str:
"""
Get the statistics of a chess.com player by username.
:param username: player username.
:return: player statistics information.
"""
from chess.chess_api import get_player_stats
return get_player_stats(username)
def main():
mcp.run()
if __name__ == "__main__":
main()