MCP Smart Proxy 4ea513eb

MCP运维云端

提供方 Mourad95

运维云端 未标注 API Key 社区 / 第三方 Claude

MCP智能代理是一个本地运行的优化层,用于减少Model Context Protocol(MCP)的令牌消耗和上下文浪费,提高LLM的精确性和安全性。

一句话选型结论

按资料字段整理

MCP Smart Proxy 4ea513eb 属于运维云端类 MCP 服务器,传输方式未标注,API Key,可直接接入 Claude,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类运维云端 传输方式未标注 鉴权API Key 部署方式未标注
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

运维云端
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

智能代理TypeScript本地部署MCP优化本地运行语义路由令牌节省

安装与配置

未标注 API Key
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
云资源查询

查实例、存储、账单等云上资源状态。

部署与发布

把部署、重启、回滚这类操作接进对话。

监控与告警

拉取监控指标,异常时让模型帮你判断。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 已适配 Claude,换客户端不用重新研究配置。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP Smart Proxy 4ea513eb当前 未标注 未标注 未标注 无 2026-05-17
lobehub 未标注 stdio · 本地进程 本地部署 有 2026-04-11
TrendRadar 未标注 stdio · 本地进程 本地部署 有 2026-04-13
Ui Tars Desktop 8a825770 未标注 stdio · 本地进程 本地部署 有 2026-05-17
ruflo 未标注 stdio · 本地进程 本地部署 有 2026-04-13
FastGPT 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

运维云端
字段来自项目仓库与公开索引,中文说明由本站标注
提供方Mourad95上游标注的维护方 Mourad95
分类运维云端本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

17.2 KB
来自项目仓库与上游目录的原文,未做删改

MCP Smart Proxy

Intelligent proxy for Model Context Protocol (MCP) — fewer tokens, focused context, everything runs locally. No data leakage.

🎯 Why MCP Smart Proxy?

An optimization layer for the Model Context Protocol (MCP). Traditional implementations waste up to 81% of the context window (Cloudflare); this proxy cuts that to 10–30%.

Benefit Explanation
💰 Fewer tokens 70–90% less token consumption → lower cost, less waste.
🎯 More precise LLM Smaller, focused context → less noise, fewer hallucinations.
🔒 Secure, no leakage Runs entirely locally; no prompts or data sent to third parties.

✨ Key Features

  • Semantic Routing — Routes requests to the most relevant tools
  • Semantic Cache — Returns cached MCP responses when queries are semantically similar (see Semantic Cache)
  • Vector-Based Memory — Local embeddings (e.g. Xenova/all-MiniLM), no external API
  • Tool Aggregation — Unified interface for multiple MCP servers
  • Performance Monitoring — Real-time analytics and dashboard
  • Streamable HTTP — Upstream MCP servers use HTTP(S) endpoints (MCP Streamable HTTP), aligned with modern MCP clients (e.g. type: "streamable" where supported). MIT licensed.

⚡ Start quickly

The proxy exposes MCP Streamable HTTP on POST /mcp. You configure two things: (1) which upstream MCP servers the proxy calls (config/default.json in this repo), and (2) where your MCP client sends traffic (your editor or agent’s MCP settings — file path depends on the product — pointing at your proxy URL).

1. Run the proxy```bash

git clone https://github.com/Mourad95/mcp-smart-proxy.git
cd mcp-smart-proxy
npm ci
npm run build
node dist/index.js start --config ./config/default.json


Check: `curl http://localhost:3000/health` → `status: healthy`.

Default port is **3000** (see `port` in `config/default.json` or pass `--port 3000`).

### 2. Configure upstream MCP servers (inside this repo)

Edit **`config/default.json`** (or pass another file with `--config`). Under **`mcpServers`**, list each **remote MCP** the proxy should use. Each **`url`** must be a **Streamable HTTP** MCP URL (`http://` or `https://`, usually ending with `/mcp`).

Example (data.gouv.fr MCP):```json
"mcpServers": [
  {
    "name": "datagouv",
    "url": "https://mcp.data.gouv.fr/mcp",
    "description": "data.gouv.fr",
    "enabled": true,
    "timeout": 60000
  }
]
  • Set "enabled": true for every server you want active.
  • Optional headers (e.g. Composio x-api-key) are sent on every request to that upstream.
  • Restart the proxy after editing the file.

This file is only read by the proxy process. Your IDE does not open it directly.

3. Point your MCP client at the proxy (not at data.gouv directly)

In your client’s MCP configuration, add a streamable HTTP endpoint whose url is the proxy base URL including /mcp (exact file location depends on the editor or agent). Example shape:```json
{
"mcpServers": {
"mcp-smart-proxy": {
"type": "streamable",
"url": "http://127.0.0.1:3000/mcp"
}
}
}


Reload or restart the client so it picks up the change. Traffic flow: **MCP client** → `http://127.0.0.1:3000/mcp` → **proxy** → upstream URLs from step 2 (e.g. `https://mcp.data.gouv.fr/mcp`).

For **Claude Desktop** and clients that use `mcp-remote` to bridge HTTP MCP, point `mcp-remote` at the same proxy URL (`http://127.0.0.1:3000/mcp`) instead of the upstream server.

**Health & metrics:** `curl http://localhost:3000/health` · `curl http://localhost:3000/metrics` · Dashboard: `http://localhost:3000/dashboard` (if enabled and built).

### Other install options

| Method | Command |
|--------|---------|
| **Docker Compose** | `make docker-compose` then `curl http://localhost:3000/health` |
| **Makefile** | `make install && make build && make run` (or `make dev`) |
| **Global CLI** | `npm install -g mcp-smart-proxy` then `mcp-smart-proxy start --config ./config/default.json` |

Smoke scripts (optional): `node scripts/smoke-http.mjs` (no upstream), `node scripts/smoke-mcp-http.mjs` (requires upstream enabled + network).

## 📊 The problem: context waste & hallucinations

Traditional MCP wastes **81%** of the context (unnecessary tool descriptions, irrelevant context, duplication, poor tool choice). That also increases hallucinations — the model gets too much noise and fills gaps by inventing details.

**Our approach:** intelligent tool filtering, semantic context selection, deduplication, and optimized routing so the model receives less but targeted context → fewer hallucinations, better reliability.

## 🔒 Security and privacy

Runs entirely on your side: proxy, embeddings, and vector indexes stay on your machine or infra — **no prompts or data sent to third parties**. Responses are sanitized (API keys, tokens, DB URLs masked). You control which MCP servers and embedding models run where. See **SECURITY.md** for rate limiting, validation, and deployment.

## 🏗️ Architecture```mermaid
flowchart LR
  subgraph client[" "]
    A["MCP client"]
  end
  subgraph proxy[" "]
    B["MCP Smart Proxy"]
  end
  subgraph servers[" "]
    C[GitHub]
    D[SQLite]
    E[Filesystem]
    F[Custom...]
  end
  A -->|"request"| B
  B --> C
  B --> D
  B --> E
  B --> F
  C --> B
  D --> B
  E --> B
  F --> B
  B -->|"optimized response"| A

In one glance: the client talks only to the proxy; the proxy picks the right MCP servers (GitHub, SQLite, filesystem, etc.), trims context, and returns a lean answer — fewer tokens, fewer hallucinations, everything local.

Internal components (ASCII)```
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ MCP Client │ │ Smart Proxy │ │ MCP Servers │
│ (Claude, etc.)│ │ │ │ │
│ │ │ ┌───────────┐ │ │ ┌───────────┐ │
│ ┌───────────┐ │ │ │ Semantic │ │ │ │ Tool A │ │
│ │ Query │──┼───▶│ │ Router │──┼───▶│ │ │ │
│ └───────────┘ │ │ └───────────┘ │ │ └───────────┘ │
│ │ │ │ │ │
│ ┌───────────┐ │ │ ┌───────────┐ │ │ ┌───────────┐ │
│ │ Optimized │◀─┼────│ │ Context │◀─┼────│ │ Tool B │ │
│ │ Response │ │ │ │ Optimizer │ │ │ │ │ │
│ └───────────┘ │ │ └───────────┘ │ │ └───────────┘ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ ┌───────────┐ │
│ │ Vector │ │
│ │ Memory │ │
│ └───────────┘ │
└─────────────────┘


## ⚙️ Configuration

### Basic configuration

Use **`config/default.json`** (or copy it). Each **`mcpServers[].url`** is the **upstream** Streamable HTTP MCP endpoint (not the proxy URL).

### Secrets and `config/local.json` (not committed)

Put **API keys and machine-only overrides** in **`config/local.json`** in the **same directory** as the config file you pass to `--config` (e.g. `config/local.json` next to `config/default.json`). That file is **gitignored** and **merged** after the main file: top-level keys override, and **`mcpServers`** entries are merged **by `name`** (so you can add e.g. only `headers` for `composio`). Copy **`config/local.example.json`** to **`config/local.json`** and replace placeholders. **Rotate any secret that was ever committed** to the repository.

Example committed main file (no API keys in git):```json
{
  "port": 3000,
  "mcpServers": [
    {
      "name": "datagouv",
      "url": "https://mcp.data.gouv.fr/mcp",
      "description": "Example upstream MCP",
      "enabled": true,
      "timeout": 60000
    }
  ],
  "optimization": {
    "enabled": true,
    "maxContextTokens": 1000,
    "embeddingModel": "Xenova/all-MiniLM-L6-v2",
    "cacheEnabled": true,
    "semanticRouting": true,
    "minRelevanceScore": 0.3
  },
  "logging": { "level": "info", "format": "text" },
  "analytics": { "enabled": true, "retentionDays": 30, "dashboardEnabled": true }
}

tools/list optimization: When optimization.enabled is true, every tools/list runs the same optimizeContext path. If the client sends params.context.query, that string is used; otherwise toolsListOptimizationQuery (or env MCP_TOOLS_LIST_OPTIMIZATION_QUERY) supplies the default. If semantic filtering would remove every tool, the proxy falls back to the full tool list. When optimization is disabled, the proxy returns the full catalog (pass-through) and records catalog metrics.

Environment Variables```bash

Proxy configuration

export MCP_PROXY_PORT=3000
export MCP_PROXY_LOG_LEVEL=info

Optimization settings

export MCP_OPTIMIZATION_ENABLED=true
export MCP_MAX_CONTEXT_TOKENS=1000

Vector memory

export MCP_VECTOR_MEMORY_PATH="./.mcp-vector-index"
export MCP_EMBEDDING_MODEL="Xenova/all-MiniLM-L6-v2"

Optimization statistics and dashboard data (default: ./data/stats)

export MCP_STATS_DIR="./data/stats"


### Data storage

Optimization statistics and dashboard data are stored on disk so they survive restarts.

| Location | Content |
|----------|---------|
| **`MCP_STATS_DIR`** (default: `./data/stats`) | Directory for optimization stats. Contains `optimization-stats.json` (aggregated metrics: total requests, token savings, hourly breakdown, top tools), plus logs (`optimization.log`, `stats.json`). |
| **`./data/reports`** | Exported reports (JSON/CSV) when using the dashboard “Export report” or the `/api/reports/export` endpoint. |

Set `MCP_STATS_DIR` to change where stats are written (e.g. `/data/stats` in Docker). The “Recent requests” list in the dashboard is in-memory only and is cleared on proxy restart.

## 📁 Project structure (overview)```
mcp-smart-proxy/
├── src/
│   ├── index.ts                 # CLI entry (start, analyze, maintenance)
│   ├── proxy/
│   │   ├── server.ts            # Express: /health, /mcp, /optimize, /proxy/:name, …
│   │   └── mcp-http-transport.ts # MCP Streamable HTTP client to upstream servers
│   ├── optimization/
│   │   └── context-optimizer.ts
│   ├── memory/
│   │   └── vector-memory.ts
│   ├── cache/
│   │   └── semantic-cache.ts
│   ├── analytics/
│   ├── config/
│   └── types/
├── config/                   # default.json, production.json, local-smoke.json
├── scripts/                  # smoke-http.mjs, smoke-mcp-http.mjs
├── dashboard/                # Optional React dashboard (build with npm run build:full)
├── docs/                     # e.g. SEMANTIC-CACHE.md
└── package.json

📈 Performance Metrics

Token savings

Scenario Traditional MCP Smart Proxy Savings
Simple Query 1,000 tokens 300 tokens 70%
Complex Query 5,000 tokens 1,000 tokens 80%
Multi-tool 10,000 tokens 2,000 tokens 80%
Large Context 50,000 tokens 5,000 tokens 90%

Speed Improvements

  • Tool Selection: 50% faster with semantic routing
  • Context Processing: 70% reduction in processing time
  • Overall Latency: 30-50% improvement
  • Cache Hit Rate: > 80% for common queries

🔧 Advanced usage

  • Per-server forwarding: POST /proxy/:serverName with a JSON-RPC body forwards to the upstream server named in config/default.json (mcpServers[].name).
  • Optimization API: POST /optimize (public) or POST /api/optimize (dashboard auth if configured) with { "query": "...", "tools": [ ... ] }.
  • Library imports: the package is primarily distributed as a CLI; there is no stable SmartProxy / createProxy export in the published build—run via node dist/index.js or the mcp-smart-proxy binary after npm run build.

🧪 Testing```bash

npm test
npm run test:coverage


**Manual smoke tests** (proxy must be running):```bash
# No upstream MCP (only /health + /optimize)
node dist/index.js start --config ./config/local-smoke.json --port 3456
SMOKE_BASE_URL=http://127.0.0.1:3456 node scripts/smoke-http.mjs

# With upstream (enable server(s) in config/default.json, e.g. data.gouv)
node dist/index.js start --config ./config/default.json
node scripts/smoke-mcp-http.mjs

🔍 How it works

Semantic analysis (embeddings) → intelligent routing to MCP servers → context optimization (dedup, token-efficient format) → optional learning from query patterns.

📊 Monitoring

Dashboard at http://localhost:3000/dashboard. Metrics: curl http://localhost:3000/metrics (Prometheus: /metrics/prometheus, JSON: /analytics/json). Tracked: token savings, response time, cache hit rate, tool usage, error rates.

🔄 Maintenance

Regular Maintenance Tasks```bash

Run maintenance

npm run maintenance

Or via CLI

mcp-smart-proxy maintenance --optimize --cleanup


### Automated Maintenance```bash
# Set up cron job for daily maintenance
0 2 * * * cd /path/to/mcp-smart-proxy && npm run maintenance

🚨 Troubleshooting

Common Issues

"Proxy not connecting to MCP servers"```bash

curl http://localhost:3000/health


Ensure each **`mcpServers[].url`** is reachable (`https://…/mcp`), **`enabled`** is `true`, and the proxy was restarted after editing `config/default.json`.

#### "Slow performance"```bash
# Clear cache
mcp-smart-proxy maintenance --clear-cache

# Reduce optimization complexity
export MCP_OPTIMIZATION_LEVEL=basic

"High memory usage"```bash

Limit vector memory size

export MCP_VECTOR_MEMORY_MAX_SIZE=1000

Disable unused features

export MCP_SEMANTIC_ROUTING=false


### Debug Mode```bash
# Enable debug logging
DEBUG=mcp-smart-proxy:* npm start

# Or set environment variable
export MCP_DEBUG=true

🔮 Roadmap

Planned Features

  • [ ] Advanced ML Models: Better semantic understanding
  • [ ] Distributed Processing: Scale across multiple nodes
  • [ ] Plugin System: Custom optimizations and integrations
  • [ ] Real-time Dashboard: Live monitoring and control
  • [ ] API Gateway: REST API for programmatic access
  • [ ] Multi-protocol Support: Beyond MCP compatibility

In Progress

  • [x] Core Proxy: Basic routing and optimization
  • [x] Vector Memory: Semantic search and context selection
  • [x] Performance Monitoring: Metrics and analytics
  • [x] Documentation: Comprehensive guides and examples

🤝 Contributing

We welcome contributions from the community! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: npm test
  5. Submit a pull request

Development setup```bash

git clone https://github.com/Mourad95/mcp-smart-proxy.git && cd mcp-smart-proxy
make install && make build && make test


### Code Standards
- Follow TypeScript best practices
- Add tests for new features
- Update documentation
- Keep dependencies minimal

## 📚 Documentation

- Getting Started - First-time setup guide
- API Reference - Complete API documentation
- Advanced Usage - Custom configurations
- Semantic Cache - Semantic cache (similarity-based response caching)
- Performance Tuning - Optimization guide
- Troubleshooting - Common issues and solutions
- **SECURITY.md** - Security, privacy, local deployment

## 🐳 Production deployment

Production Docker setup: multi-stage Dockerfile, Docker Compose with sidecar MCP servers, health checks, persistent volumes (vector data), optional Prometheus + Grafana. See DEPLOYMENT.md for the full guide.

## 📄 License

MIT License - see LICENSE file for details.

## 🙏 Acknowledgments

- **Anthropic** for creating the Model Context Protocol
- **Cloudflare** for highlighting the context waste problem
- **OpenClaw Community** for inspiration and testing
- **All Contributors** for making this project better

## 🔗 Links

- **GitHub**: https://github.com/openclaw-community/mcp-smart-proxy
- **Documentation**: https://mcp-smart-proxy.openclaw.ai
- **Discord Community**: https://discord.com/invite/clawd
- **Issue Tracker**: https://github.com/openclaw-community/mcp-smart-proxy/issues

---

**Start optimizing your MCP usage today!** 🚀```bash
npm install mcp-smart-proxy

Fewer tokens, focused context, local-only — no data leakage. While Cloudflare shows MCP wastes 81% of context, we save up to 90%.

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
MCP Smart Proxy 4ea513eb 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

MCP Smart Proxy 4ea513eb 怎么在 Claude 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

MCP Smart Proxy 4ea513eb 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Smart Proxy 4ea513eb 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

MCP Smart Proxy 4ea513eb 支持哪些客户端?

资料标注支持 Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

MCP Smart Proxy 4ea513eb 能提供哪些能力?

资料显示能力标签包括 智能代理、本地运行、TypeScript、Claude。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。