-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
582be2c
commit 6a2681d
Showing
6 changed files
with
589 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use UV's Python image as builder | ||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder | ||
|
||
WORKDIR /app | ||
|
||
# Enable bytecode compilation and copy mode | ||
ENV UV_COMPILE_BYTECODE=1 | ||
ENV UV_LINK_MODE=copy | ||
|
||
# Install dependencies | ||
COPY pyproject.toml ./ | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv pip install --system -r pyproject.toml | ||
|
||
# Copy and install source code | ||
COPY . /app/ | ||
|
||
# Final stage | ||
FROM python:3.12-slim-bookworm | ||
|
||
WORKDIR /app | ||
|
||
# Copy installed packages and source code | ||
COPY --from=builder /usr/local/lib/python3.12/site-packages/ /usr/local/lib/python3.12/site-packages/ | ||
COPY --from=builder /app/server.py /app/server.py | ||
|
||
CMD ["python", "server.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,53 @@ | ||
# Setup MCP | ||
`./setup.sh` | ||
# MCP Server | ||
|
||
# MCP | ||
## MCP Server | ||
MCP Server is created on top of all the APIs from the Social Toolkit. All APIs are exposed as tools in the MCP protocol and available for any AI application to integrate with. | ||
|
||
**Note:** Currently MCP only supports local connections, so it doesn't support remote use of these tools. | ||
|
||
# Try it! | ||
Run the MCP to try out the Social Toolkit using natural language. | ||
## Setup | ||
|
||
`./run.sh` | ||
### Docker Setup | ||
Build the Docker image: | ||
```bash | ||
docker build -t social-toolkit/mcp . | ||
``` | ||
|
||
Run the MCP server using Docker: | ||
```bash | ||
docker run -i --rm social-toolkit/mcp | ||
``` | ||
|
||
### Usage with Claude Desktop | ||
|
||
Add the following to your `claude_desktop_config.json`: | ||
|
||
```json | ||
{ | ||
"mcpServers": { | ||
"social-toolkit": { | ||
"command": "docker", | ||
"args": [ | ||
"run", | ||
"-i", | ||
"--rm", | ||
"social-toolkit/mcp" | ||
] | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## MCP Client Sample | ||
Run the MCP client locally to try out the Social Toolkit using natural language: | ||
|
||
### Setup | ||
```bash | ||
./setup.sh | ||
``` | ||
|
||
### Run | ||
```bash | ||
./run.sh | ||
``` | ||
|
||
It will run both MCP server and client, connected to each other. The terminal will prompt for natural language queries from the user, which then will be translated into MCP tool calls to answer the user query. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
npx @modelcontextprotocol/inspector \ | ||
docker \ | ||
run \ | ||
-i \ | ||
--rm \ | ||
social-toolkit/mcp |
Oops, something went wrong.