NCP MCP Server for Instant Tool Discovery
Enable instant tool discovery with the MCP server, letting AI articulate needs, reduce token costs up to 87%, and deliver fast, energy-savvy on-demand tools.
npm install -g @portel/ncpOverview
The NCP MCP Server implements the Model Context Protocol (MCP) to provide instant tool discovery for AI systems. Instead of embedding large tool manifests into prompts or agent contexts, the server lets a model express its needs in natural language and returns concise, structured tool descriptors. This reduces prompt token usage and enables models to find and use the most relevant tooling on demand.
This approach is useful for multi-tool agents, data pipelines, and interactive AI applications where tool lists change frequently or are too large to include directly in model context. By serving lightweight tool metadata and on-demand tool resolution, the MCP server can cut prompt/token costs (reported reductions up to 87% in representative workloads), speed up discovery, and limit unnecessary energy consumption from repeatedly transferring large manifests.
Features
- Lightweight MCP-compatible server for tool discovery and retrieval
- Natural-language-driven discovery: ask for capabilities or inputs, get matching tool descriptors
- Compact tool descriptors that keep model context small
- Tool registration and versioning API for dynamic ecosystems
- Caching and on-demand resolution to reduce repeated token transfer
- Simple HTTP/JSON API (register, list, discover, fetch)
- Metadata fields for inputs, endpoints, cost/energy estimates, and categories
- Integration-ready for multi-agent systems and LLM-driven planners
Installation / Configuration
Start by cloning the repository and running the server locally. Two common options are running via Docker or from source.
Clone repository:
Run with Docker (recommended):
# Build and run with Docker Compose if provided
# or run an image (if provided)
Run from source (example using Node.js, replace with the repo’s language/runtime if different):
# install dependencies and start
Configuration is typically supplied through environment variables or a config file. Example environment variables:
MCP_PORT=8080
MCP_HOST=0.0.0.0
TOOLS_DIR=./tools
CACHE_TTL_SECONDS=300
LOG_LEVEL=info
If the repository includes a configuration file (e.g., config.yaml), adapt these values there.
Available Resources
The MCP server exposes a small set of REST endpoints useful to agents and orchestration code. Example endpoints:
- GET /health — basic health check
- GET /tools — list registered tools (paginated)
- POST /tools — register a new tool (metadata JSON)
- GET /tools/{id} — fetch the full descriptor for a tool
- POST /discover — discover tools by natural language or structured query
Tool descriptor schema (typical fields):
Use Cases
- LLM-driven data analytics: A planner model requests “tool to join two CSVs by a key” and receives a compact descriptor instead of a full manifest, then calls the listed endpoint to perform the operation.
- Multi-agent orchestration: Agents discover and select specialized tools at runtime without re-sending full capability lists to the model.
- Cost- and energy-aware selection: Agents filter tools by cost_estimate or energy_estimate to choose greener or cheaper options.
- Rapid prototyping and plugin ecosystems: Developers register new tools on the server; models can immediately discover them without redeployment.
Concrete examples
- Discovering a tool with curl:
- Register a new tool:
- Fetch descriptor from an agent (Python):
=
Token Savings Example
The benefit of using MCP is a smaller, focused token footprint. Example comparison:
| Approach | Typical payload sent to model | Relative token cost |
|---|---|---|
| Full manifest in prompt | 5,000 tokens | 100% |
| MCP descriptor reference | 650 tokens | ~13% |
| Reduction observed | — | up to 87% |
Actual savings depend on manifest size and how many tools are needed in context. MCP shines when tool catalogs are large or frequently changing.
Tips for Developers
- Keep tool descriptors minimal: include only fields a model needs to decide whether to call the tool.
- Use tags and concise descriptions to improve discovery relevance.
- Provide cost_estimate and energy_estimate when available to enable informed selection.
- Cache discovered descriptors on the agent side when appropriate to avoid repeated discovery calls.
This MCP server model provides a practical, API-driven way to let language models discover and use tools on demand while keeping token usage and overall resource consumption low.