Skip to content

Commit 8bc0d36

Browse files
authored
[texttoolkit-mcp-server] feat: upload a new server (#68)
1 parent 0ada24c commit 8bc0d36

16 files changed

+8700
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"actorSpecification": 1,
3+
"name": "texttoolkit-mcp-server",
4+
"title": "TextToolKit MCP server",
5+
"description": "A Model Context Protocol (MCP) server providing advanced text transformation, formatting, and analysis tools for AI workflows and automation.",
6+
"version": "0.0",
7+
"buildTag": "latest",
8+
"usesStandbyMode": true,
9+
"meta": {
10+
"templateId": "ts-mcp-server"
11+
},
12+
"dockerfile": "../Dockerfile",
13+
"webServerMcpPath": "/mcp"
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"actor-start": {
3+
"eventTitle": "Actor Start Fee",
4+
"eventDescription": "Fee charged when the Actor is started.",
5+
"eventPriceUsd": 0.1
6+
},
7+
"tool": {
8+
"eventTitle": "Tool Usage Fee",
9+
"eventDescription": "Fee charged for each tool usage.",
10+
"eventPriceUsd": 0.05
11+
}
12+
}
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

texttoolkit-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
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.prettierignore

texttoolkit-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+
}

texttoolkit-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 --chown=myuser:myuser 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 --chown=myuser:myuser . ./
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 --chown=myuser:myuser 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 --chown=myuser:myuser /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 --chown=myuser:myuser . ./
54+
55+
# Run the image.
56+
CMD npm run start:prod --silent

texttoolkit-mcp-server/README.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
## TextToolkit MCP Server
2+
3+
A Model Context Protocol (MCP) server that provides text transformation, formatting, and analysis tools for AI workflows.
4+
5+
**About this MCP Server:** For details on connecting and using this MCP server, see the official Model Context Protocol documentation at [mcp.apify.com](https://mcp.apify.com).
6+
7+
## Connection URL
8+
MCP clients can connect to this server at:
9+
10+
```text
11+
https://mcp-servers--formatter-mcp-server.apify.actor/mcp
12+
```
13+
14+
## Client Configuration
15+
To connect to this MCP server, use the following configuration in your MCP client:
16+
17+
```json
18+
{
19+
"mcpServers": {
20+
"text-toolkit": {
21+
"url": "https://mcp-servers--formatter-mcp-server.apify.actor/mcp",
22+
"headers": {
23+
"Authorization": "Bearer YOUR_APIFY_TOKEN"
24+
}
25+
}
26+
}
27+
}
28+
```
29+
30+
**Note:** Replace `YOUR_APIFY_TOKEN` with your Apify API token. You can find your token in the [Apify Console](https://console.apify.com/account/integrations).
31+
32+
## 🚩 Claim this MCP server
33+
All credits to the original authors of [https://github.com/Cicatriiz/text-toolkit](https://github.com/Cicatriiz/text-toolkit)
34+
To claim this server, please write to [[email protected]](mailto:[email protected]).
35+
36+
## Features
37+
38+
- Transform, format, and analyze text
39+
- Case conversions (camelCase, snake_case, etc.)
40+
- String encoding/decoding (Base64, URL, HTML)
41+
- JSON, XML, SQL, HTML formatting
42+
- Text analysis (character, word, line count, readability)
43+
- String manipulation (trim, substring, replace, split, join)
44+
- UUID generation and validation
45+
- Hash generation (MD5, SHA, HMAC)
46+
- Lorem Ipsum generation
47+
- Regex pattern testing and manipulation
48+
49+
## Available Tools
50+
51+
This server provides the following tools:
52+
53+
- `case_to_camel`: Convert text to camelCase
54+
- `case_to_pascal`: Convert text to PascalCase
55+
- `case_to_snake`: Convert text to snake_case
56+
- `case_to_kebab`: Convert text to kebab-case
57+
- `case_to_constant`: Convert text to CONSTANT_CASE
58+
- `case_to_dot`: Convert text to dot.case
59+
- `case_to_no`: Convert text to no case
60+
- `case_to_pascal_snake`: Convert text to Pascal_Snake_Case
61+
- `case_to_path`: Convert text to path/case
62+
- `case_to_sentence`: Convert text to Sentence case
63+
- `case_to_train`: Convert text to Train-Case
64+
- `case_to_capital`: Convert text to Capital Case
65+
- `encode_base64`: Encode text to Base64
66+
- `decode_base64`: Decode Base64 to text
67+
- `encode_url`: Encode text for URLs
68+
- `decode_url`: Decode URL-encoded text
69+
- `encode_html`: Encode HTML entities
70+
- `decode_html`: Decode HTML entities
71+
- `format_json`: Format and beautify JSON
72+
- `format_xml`: Format and beautify XML
73+
- `format_sql`: Format and beautify SQL
74+
- `format_html`: Format and beautify HTML
75+
- `count_characters`: Count characters in text
76+
- `count_words`: Count words in text
77+
- `count_lines`: Count lines in text
78+
- `analyze_readability`: Calculate readability metrics
79+
- `string_trim`: Trim whitespace from text
80+
- `string_substring`: Extract a substring
81+
- `string_replace`: Replace text
82+
- `string_split`: Split text into an array
83+
- `string_join`: Join an array into text
84+
- `generate_uuid`: Generate a UUID
85+
- `validate_uuid`: Validate a UUID
86+
- `generate_md5`: Generate MD5 hash
87+
- `generate_sha1`: Generate SHA-1 hash
88+
- `generate_sha256`: Generate SHA-256 hash
89+
- `generate_sha512`: Generate SHA-512 hash
90+
- `generate_hmac`: Generate HMAC hash
91+
- `generate_lorem_ipsum`: Generate lorem ipsum text
92+
- `regex_test`: Test a regex pattern against text
93+
- `regex_replace`: Replace text using a regex pattern
94+
- `regex_extract`: Extract matches using a regex pattern
95+
- `regex_split`: Split text using a regex pattern
96+
97+
## Tool Details
98+
99+
### Example: case_to_camel
100+
Converts text to camelCase.
101+
102+
Parameters:
103+
- `text`: The text to transform
104+
- `delimiter` (optional): The character to use between words
105+
- `locale` (optional): Locale for case conversion
106+
- `mergeAmbiguousCharacters` (optional): Whether to merge ambiguous characters
107+
108+
Example:
109+
```json
110+
{
111+
"text": "hello world test"
112+
}
113+
```
114+
Response:
115+
```json
116+
{
117+
"result": "helloWorldTest"
118+
}
119+
```
120+
121+
### Example: format_json
122+
Formats and beautifies JSON.
123+
124+
Parameters:
125+
- `text`: The JSON text to format
126+
- `indent_size` (optional): Number of spaces for indentation (1-8). Defaults to 2.
127+
128+
Example:
129+
```json
130+
{
131+
"text": "{\"name\":\"John\",\"age\":30,\"city\":\"New York\"}",
132+
"indent_size": 4
133+
}
134+
```
135+
Response:
136+
```json
137+
{
138+
"result": "{\n \"name\": \"John\",\n \"age\": 30,\n \"city\": \"New York\"\n}"
139+
}
140+
```
141+
142+
## References
143+
To learn more about Apify and Actors, take a look at the following resources:
144+
- [Apify SDK for JavaScript documentation](https://docs.apify.com/sdk/js)
145+
- [Apify SDK for Python documentation](https://docs.apify.com/sdk/python)
146+
- [Apify Platform documentation](https://docs.apify.com/platform)
147+
- [Apify MCP Server](https://docs.apify.com/platform/integrations/mcp)
148+
- [Webinar: Building and Monetizing MCP Servers on Apify](https://www.youtube.com/watch?v=w3AH3jIrXXo)
149+
- [Join our developer community on Discord](https://discord.com/invite/jyEM2PRvMU)
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)