We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nexus-aissam/mcp-local'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
server.py•1.26 KiB
"""
Main MCP Local server implementation with system tools
"""
from mcp.server.fastmcp import FastMCP
from .tools.file_operations import register_file_operations
from .tools.file_editing import register_file_editing_tools
from .tools.search_tools import register_search_tools
from .tools.system_tools import register_system_tools
from .services import backup_service, history_service, file_service
def create_server(name: str = "mcp-local") -> FastMCP:
"""Create and configure the MCP Local server"""
# Create the FastMCP server
mcp = FastMCP(name)
# Initialize services
backup_service.initialize()
history_service.initialize()
file_service.initialize()
# Register all tool modules
register_file_operations(mcp)
register_file_editing_tools(mcp)
register_search_tools(mcp)
register_system_tools(mcp) # Add the new system tools
# Add a simple data query tool
@mcp.tool()
def get_local_data(query: str) -> str:
"""Get data from local system"""
return f"Local data for query: '{query}'"
return mcp
def main():
"""Main entry point for the server"""
server = create_server()
# Run the server
server.run(transport="stdio")
if __name__ == "__main__":
main()