Skip to content

Commit 205f97c

Browse files
Winston AI MCP Server: initial development (#64)
1 parent 57be8e9 commit 205f97c

16 files changed

+8412
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"actorSpecification": 1,
3+
"name": "winston-mcp-server",
4+
"title": "Winston AI MCP server",
5+
"description": "Run the Winston AI Model Context Protocol server, giving language models real-time access to advanced AI text and image detection, plagiarism checks, and text comparison capabilities.",
6+
"version": "0.0",
7+
"buildTag": "latest",
8+
"usesStandbyMode": true,
9+
"meta": {
10+
"templateId": "ts-mcp-server"
11+
},
12+
"input": {
13+
"title": "Actor input schema",
14+
"description": "This is Actor input schema",
15+
"type": "object",
16+
"schemaVersion": 1,
17+
"properties": {},
18+
"required": []
19+
},
20+
"dockerfile": "../Dockerfile",
21+
"webServerMcpPath": "/mcp"
22+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"tool-request": {
3+
"eventTitle": "Generic Tool Request",
4+
"eventDescription": "Fallback charge for unclassified or generic tool calls.",
5+
"eventPriceUsd": 0.0005,
6+
"unit": "call"
7+
},
8+
"winston-ai-credits-consumed": {
9+
"eventTitle": "Input count based price event",
10+
"eventDescription": "Event fired by input-based tools, where the price is determined by token consumption.",
11+
"eventPriceUsd": 0.000058,
12+
"unit": "call"
13+
}
14+
}

winston-mcp-server/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
end_of_line = lf

winston-mcp-server/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file tells Git which files shouldn't be added to source control
2+
3+
.idea
4+
.vscode
5+
.zed
6+
storage
7+
apify_storage
8+
crawlee_storage
9+
node_modules
10+
dist
11+
tsconfig.tsbuildinfo
12+
13+
# Added by Apify CLI
14+
.venv

winston-mcp-server/.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.prettierignore

winston-mcp-server/.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"tabWidth": 4
5+
}

winston-mcp-server/Dockerfile

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Specify the base Docker image. You can read more about
2+
# the available images at https://docs.apify.com/sdk/js/docs/guides/docker-images
3+
# You can also use any other image from Docker Hub.
4+
FROM apify/actor-node:22 AS builder
5+
6+
# Check preinstalled packages
7+
RUN npm ls crawlee apify puppeteer playwright
8+
9+
# Copy just package.json and package-lock.json
10+
# to speed up the build using Docker layer cache.
11+
COPY package*.json ./
12+
13+
# Install all dependencies. Don't audit to speed up the installation.
14+
RUN npm install --include=dev --audit=false
15+
16+
# Next, copy the source files using the user set
17+
# in the base image.
18+
COPY . ./
19+
20+
# Install all dependencies and build the project.
21+
# Don't audit to speed up the installation.
22+
RUN npm run build
23+
24+
# Create final image
25+
FROM apify/actor-node:22
26+
27+
# Check preinstalled packages
28+
RUN npm ls crawlee apify puppeteer playwright
29+
30+
# Copy just package.json and package-lock.json
31+
# to speed up the build using Docker layer cache.
32+
COPY package*.json ./
33+
34+
# Install NPM packages, skip optional and development dependencies to
35+
# keep the image small. Avoid logging too much and print the dependency
36+
# tree for debugging
37+
RUN npm --quiet set progress=false \
38+
&& npm install --omit=dev --omit=optional \
39+
&& echo "Installed NPM packages:" \
40+
&& (npm list --omit=dev --all || true) \
41+
&& echo "Node.js version:" \
42+
&& node --version \
43+
&& echo "NPM version:" \
44+
&& npm --version \
45+
&& rm -r ~/.npm
46+
47+
# Copy built JS files from builder image
48+
COPY --from=builder /usr/src/app/dist ./dist
49+
50+
# Next, copy the remaining files and directories with the source code.
51+
# Since we do this after NPM install, quick build will be really fast
52+
# for most source file changes.
53+
COPY . ./
54+
55+
# Run the image.
56+
CMD npm run start:prod --silent

winston-mcp-server/README.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
## Winston AI MCP Server (Apify Actor)
2+
3+
Run the **Winston AI Model Context Protocol (MCP) server** via this Apify Actor, giving language models **real-time access to advanced AI text and image detection, plagiarism checks, and sophisticated text comparison capabilities**. Use your Apify credits to integrate Winston AI's powerful detection features into your AI workflows—no fine-tuning required. ⚡️
4+
5+
This Actor proxies the Winston AI MCP Server, allowing AI clients to integrate directly with Winston AI's detection and analysis capabilities. It requires a valid Winston AI API Key for authentication.
6+
7+
About this MCP Server: To understand how to connect to and utilize MCP servers, please refer to the official Model Context Protocol documentation at [mcp.apify.com](https://mcp.apify.com).
8+
9+
## Connection URL
10+
MCP clients can connect to this server at:
11+
12+
```text
13+
https://mcp-servers--winston-ai-mcp-server.apify.actor/mcp
14+
```
15+
16+
## Client configuration
17+
To connect to this MCP server, use the following configuration in your MCP client:
18+
19+
```json
20+
{
21+
"mcpServers": {
22+
"winston-ai": {
23+
"url": "https://mcp-servers--winston-ai-mcp-server.apify.actor/mcp",
24+
"headers": {
25+
"Authorization": "Bearer YOUR_APIFY_TOKEN"
26+
},
27+
"env": {
28+
"WINSTONAI_API_KEY": "YOUR_WINSTON_AI_API_KEY"
29+
}
30+
}
31+
}
32+
}
33+
```
34+
35+
Note: Replace `YOUR_APIFY_TOKEN` with your actual Apify API token (find it in the [Apify Console](https://console.apify.com/account/integrations)). Also, set `WINSTONAI_API_KEY` with your actual Winston AI API Key, which you can obtain at [https://dev.gowinston.ai](https://dev.gowinston.ai). This key is essential for the Actor to authenticate with the Winston AI service.
36+
37+
## 🚩 Claim this MCP server
38+
All credits to the original authors of the Winston AI MCP server implementation.
39+
To claim this server, please write to [[email protected]](mailto:[email protected]).
40+
41+
---
42+
43+
## 🛠️ Available Tools
44+
45+
Your AI tool will have access to the following detection and analysis capabilities from Winston AI:
46+
47+
| Tool Name | Description |
48+
| :----------------------- | :------------------------------------------------------------------- |
49+
| `ai-text-detection` | Classify text as human-generated or AI-generated, with sentence-level analysis. |
50+
| `ai-image-detection` | Identify AI-generated images, including C2PA metadata and watermark detection. |
51+
| `plagiarism-detection` | Perform internet-scale plagiarism scans with detailed source reports. |
52+
| `text-compare` | Conduct bidirectional similarity analysis between two texts. |
53+
54+
Note: Refer to the Winston AI API Documentation (https://docs.gowinston.ai/api-reference/mcp-server) for detailed input parameters and usage of each tool.
55+
56+
### ✨ Example Usage
57+
58+
Your AI assistant should automatically use these tools for content analysis and detection.
59+
60+
#### AI Content Detection
61+
- "Check if this article about quantum computing was written by an AI or a human." (Uses `ai-text-detection`)
62+
- "Analyze this image: [image URL]. Is it AI-generated?" (Uses `ai-image-detection`)
63+
64+
#### Plagiarism & Comparison
65+
- "Scan this essay for plagiarism against online sources." (Uses `plagiarism-detection`)
66+
- "Compare these two text snippets for similarity: 'First text...' and 'Second text...'" (Uses `text-compare`)
67+
68+
## References
69+
To learn more about Apify and Actors, take a look at the following resources:
70+
- [Apify SDK for JavaScript documentation](https://docs.apify.com/sdk/js)
71+
- [Apify SDK for Python documentation](https://docs.apify.com/sdk/python)
72+
- [Apify Platform documentation](https://docs.apify.com/platform)
73+
- [Apify MCP Server](https://docs.apify.com/platform/integrations/mcp)
74+
- [Model Context Protocol documentation](https://mcp.apify.com)
75+
- [Webinar: Building and Monetizing MCP Servers on Apify](https://www.youtube.com/watch?v=w3AH3jIrXXo)
76+
- [Join our developer community on Discord](https://discord.com/invite/jyEM2PRvMU)
77+
78+
### Notes and Best Practices
79+
80+
* **Authentication:** This Apify Actor requires your Apify API token for access. The Actor itself authenticates with the Winston AI service using the `WINSTONAI_API_KEY` provided as an environment variable to the Actor. This key is crucial for the Actor's functionality. Obtain yours at [https://dev.gowinston.ai](https://dev.gowinston.ai).
81+
* **Rate Limits and Quotas:** Winston AI APIs and your Actor may enforce rate limits and have associated credit costs. Implement backoff/retry where appropriate and monitor your usage.
82+
* **Content Limits:** Be aware of minimum and maximum character/text/image size limits for Winston AI tools.
83+
* **Compliance:** Ensure your usage complies with your organization’s data governance and Winston AI’s terms of service.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import prettier from 'eslint-config-prettier';
2+
3+
import apify from '@apify/eslint-config/ts.js';
4+
import globals from 'globals';
5+
import tsEslint from 'typescript-eslint';
6+
7+
// eslint-disable-next-line import/no-default-export
8+
export default [
9+
{ ignores: ['**/dist', 'eslint.config.mjs'] },
10+
...apify,
11+
prettier,
12+
{
13+
languageOptions: {
14+
parser: tsEslint.parser,
15+
parserOptions: {
16+
project: 'tsconfig.json',
17+
},
18+
globals: {
19+
...globals.node,
20+
...globals.jest,
21+
},
22+
},
23+
plugins: {
24+
'@typescript-eslint': tsEslint.plugin,
25+
},
26+
rules: {
27+
'no-console': 0,
28+
},
29+
},
30+
];

0 commit comments

Comments
 (0)