@berrydev-ai/mcp-servers
v1.0.0
Published
Collection of MCP servers for personal use
Readme
MCP Servers
A collection of Model Context Protocol (MCP) servers for personal use, built with TypeScript and the FastMCP framework.
Overview
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.
Features
Tiktoken Tool
- 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
Claude Desktop Integration
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.
Quick Setup
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.
Installation
npm installPublishing to NPM
This 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 publishDevelopment
Build the project
npm run buildDevelopment mode (watch)
npm run devRun the server
npm startInspect with MCP Inspector
npm run inspectorInspect with FastMCP CLI
npm run mcp-cliTesting
Run tests:
npm testCode Quality
Type checking
npm run type-checkLinting
npm run lint
npm run lint:fix # Auto-fix issuesFormatting
npm run format # Format code
npm run format:check # Check formattingRun all checks
npm run checkProject Structure
src/
├── index.ts # Main server entry point
└── tools/
├── tiktoken.ts # Token counting tool
└── tiktoken.spec.ts # Tests for tiktoken toolAvailable Tools
tiktoken
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!"
}
}CI/CD
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
Configuration
TypeScript
- Target: ES2022
- Module: NodeNext (for proper ES module support)
- Strict mode enabled
- Source maps and declarations generated
Dependencies
- Runtime:
fastmcp,js-tiktoken,zod - Development: TypeScript, ESLint, Prettier, Vitest
License
MIT
Author
Eric Berry ([email protected])
