flatten-mcp
Rank #1,857io.github.shayaShav/flatten-mcp
Cut a Claude Code session's context tokens losslessly — the reversible alternative to /compact.
flatten-mcp is a Model Context Protocol (MCP) server published by shayashav. It ranks #1,857 of 132,046 servers tracked on MCP Toplist, and its repository has 7 GitHub stars. flatten-mcp is listed across 3 registries — PulseMCP, Glama and mcp.so, with 21 release tags tracked from its GitHub repository. It was first listed on Jun 12, 2026 and most recently updated on Jul 22, 2026.
Ranks ahead of 130,189 of 132,046 servers on MCP Toplist.
Use flatten-mcp
No credentials or required configuration declared — add it to your MCP client and go.
claude mcp add --transport http flatten-mcp https://shaya.cloud/flatten-mcpclaude mcp add flatten-mcp -e "FLATTEN_COUNT_EXACT=<your FLATTEN_COUNT_EXACT>" -e "ANTHROPIC_API_KEY=<your ANTHROPIC_API_KEY>" -e "FLATTEN_COUNT_MODEL=<your FLATTEN_COUNT_MODEL>" -e "FLATTEN_INMEMORY_TOOLS=<your FLATTEN_INMEMORY_TOOLS>" -e "CLAUDE_CONFIG_DIR=<your CLAUDE_CONFIG_DIR>" -- npx -y flatten-mcpReplace each placeholder with your own value before saving.
[mcp_servers.flatten-mcp]
url = "https://shaya.cloud/flatten-mcp"Add to ~/.codex/config.toml.
[mcp_servers.flatten-mcp]
command = "npx"
args = ["-y", "flatten-mcp"]
[mcp_servers.flatten-mcp.env]
FLATTEN_COUNT_EXACT = "<your FLATTEN_COUNT_EXACT>"
ANTHROPIC_API_KEY = "<your ANTHROPIC_API_KEY>"
FLATTEN_COUNT_MODEL = "<your FLATTEN_COUNT_MODEL>"
FLATTEN_INMEMORY_TOOLS = "<your FLATTEN_INMEMORY_TOOLS>"
CLAUDE_CONFIG_DIR = "<your CLAUDE_CONFIG_DIR>"Add to ~/.codex/config.toml. Replace each placeholder with your own value before saving.
https://shaya.cloud/flatten-mcpSettings → Connectors → “Add custom connector”, then paste this URL.
{
"mcpServers": {
"flatten-mcp": {
"command": "npx",
"args": [
"-y",
"flatten-mcp"
],
"env": {
"FLATTEN_COUNT_EXACT": "<your FLATTEN_COUNT_EXACT>",
"ANTHROPIC_API_KEY": "<your ANTHROPIC_API_KEY>",
"FLATTEN_COUNT_MODEL": "<your FLATTEN_COUNT_MODEL>",
"FLATTEN_INMEMORY_TOOLS": "<your FLATTEN_INMEMORY_TOOLS>",
"CLAUDE_CONFIG_DIR": "<your CLAUDE_CONFIG_DIR>"
}
}
}
}Add to claude_desktop_config.json (Settings → Developer → Edit Config). Replace each placeholder with your own value before saving.
{
"mcpServers": {
"flatten-mcp": {
"url": "https://shaya.cloud/flatten-mcp"
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project).
{
"mcpServers": {
"flatten-mcp": {
"command": "npx",
"args": [
"-y",
"flatten-mcp"
],
"env": {
"FLATTEN_COUNT_EXACT": "<your FLATTEN_COUNT_EXACT>",
"ANTHROPIC_API_KEY": "<your ANTHROPIC_API_KEY>",
"FLATTEN_COUNT_MODEL": "<your FLATTEN_COUNT_MODEL>",
"FLATTEN_INMEMORY_TOOLS": "<your FLATTEN_INMEMORY_TOOLS>",
"CLAUDE_CONFIG_DIR": "<your CLAUDE_CONFIG_DIR>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project). Replace each placeholder with your own value before saving.
{
"servers": {
"flatten-mcp": {
"type": "http",
"url": "https://shaya.cloud/flatten-mcp"
}
}
}Save as .vscode/mcp.json in your workspace.
{
"servers": {
"flatten-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"flatten-mcp"
],
"env": {
"FLATTEN_COUNT_EXACT": "<your FLATTEN_COUNT_EXACT>",
"ANTHROPIC_API_KEY": "<your ANTHROPIC_API_KEY>",
"FLATTEN_COUNT_MODEL": "<your FLATTEN_COUNT_MODEL>",
"FLATTEN_INMEMORY_TOOLS": "<your FLATTEN_INMEMORY_TOOLS>",
"CLAUDE_CONFIG_DIR": "<your CLAUDE_CONFIG_DIR>"
}
}
}
}Save as .vscode/mcp.json in your workspace. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"flatten-mcp": {
"serverUrl": "https://shaya.cloud/flatten-mcp"
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
{
"mcpServers": {
"flatten-mcp": {
"command": "npx",
"args": [
"-y",
"flatten-mcp"
],
"env": {
"FLATTEN_COUNT_EXACT": "<your FLATTEN_COUNT_EXACT>",
"ANTHROPIC_API_KEY": "<your ANTHROPIC_API_KEY>",
"FLATTEN_COUNT_MODEL": "<your FLATTEN_COUNT_MODEL>",
"FLATTEN_INMEMORY_TOOLS": "<your FLATTEN_INMEMORY_TOOLS>",
"CLAUDE_CONFIG_DIR": "<your CLAUDE_CONFIG_DIR>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"flatten-mcp": {
"url": "https://shaya.cloud/flatten-mcp"
}
}
}{
"mcpServers": {
"flatten-mcp": {
"command": "npx",
"args": [
"-y",
"flatten-mcp"
],
"env": {
"FLATTEN_COUNT_EXACT": "<your FLATTEN_COUNT_EXACT>",
"ANTHROPIC_API_KEY": "<your ANTHROPIC_API_KEY>",
"FLATTEN_COUNT_MODEL": "<your FLATTEN_COUNT_MODEL>",
"FLATTEN_INMEMORY_TOOLS": "<your FLATTEN_INMEMORY_TOOLS>",
"CLAUDE_CONFIG_DIR": "<your CLAUDE_CONFIG_DIR>"
}
}
}
}Replace each placeholder with your own value before saving.
Show your rank
Maintain this server? Add the live rank badge to your README — it updates automatically as the leaderboard changes.
[](https://mcptoplist.com/server/io.github.shayaShav%2Fflatten-mcp)<a href="https://mcptoplist.com/server/io.github.shayaShav%2Fflatten-mcp"><img src="https://mcptoplist.com/badge/io.github.shayaShav%2Fflatten-mcp.svg" alt="MCP Toplist: Top 5% of 132,046" /></a>Variants: append ?metric=score or ?metric=stars to the image URL.
Listed on 2 registries (1 delisted)
shayashav
GitHub releases (21)
No registry surfaces explicit version metadata for this server. The list below shows release tags from the linked GitHub repository.
| Version | Published |
|---|---|
| v2.6.1 | Jul 22, 2026 |
| v2.6.0 | Jul 21, 2026 |
| v2.5.1 | Jul 16, 2026 |
| v2.5.0 | Jul 12, 2026 |
| v2.4.0 | Jul 12, 2026 |
| v2.3.0 | Jul 11, 2026 |
| v2.2.3 | Jul 11, 2026 |
| v2.2.2 | Jul 10, 2026 |
| v2.2.1 | Jul 10, 2026 |
| v2.2.0 | Jul 3, 2026 |
| v2.1.0 | Jul 2, 2026 |
| v2.0.5 | Jul 2, 2026 |
| v2.0.4 | Jul 2, 2026 |
| v2.0.3 | Jul 2, 2026 |
| v2.0.2 | Jul 1, 2026 |
| v2.0.1 | Jul 1, 2026 |
| v1.1.0 | Jun 19, 2026 |
| v1.0.3 | Jun 13, 2026 |
| v1.0.2 | Jun 13, 2026 |
| v1.0.1 | Jun 13, 2026 |
| v1.0.0 | Jun 12, 2026 |
Frequently asked questions
- Who maintains flatten-mcp?
- flatten-mcp is maintained by shayashav, which publishes 1 MCP server (21 total versions) tracked on MCP Toplist.
- Is flatten-mcp listed on the Official MCP Registry?
- flatten-mcp is not on the Official MCP Registry. It is listed on PulseMCP, Glama and mcp.so.
- How many versions does flatten-mcp have?
- No registry surfaces explicit version metadata for flatten-mcp; MCP Toplist tracks 21 release tags from its GitHub repository, most recently published on Jul 22, 2026.
- Where can I find the source code for flatten-mcp?
- The source code for flatten-mcp is hosted at github.com/shayashav/flatten-mcp.
Do you run this server?
Community projects list the MCP servers behind real agents and apps. Publish yours and this page will link to it.