mcp-intent
See what AI agents come to your MCP server to do, and give them your rules before they start.
When an agent connects to your MCP server, it sees a list of tools and guesses how to use them.
With mcp-intent, its first call says what it is trying to do, in one sentence. Your server
answers with the steps and rules for that kind of task: which warehouse serves which customer,
when a refund becomes store credit, what needs a manager's approval. Every stated task is
recorded, so you learn what people use your server for: intent analytics, in your own logs or on
mcp-intent Cloud.
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 needskeywordson 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. ReadsANTHROPIC_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 andanthropic/alwaysLoadso 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 unlessrecord_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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_intent-0.1.2.tar.gz | 230.7 kB | With provenance | Details for mcp_intent-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_intent-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for mcp_intent-0.1.2-py3-none-any.whl |
Total release size: 260.8 kB
Release files / mcp_intent-0.1.2.tar.gz
| Download URL | mcp_intent-0.1.2.tar.gz |
|---|---|
| Size | 230.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b229d562f0323fff97d36394ac9dc32220d5e1e6d1aede5815e2bd6aae8445df
|
|
BLAKE2b-256 checksum How to use checksums |
81fe9b7f4fd147d09180d92041cbcc3ef198dec064106f2aeb68c5ce2c98e1bd
|
| 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 3, 2026.
Transparency logRelease files / mcp_intent-0.1.2-py3-none-any.whl
| Download URL | mcp_intent-0.1.2-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b68acbeb9255b4aa02b8c4c7dde5d7d89059955e416033827d83a54b0ad9ab5
|
|
BLAKE2b-256 checksum How to use checksums |
e1cb73813a3178f024be5acabe99f00216f0590d69d700fd204dc3b3c4b005e8
|
| 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 3, 2026.
Transparency logSecurity for mcp-intent 0.1.2
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.
Attestation for mcp_intent-0.1.2.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 3, 2026.
Transparency logA 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.