✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

UBOS Asset Marketplace: Esteban Nicolas’ MCP Server for Enhanced LLM Context

In the rapidly evolving landscape of Large Language Models (LLMs), the ability to access and leverage external data is paramount. The UBOS Asset Marketplace proudly presents Esteban Nicolas’ MCP (Model Context Protocol) Server, a crucial component for bridging the gap between AI models and the rich, diverse world of external data sources and tools. This implementation offers a standardized way for applications to provide context to LLMs, unlocking new possibilities for AI-driven solutions.

What is an MCP Server?

At its core, an MCP server acts as an intermediary, facilitating seamless communication between LLMs and external resources. It’s a vital piece of infrastructure that enables AI models to:

  • Access Real-World Data: Connect to databases, APIs, and other data repositories to ground LLM responses in factual information.
  • Utilize External Tools: Invoke specialized tools and services to perform tasks beyond the inherent capabilities of the LLM.
  • Enhance Contextual Understanding: Provide LLMs with the necessary context to generate more accurate, relevant, and insightful outputs.

Esteban Nicolas’ MCP Server: A Deep Dive

Esteban Nicolas’ implementation offers a robust and versatile MCP server, equipped with a range of capabilities designed to enhance LLM functionality. Let’s explore the key features and functionalities:

I. Implemented MCP Capabilities:

This MCP server excels in providing a diverse set of functionalities, categorized into data resources and tools:

1. Data Resources
1.1 HDF5 File Listing
  • Functionality: This capability allows LLMs to access and list mock HDF5 files within a specified directory structure. HDF5 (Hierarchical Data Format version 5) is a popular format for storing large, complex datasets, making this feature invaluable for AI applications dealing with scientific data, simulations, and more.
  • Parameters:
    • path_pattern (optional): Allows filtering of files based on a specified file path pattern, enabling targeted data retrieval.
2. Tools
2.1 Slurm Job Submission
  • Functionality: Simulates job submission to a Slurm scheduler, a widely used resource manager for high-performance computing (HPC) clusters. This feature enables LLMs to orchestrate and manage computationally intensive tasks.
  • Parameters:
    • script_path (required): Specifies the path to the Slurm job script.
    • cores (optional, default=1): Defines the number of CPU cores to allocate for the job.
2.2 CPU Core Reporting
  • Functionality: Reports the number of CPU cores available on the system. This information can be used by LLMs to optimize resource allocation and task scheduling.
  • Parameters: No parameters are required for this tool.
2.3 CSV Visualization
  • Functionality: Plots two columns from a CSV (Comma-Separated Values) file, providing a visual representation of data relationships. This feature enables LLMs to quickly analyze and interpret tabular data.
  • Parameters:
    • csv_path (required): Specifies the path to the CSV file.
    • column x (optional): Defines the column to be used for the x-axis. Defaults to the first column if not specified.
    • column y (optional): Defines the column to be used for the y-axis. Defaults to the second column if not specified.

II. Setup Instructions:

Setting up and running Esteban Nicolas’ MCP server is straightforward. Follow these steps:

  1. Create a Virtual Environment:

    bash uv venv -p python3.10 .venvScriptsactivate # On Unix: source .venv/bin/activate

  2. Install Dependencies:

    bash uv sync uv lock

  3. Environment Configuration:

    The project uses pyproject.toml for dependency management. Key dependencies include:

    • FastAPI: A modern, fast (high-performance), web framework for building APIs with Python.
    • Uvicorn: An ASGI (Asynchronous Server Gateway Interface) server implementation.
    • Pydantic: A data validation and settings management library.
    • Pandas: A powerful data analysis and manipulation library.
    • Matplotlib: A comprehensive library for creating static, interactive, and animated visualizations in Python.
    • Pytest: A testing framework for Python.
    • Pytest-asyncio: An extension for pytest to support asynchronous testing.
  4. Running the MCP Server:

    bash cd src uvicorn server:app --reload

    The server will be accessible at:

    • API endpoint: http://localhost:8000/mcp
    • Health check: http://localhost:8000/health

III. Testing:

Thorough testing is crucial to ensure the reliability and correctness of any software system. This MCP server includes a comprehensive suite of tests:

  1. Run all tests:

    bash pytest tests/

  2. Run specific test file:

    bash pytest tests/test_capabilities_plot_vis.py pytest tests/test_capabilities_hdf5.py pytest tests/test_capabilities_cpu_core.py pytest tests/test_capabilities_slurm.py pytest tests/test_mcp_handler.py

IV. Example Requests:

To interact with the MCP server, you can use curl or any other HTTP client. Here are some example requests:

  1. List available resources:

    bash curl -X POST http://localhost:8000/mcp
    -H “Content-Type: application/json”
    -d ‘{“jsonrpc”:“2.0”,“method”:“mcp/listResources”,“id”:1}’

  2. List HDF5 files:

    bash curl -X POST http://localhost:8000/mcp
    -H “Content-Type: application/json”
    -d ‘{“jsonrpc”:“2.0”,“method”:“mcp/callTool”,“params”:{“tool”:“hdf5_file_listing”,“path_pattern”:“/data/sim_run_123”},“id”:2}’

  3. Submit Slurm job:

    bash curl -X POST http://localhost:8000/mcp
    -H “Content-Type: application/json”
    -d ‘{“jsonrpc”:“2.0”,“method”:“mcp/callTool”,“params”:{“tool”:“slurm_job_submission”,“script_path”:“/jobs/analysis.sh”,“cores”:4},“id”:3}’

  4. Plot CSV columns:

    bash curl -X POST http://localhost:8000/mcp
    -H “Content-Type: application/json”
    -d ‘{“jsonrpc”:“2.0”,“method”:“mcp/callTool”,“params”:{“tool”:“plot_vis_columns”,“csv_path”:“data.csv”,“column x”:“time”,“column y”:“temperature”},“id”:4}’

V. Implementation Notes:

It is important to note the following implementation details:

  1. Mock Implementations:

    • HDF5 file listing utilizes a simulated directory structure.
    • Slurm job submission generates mock job IDs.
    • CPU core reporting uses os.cpu_count().
  2. CSV Visualization:

    • Creates plots in a plots_results directory.
    • Defaults to the first two columns if none are specified.
    • Returns the path to the generated PNG file.
  3. Error Handling:

    • Implements proper JSON-RPC 2.0 error responses.
    • Includes input validation for all parameters.
    • Provides graceful handling of missing files/invalid paths.

Use Cases:

  • AI-Powered Scientific Research: Enables LLMs to access and analyze scientific datasets stored in HDF5 format, facilitating faster discoveries and insights.
  • Automated HPC Job Management: Allows LLMs to submit and manage Slurm jobs on HPC clusters, automating complex computational tasks.
  • Data Visualization and Interpretation: Empowers LLMs to generate visualizations of CSV data, simplifying data analysis and reporting.
  • Context-Aware Chatbots: Provides chatbots with access to external data and tools, enabling more informative and helpful interactions.
  • Enhanced AI Agents: Integrates with AI agents to provide them with the necessary context and capabilities to perform complex tasks in various domains.

Key Features:

  • JSON-RPC 2.0 Compliant: Adheres to the JSON-RPC 2.0 specification for standardized communication.
  • Modular Design: Allows for easy extension and integration with new data sources and tools.
  • Comprehensive Error Handling: Provides robust error handling to ensure stability and reliability.
  • Well-Documented: Includes clear and concise documentation to facilitate setup and usage.
  • Testable: Comes with a comprehensive suite of tests to ensure quality and correctness.

The UBOS Advantage

By integrating Esteban Nicolas’ MCP Server with the UBOS platform, you gain access to a comprehensive suite of tools and resources for building and deploying AI-powered applications. UBOS provides:

  • A Full-Stack AI Agent Development Platform: Simplify the development and deployment of AI agents with our intuitive platform.
  • AI Agent Orchestration: Seamlessly orchestrate and manage multiple AI agents to solve complex problems.
  • Enterprise Data Connectivity: Connect AI agents to your enterprise data sources for enhanced context and insights.
  • Custom AI Agent Development: Build custom AI agents tailored to your specific needs using your own LLM models.
  • Multi-Agent Systems: Develop and deploy sophisticated multi-agent systems for collaborative problem-solving.

Conclusion:

Esteban Nicolas’ MCP Server is a valuable asset for any organization looking to enhance the capabilities of its LLMs. By providing a standardized way to access and interact with external data and tools, this implementation unlocks new possibilities for AI-driven innovation. Integrate it with the UBOS platform to unlock the full potential of AI agents and transform your business. Explore the future of AI with UBOS and Esteban Nicolas’ MCP Server.

GitHub Repository

Featured Templates

View More
Data Analysis
Pharmacy Admin Panel
252 1957
AI Characters
Sarcastic AI Chat Bot
129 1713
Verified Icon
AI Assistants
Speech to Text
137 1882
AI Agents
AI Video Generator
252 2007 5.0
Customer service
Multi-language AI Translator
136 921
AI Assistants
Talk with Claude 3
159 1523

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.