Token Counter

com.apishedPublished by apished.comOfficial publisherv1.0.0Updated Oct 24, 2026

Counts tokens under OpenAI-compatible (tiktoken) encodings, by model or encoding name.

The publisher's own server: APIShed

VerifiedStreamable HTTPWeb executableAI & ML

Overview

AI-generated overview

Lets an assistant count tokens for text using OpenAI-compatible tiktoken encodings, chosen by model name or encoding name.

What you can do
It exposes a single tool, tokens_count, that counts tokens under an OpenAI-compatible (tiktoken) encoding. You supply exactly one of a model name such as gpt-4o or an encoding name such as o200k_base or cl100k_base. It does not support Claude or Anthropic tokenizers.
When to use it
Useful when you need to check how many tokens a prompt or document will consume under OpenAI-style models, for example to stay within context limits or estimate usage before sending text to a model.
Requirements
A remote endpoint at apished.com over streamable HTTP; no package, account, API key, environment variable or header is declared. Network access to that endpoint is needed.
Before you install
Text you submit is sent to a third-party remote endpoint for counting. Only OpenAI-compatible encodings are covered, so counts for Claude or Anthropic models will not be accurate.

How AI overviews are written and checked

Installation

In SourceWeft

  1. Open Token Counter in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/com.apished%2Ftoken-counter/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "token-counter": {
      "type": "http",
      "url": "https://apished.com/mcp/v1/tokens"
    }
  }
}

Tools

1

tokens_count

Counts tokens under an OpenAI-compatible (tiktoken) encoding. Provide exactly one of model (e.g. "gpt-4o") or encoding ("o200k_base" or "cl100k_base"). No Claude/Anthropic tokenizer.

Parameterstextrequiredmodelencoding

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

83% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts

    Declare a GitHub repository with a README, or serve resource_documentation in the OAuth protected-resource metadata.

  • LicenseNot applicable

    A hosted service is used under its provider's terms, so no license is expected here. This check is left out of the percentage.

How this score is calculated

Other Apished integrations