- Home
- MCP servers
- MCP Practice
MCP Practice
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run a specialized MCP server that counts Japanese text characters by grapheme, ensuring accurate results for complex scripts and surrogate pairs. This server exposes a simple MCP API you can connect to from Web ChatGPT’s New Connector, making it easy to count grapheme counts in real time and integrate with your workflows.
How to use
Connect your MCP client to the server endpoint to start counting grapheme-based Japanese characters. In development, you will access the MCP endpoint at the provided URL and send requests to obtain character counts for given text. You can then integrate the response into your UI or automation flows. When you test, ensure the client points to the endpoint URL and handles the response format shown in examples.
How to install
Prerequisites you need to install and run this MCP server are a working Node.js environment and npm. Ensure Node.js is installed on your system before proceeding.
Step 1: Install project dependencies.
npm install
Step 2: Start the development server.
npm run dev
Development server endpoint for MCP is ready at http://localhost:3000/api/mcp. In production, point your client to the production URL you deploy to.
Configuration and endpoints
The server exposes an HTTP MCP endpoint you can connect to from the New Connector in Web ChatGPT. The development URL is http://localhost:3000/api/mcp.
HTTP endpoint details
POST /api/mcp
GET /api/mcp
DELETE /api/mcp
OPTIONS /api/mcp
Sample response when invoking the grapheme counter tool might resemble the structure shown below.
{
"content": [
{
"type": "text",
"text": "文字数: 9"
}
],
"structuredContent": {
"count": 9,
"text": "こんにちは、世界!"
}
}
Deployment options
You can deploy the MCP server to a hosting platform of your choice. Typical options include Vercel, Netlify, or Railway. Each option has its own deployment steps for building and serving the application.
Vercel example workflow
# Vercel CLI is installed once per machine
npm install -g vercel
# Deploy the project (in your project directory)
vercel
# Deploy to production
vercel --prod
Netlify and Railway provide similar deployment pathways. For Netlify, use the Netlify CLI and run a prod deployment; for Railway, create a new project and connect your GitHub repository, then start the deployment with the provided commands.
Notes and security
Environment variables are not required for basic operation. For production with multiple instances, consider using an external session store such as Redis to help with scalability and reliability.
For local development, you can install a Redis client library if you plan to enable external session storage later. Example: npm install ioredis.
Tools and capabilities
countJapaneseChars tool counts Japanese grapheme clusters using Intl.Segmenter to accurately account for combining characters and surrogate pairs.
Available tools
countJapaneseChars
Counts Japanese grapheme clusters accurately using Intl.Segmenter, handling surrogate pairs and combining characters to return grapheme-based character counts.