Skip to main content
Glama
ColdenJohnson

MCP Server (fac_mcp_hub)

README.md
# MCP Server

A Model Context Protocol (MCP) server implementation that provides tools and resources for AI model interactions. This server enhances AI capabilities by enabling seamless integration with external tools and data sources, allowing AI models to access real-time information and perform complex operations. By using this MCP server, you can extend your AI's functionality without modifying the core model, making it easier to add new capabilities and maintain separation of concerns.

## Resources

- [GitHub Repository](https://github.com/open-webui/mcpo) - Source code and development
- [Documentation](https://docs.openwebui.com/openapi-servers/mcp) - Comprehensive guides and API reference
- [GitHub Repository](https://github.com/modelcontextprotocol/servers) - Officially supported MCP servers

## Prerequisites

- Python 3.12 or higher
- Node.js and npm (if using npx commands in config)
- Docker (optional, for containerized deployment)

The Docker setup automatically includes all required dependencies, including Node.js and npm for executing npx commands defined in your configuration file.

## Installation

### 1. Configure Proxies

Set the following environment variables for TI's proxy:

```bash
export http_proxy=http://webproxy.ext.ti.com:80
export https_proxy=http://webproxy.ext.ti.com:80
export HTTP_PROXY=http://webproxy.ext.ti.com:80
export HTTPS_PROXY=http://webproxy.ext.ti.com:80
```

### 2. Install UV Package Manager

UV is required to run the MCP server. Install it using pip:

```bash
pip install uv
```

For more information about UV, visit the [official documentation](https://docs.astral.sh/uv/getting-started/installation/#pypi).

## Running the Server

### Local Development

To run the server locally:

```bash
uvx mcpo --config config.json --port 1131
```

The server will be available at `http://localhost:1131`.

### Docker Deployment

The application can be run using Docker for a containerized environment.

#### Quick Start

Build and start the container:
```bash
docker-compose up --build
```

#### Other Docker Commands

1. Run in detached mode (background):
```bash
docker-compose up -d
```

2. View container logs:
```bash
docker-compose logs -f
```

3. Stop the container:
```bash
docker-compose down
```

4. Rebuild after changes:
```bash
docker-compose build
```

## Configuration

The server is configured using `config.json`. The configuration can include both UV and NPX commands. See the examples below:

```json
{
  "mcpServers": {
    "time": {
      "command": "uvx",
      "args": [
        "mcp-server-time",
        "--local-timezone=America/New_York"
      ]
    },
    "weather": {
      "command": "npx",
      "args": [
        "weather-mcp-server",
        "--api-key=YOUR_API_KEY"
      ]
    }
  }
}
```

Note: When using npx commands in your configuration, the Docker container automatically includes Node.js and npm, so no additional setup is required.