Skip to content

Commit 951a333

Browse files
authored
Merge pull request #1 from smithery-ai/smithery/config-lz2o
Deployment: Dockerfile and Smithery config
2 parents 6ae41f4 + cc74c50 commit 951a333

File tree

3 files changed

+66
-1
lines changed

3 files changed

+66
-1
lines changed

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
# Use a Python image with uv pre-installed
3+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv
4+
5+
# Set the working directory
6+
WORKDIR /app
7+
8+
# Copy the project files into the container
9+
COPY . .
10+
11+
# Install the project's dependencies using the lockfile and settings
12+
RUN --mount=type=cache,target=/root/.cache/uv \
13+
--mount=type=bind,source=uv.lock,target=uv.lock \
14+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
15+
uv sync --frozen --no-install-project --no-dev --no-editable
16+
17+
# Then, add the rest of the project source code and install it
18+
ADD . /app
19+
RUN --mount=type=cache,target=/root/.cache/uv \
20+
uv sync --frozen --no-dev --no-editable
21+
22+
# Define the base image for runtime
23+
FROM python:3.12-slim-bookworm
24+
25+
# Set the working directory
26+
WORKDIR /app
27+
28+
# Copy necessary files from the build stage
29+
COPY --from=uv /root/.local /root/.local
30+
COPY --from=uv --chown=app:app /app/.venv /app/.venv
31+
32+
# Place executables in the environment at the front of the path
33+
ENV PATH="/app/.venv/bin:$PATH"
34+
35+
# Set the entrypoint for the Docker container
36+
ENTRYPOINT ["perplexity-advanced-mcp"]

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/code-yeongyu/perplexity-advanced-mcp)
66
[![PyPI](https://img.shields.io/badge/pypi-3775A9?style=for-the-badge&logo=pypi&logoColor=white)](https://pypi.org/project/perplexity-advanced-mcp)
7+
[![smithery badge](https://smithery.ai/badge/@code-yeongyu/perplexity-advanced-mcp)](https://smithery.ai/server/@code-yeongyu/perplexity-advanced-mcp)
78

89
[한국어](README-ko.md)
910

@@ -89,6 +90,14 @@ This configuration helps AI assistants better understand when and how to use the
8990

9091
## Usage
9192

93+
### Installing via Smithery
94+
95+
To install Perplexity Advanced MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@code-yeongyu/perplexity-advanced-mcp):
96+
97+
```bash
98+
npx -y @smithery/cli install @code-yeongyu/perplexity-advanced-mcp --client claude
99+
```
100+
92101
### Quick Start with [uvx](https://docs.astral.sh/uv/guides/tools/)
93102

94103
The easiest way to run the MCP server is using [uvx](https://docs.astral.sh/uv/guides/tools/):
@@ -167,4 +176,3 @@ Contributions are welcome! Please follow the existing code style and commit guid
167176
## License
168177

169178
This project is licensed under the MIT License.
170-

smithery.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
2+
3+
startCommand:
4+
type: stdio
5+
configSchema:
6+
# JSON Schema defining the configuration options for the MCP.
7+
type: object
8+
required:
9+
- apiKey
10+
- apiType
11+
properties:
12+
apiKey:
13+
type: string
14+
description: API key for either OpenRouter or Perplexity.
15+
apiType:
16+
type: string
17+
description: "Specifies which API to use: openrouter or perplexity."
18+
commandFunction:
19+
# A function that produces the CLI command to start the MCP on stdio.
20+
|-
21+
(config) => ({ command: 'perplexity-advanced-mcp', args: [`-${config.apiType === 'openrouter' ? 'o' : 'p'}`, config.apiKey] })

0 commit comments

Comments
 (0)