Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Copy requirements from pyproject.toml and uv.lock if needed
# Install pip dependencies

# Install system build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*

# Copy the project files
COPY . /app

# Install pip dependencies using pip (ignore scripts if needed)
RUN pip install --upgrade pip && pip install .

# Expose port if needed

# Command to run the MCP server
CMD ["python", "main.py"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# MCP Server Example
[![smithery badge](https://smithery.ai/badge/@alejandro-ao/mcp-server-example)](https://smithery.ai/server/@alejandro-ao/mcp-server-example)

This repository contains an implementation of a Model Context Protocol (MCP) server for educational purposes. This code demonstrates how to build a functional MCP server that can integrate with various LLM clients.

Expand Down Expand Up @@ -41,6 +42,14 @@ MCP servers can provide three main types of capabilities:

## Getting Started

### Installing via Smithery

To install MCP Server Example for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@alejandro-ao/mcp-server-example):

```bash
npx -y @smithery/cli install @alejandro-ao/mcp-server-example --client claude
```

### Installing uv Package Manager

On MacOS/Linux:
Expand Down
17 changes: 17 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml

startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
properties:
serperApiKey:
type: string
description: API key for the SERPER service
commandFunction:
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|-
(config) => ({ command: 'python', args: ['main.py'], env: { SERPER_API_KEY: config.serperApiKey || '' } })
exampleConfig:
serperApiKey: dummy-api-key-1234