Skip to main content

mcp-intent

PyPI npm Python CI License mcp-intent Cloud

An intent-first entry tool for MCP servers.

An agent connecting to your MCP server sees a list of tools and guesses how to use them. Your company rules (which warehouse serves which customer, when a refund becomes store credit, what needs a manager's approval) are usually nowhere it can see. With mcp-intent, the agent's first call states what it is trying to do, and your server answers with the steps and the rules for that kind of task. The stated task is also a record of what people come to your server to do.

Your other tools are not touched: nothing is injected into their schemas, and the handle the entry tool returns is never required anywhere.

Install

mcp-intent works with the main MCP server libraries in Python, TypeScript and Go. Each package follows the same specification (docs/spec.md) and is tested against the same cases.

Your server is built with Install
FastMCP 4 (Python) pip install "mcp-intent[fastmcp]"
The official MCP Python SDK (MCPServer) pip install "mcp-intent[mcp]"
The official TypeScript SDK, v1 or v2 npm install mcp-intent (see typescript/README.md)
The official Go SDK go get github.com/vindler-solutions/mcp-intent/go (see go/README.md)

Add anthropic to the Python extras (mcp-intent[fastmcp,anthropic]) for the Claude-based router.

Use

from fastmcp import FastMCP
from mcp_intent import Guidance, add_entry_tool

mcp = FastMCP("shop", instructions="Shop back office.")
# ... your tools ...
add_entry_tool(mcp, Guidance.from_yaml("guidance.yaml"))

The same call works on the official SDK's MCPServer. MCPServer takes its instructions only at construction, so build it with instructions=entry_instructions("Shop back office."); add_entry_tool refuses to start without that sentence unless you pass point_instructions=False:

from mcp.server.mcpserver import MCPServer
from mcp_intent import Guidance, add_entry_tool, entry_instructions

mcp = MCPServer("shop", instructions=entry_instructions("Shop back office."))
add_entry_tool(mcp, Guidance.from_yaml("guidance.yaml"))

On any other framework, build an EntryTool and register await entry.call(task, client) as a tool yourself; docs/spec.md lists what the tool must look like.

guidance.yaml lists task families with the steps for each, and rules tagged with the families they apply to:

families:
  refund:
    when: a customer wants money back for an order
    keywords: [refund, money back, damaged, broken]
    steps: |
      1. get_order to read the lines and the order date.
      2. Refund only the lines the customer reports.
rules:
  - text: Orders placed more than 90 days ago are settled as store credit, never refunded in money.
    families: [refund]
fallback: |
  Read the relevant records before changing anything.

The agent calls start_task with one sentence. A router picks the family; the tool returns that family's steps, the rules tagged for it, and a handle. If nothing matches, the router fails, or it takes longer than the timeout (3 seconds by default), the tool returns fallback.

Runnable examples: examples/shop/ (FastMCP), examples/sdk/ (official SDK), typescript/examples/ and go/examples/.

Routers

  • KeywordRouter (default): free and deterministic. It needs keywords on every family and refuses to start without them, because family descriptions alone route poorly (5 of 16 prompts in our benchmark).
  • AnthropicRouter (mcp_intent.anthropic_router): asks Claude Haiku 5.5 to pick the family. It routed all 16 benchmark prompts correctly, in about half a second and a few hundred input tokens a call. Reads ANTHROPIC_API_KEY.
  • CloudRouter: routes on mcp-intent Cloud with a Cloud key, so the server needs no model key. Opt-in; it sends the task sentence and the families' names, descriptions and keywords (never steps or rules).
  • Your own: any object with async def route(self, task, guidance) -> str | None.
from mcp_intent.anthropic_router import AnthropicRouter

add_entry_tool(mcp, guidance, router=AnthropicRouter())

What it does to your server

  • Adds one tool, start_task (name configurable), marked read-only and anthropic/alwaysLoad so hosts that defer tool definitions still show it at session start.
  • Puts one sentence pointing at it at the start of your server instructions. Hosts cut instructions short (Claude Code keeps 4,096 characters), so the pointer goes first. Turn it off with point_instructions=False.
  • Calls on_intent(event) after every entry call, if you pass it: the task, the family, the handle, latency, and whether it fell back. Use it to log or count intents.
  • Adds mcp_intent.* attributes to the current OpenTelemetry span, so intents show up in the tracing you already run. The task text is included unless record_task_in_span=False.
  • Sends nothing anywhere unless you set a Cloud API key.

mcp-intent Cloud (beta)

Set an API key from app.mcp-intent.com and the package sends each intent to a hosted dashboard: what agents come to do, by family and by host, the tasks no family matched, and a CSV export.

export MCP_INTENT_API_KEY=mi_live_...

or add_entry_tool(mcp, guidance, cloud_key="mi_live_..."). A key alone never moves routing off your server. To route on the Cloud without a model key of your own, opt in with add_entry_tool(mcp, guidance, router=CloudRouter()); if the Cloud is slow or down, keyword routing answers that call, so give your families keywords either way. Events are batched and sent in the background; if the Cloud is slow or down, your agents still get their answer and the failure is logged. send_task_text=False keeps task sentences on your side. Nothing is sent without a key.

With a key, the package also records each tool call and tool listing: the tool's name, timing, the host, and hashed session signals, never the arguments or results. The Cloud uses them to show coverage, the share of agent sessions that stated an intent, and what the other sessions most likely came to do. record_calls=False turns this off. On shutdown, await entry.aclose() (the EntryTool that add_entry_tool returns) sends what is still queued.

Need it inside your company?

If you need mcp-intent running entirely in your own infrastructure, behind an MCP gateway, on a framework the packages do not cover yet, or with guidance written and measured on your own tasks, Vindler builds that as a project. We write the guidance with your team, run the same benchmark on your server across the hosts your users come from, and leave you with the numbers. Talk to us.

Contributing

mcp-intent is actively maintained by the Vindler team and the community, and contributions are welcome. The most useful thing you can send us is an issue: a host that does not call the entry tool, a router that picks the wrong family, a framework you would like supported, or anything in this README that did not match what you saw. Open an issue with the host and model you used and, if you can, the task sentence the agent sent.

Pull requests are welcome too. For anything beyond a small fix, open an issue first so we can agree on the approach. A change to behaviour goes into docs/spec.md and spec/fixtures/ first, then into all three packages. Before you push, run the same checks as CI:

uv sync --group dev
uv run ruff check . && uv run ruff format --check . && uv run mypy src && uv run pytest
(cd typescript && pnpm install && pnpm typecheck && pnpm test)
(cd go && go vet ./... && go test -race ./...)

Every change adds a line to CHANGELOG.md. Security problems go to contact@vindler.solutions, not to a public issue.

Licence

Apache-2.0. See LICENSE and NOTICE.

Maintained by Vindler Solutions.

Metadata

Release files for mcp-intent 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-intent 0.1.1
File Size Uploaded Provenance Actions
mcp_intent-0.1.1.tar.gz 230.5 kB With provenance Details for mcp_intent-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-intent 0.1.1
File Interpreter ABI Platform Actions
mcp_intent-0.1.1-py3-none-any.whl Python 3 none any Details for mcp_intent-0.1.1-py3-none-any.whl

Total release size: 260.6 kB

Release files / mcp_intent-0.1.1.tar.gz

Download URL mcp_intent-0.1.1.tar.gz
Size 230.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b09a42388c3d8b3395aa3f2251b3448fa9a76b5f0f2b81cc22946586d2183dba
BLAKE2b-256 checksum
How to use checksums
df1355ed349e6cfe02759bafcf484d624175abb4590fb4b308e6465d4e1186e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / mcp_intent-0.1.1-py3-none-any.whl

Download URL mcp_intent-0.1.1-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dda751b1e4e528a61c55a29e0e74f9c63e1f4adec37ff45aea9f74abc62cf8ca
BLAKE2b-256 checksum
How to use checksums
a3df8d375a52c40c71d0da1dcc82afed7ec03894652e33440d292c47a87824e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Security for mcp-intent 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_intent-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page