A collection of Model Context Protocol (MCP) servers for personal use, built with TypeScript and the FastMCP framework.
This project provides MCP servers that can be used with AI assistants and other applications that support the Model Context Protocol. Currently includes tools for token counting and text analysis.
- Token Counting: Determine the number of tokens in text using the
js-tiktokenlibrary - Uses the
o200k_baseencoding (GPT-4 tokenizer) - Useful for managing token limits in AI applications
This package is designed to work with Claude Desktop's MCP Server configuration. You can use it directly with npx without needing to install it locally.
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"berrydev-mcp-servers": {
"command": "npx",
"args": [
"-y",
"@berrydev-ai/mcp-servers"
],
"env": {}
}
}
}After adding this configuration, restart Claude Desktop. The tiktoken tool will be available for token counting operations.
npm installThis package is configured to be published to NPM for use with npx. The package includes:
- Executable binary configuration
- Automatic builds before publishing
- Proper file inclusion for distribution
npm publishnpm run buildnpm run devnpm startnpm run inspectornpm run mcp-cliRun tests:
npm testnpm run type-checknpm run lint
npm run lint:fix # Auto-fix issuesnpm run format # Format code
npm run format:check # Check formattingnpm run checksrc/
├── index.ts # Main server entry point
└── tools/
├── tiktoken.ts # Token counting tool
└── tiktoken.spec.ts # Tests for tiktoken tool
Counts tokens in the provided text using the GPT-4 tokenizer.
Parameters:
text(string): The text to analyze (minimum 1 character)
Returns:
- Token count as a number
Example usage in Claude Desktop: Once configured, you can ask Claude to count tokens in text, and it will automatically use this tool.
Direct API usage:
{
"name": "tiktoken",
"arguments": {
"text": "Hello, world!"
}
}The project includes GitHub Actions workflows for:
- Continuous Integration: Runs tests, linting, and type checking on Node.js 18.x and 20.x
- NPM Publishing: Automated publishing to NPM and GitHub Packages
- Target: ES2022
- Module: NodeNext (for proper ES module support)
- Strict mode enabled
- Source maps and declarations generated
- Runtime:
fastmcp,js-tiktoken,zod - Development: TypeScript, ESLint, Prettier, Vitest
MIT
Eric Berry (eric@berrydev.ai)