---
title: "mcp-intent: an Intent-First Entry Tool for MCP Servers | Vindler"
description: "Open-source entry tool for MCP servers in Python, TypeScript and Go. The agent's first call states its task, your server answers with the steps and the rules for that task, and you get a record of what agents come to do. In our benchmark, agents passed about half the tasks without the rules and 94-98% with mcp-intent on Claude Code."
url: "https://vindler.solutions/mcp-intent"
locale: "en"
updatedAt: "2026-12-04"
---

Open source · Apache-2.0 · Python, TypeScript, Go

# mcp-intent

An intent-first entry tool for MCP servers. The agent's first call says what it is trying to do. Your server answers with the steps and the rules for that task.

On a test server we built, agents without the rules passed about half the tasks. With the rules for their task they passed 94-98%, and you get a record of what each agent came to do.

$pip install "mcp-intent\[fastmcp\]"

[View on GitHub](https://github.com/vindler-solutions/mcp-intent)[Read the benchmark](https://vindler.solutions/blog/mcp-entry-tool-benchmark)

## Your Rules Never Reach the Agent

An agent connecting to your MCP server sees tool names and argument schemas. How your business runs is usually somewhere it cannot see: which warehouse serves which customer, when a refund becomes store credit, what needs a manager's approval. When the API enforces a rule, the agent gets an error and corrects itself. When the rule lives only in a wiki, the agent breaks it and nothing complains.

The usual fix is to paste the rules into the server instructions. Hosts cut them short: Claude Code keeps the first 4,096 characters, and in our tests the OpenAI Responses API did not appear to pass them to the model at all. On the other side, you see tool calls and arguments, never the goal behind them.

## How It Works

One tool added to your server. Your other tools stay as they are.

Step 1

### The agent states its task

Your server instructions open with one sentence pointing at start\_task, and the tool is marked to load at session start. The agent's first call is one sentence: "Refund the broken espresso machine on order 1055."

Step 2

### A router picks the task family

The keyword router is free and deterministic. The Claude Haiku router reads the sentence and picks a family in about half a second, or two or three when one request asks for separate things ("refund order 1033, then reroute 1090"). If routing fails or takes longer than three seconds, the agent gets your fallback text and carries on.

Step 3

### The server answers with steps and rules

The agent gets the steps for that kind of task and only the rules tagged for it, plus a short handle. For a request with two tasks, it gets both sets of steps and every rule that applies, once. A rule buried at character 4,000 of a wiki becomes the one line the agent reads before it acts.

Step 4

### You get the intent record

Each call emits the stated task, its families, latency and whether it fell back, on your OpenTelemetry span and to an optional hook. That is the list of what people come to your server to do. With mcp-intent Cloud you also see coverage: the share of agent sessions that stated an intent, and what the others most likely came to do.

## Quickstart

Three lines on a FastMCP 4 server, Python 3.11 or later. The official Python SDK works the same way with `mcp-intent[mcp]`.

```
from fastmcp import FastMCP
from mcp_intent import Guidance, add_entry_tool

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

`guidance.yaml` lists task families with the steps for each, and rules tagged with the families they apply to. A rule tagged for two families is returned with both. When nothing matches, the agent gets the fallback.

```
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.
    families: [refund]
fallback: |
  Read the relevant records before changing anything.
```

Routers, the intent hook and tracing are options on the same call. Install `mcp-intent[fastmcp,anthropic]` for the Claude router.

```
from mcp_intent.anthropic_router import AnthropicRouter

add_entry_tool(
    mcp,
    guidance,
    router=AnthropicRouter(),      # default: KeywordRouter
    on_intent=send_to_analytics,   # called after every entry call
    record_task_in_span=False,     # keep task text out of traces
)
```

### TypeScript and Go

The same entry tool and guidance file on the official TypeScript SDK (`npm install mcp-intent`) and the official Go SDK. These SDKs take server instructions only at construction, so the pointer sentence goes in there.

TypeScript

```
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { Guidance, addEntryTool, entryInstructions } from "mcp-intent";

const server = new McpServer(
  { name: "shop", version: "1.0.0" },
  { instructions: entryInstructions("Shop back office.") },
);
// ... your tools ...
addEntryTool(server, Guidance.fromYaml("guidance.yaml"));
```

Go

```
guidance, err := mcpintent.LoadGuidance("guidance.yaml")
if err != nil {
	log.Fatal(err)
}
entry, err := mcpintent.NewEntryTool(guidance, mcpintent.Options{ServerName: "shop"})
if err != nil {
	log.Fatal(err)
}
server := mcp.NewServer(&mcp.Implementation{Name: "shop", Version: "1.0.0"},
	&mcp.ServerOptions{Instructions: entry.Instructions("Shop back office.")})
// ... your tools ...
mcpintent.AddEntryTool(server, entry)
```

[Full README and example server](https://github.com/vindler-solutions/mcp-intent) [mcp-intent on PyPI](https://pypi.org/project/mcp-intent/) [mcp-intent on npm](https://www.npmjs.com/package/mcp-intent)

## What We Measured

We ran 1,715 agent sessions against a test server we built for a fictional distributor: 20 tools, a 42-rule rulebook and 28 graded tasks, 12 of them written by someone who never saw our guidance. The runs are real model sessions; the company is made up. We compared mcp-intent with no rules exposed and with a well-built rules tool. Pass rate on Claude Code across all 28 tasks, 84 sessions per cell:

| Model | No rules | Rules tool | mcp-intent | mcp-intent, held-out tasks | Rule-breaking sessions, no rules to mcp-intent |
| --- | --- | --- | --- | --- | --- |
| Claude Opus 5.5 Claude Code | 46% | 96% | 98% | 100% | 29 to 0 |
| Claude Sonnet 5.5 Claude Code | 51% | 100% | 98% | 94% | 30 to 2 |
| Claude Haiku 5.5 Claude Code | 46% | 92% | 94% | 94% | 34 to 2 |

Agents called the entry tool first in every session. A rules tool that the other tools point to did as well as mcp-intent, so the lesson is to deliver your rules while the agent works; mcp-intent adds the record of what agents came to do. Rules in server instructions helped only as far as the host kept them. Limits: one domain we built, and the rules-tool comparison is on Claude Code only.

[Method, tasks and per-tier results](https://vindler.solutions/blog/mcp-entry-tool-benchmark)

## What It Adds

-   One read-only tool, start\_task (name configurable), marked to load at session start.
-   One sentence at the start of your server instructions pointing at it. Turn it off with point\_instructions=False.
-   mcp\_intent.\* attributes on your OpenTelemetry spans: family, fallback, latency, handle and the task text.
-   An on\_intent hook called after every entry call, for your own logging or analytics.
-   With a Cloud key, a record of each tool call (name, timing, hashed session signals, never arguments) so the dashboard can show coverage. Turn it off with record\_calls=False.

## What It Never Does

-   Edit your other tools' schemas or inject parameters into them.
-   Change the tool list as a side effect, which the MCP specification forbids.
-   Make the handle a required argument anywhere.
-   Send anything to us unless you set a Cloud API key.

Beta · free during the beta

## mcp-intent Cloud

Set one API key and the package reports to a hosted dashboard, with routing on our side. Free during the beta; paid plans are planned from USD 129 a month, with a self-hosted licence for companies that keep data in their own cloud.

### Hosted routing

Opt in with CloudRouter and routing runs on our side, so there is no model key to manage. If we are slow or down, your own keyword router answers instead.

### Intent dashboard

What agents come to do, day by day: task families, hosts, routing time, the tasks no family matched, and coverage, the share of sessions that stated an intent. Sessions that skipped the entry tool are listed with their tools and the family they most likely wanted.

### Your data, your call

Keep task sentences on your side with send\_task\_text=False, delete every event from the settings page, and nothing is kept past 90 days.

### Export

Every intent event as a CSV file, ready for the warehouse or spreadsheet where the rest of your product analytics lives.

[Create a free account](https://app.mcp-intent.com)

Sign in with an emailed code. Then: `export MCP_INTENT_API_KEY=...`

## Questions

### 

### 

### 

### 

### 

### 

### 

### 

## Need It Inside Your Company?

Vindler maintains mcp-intent and builds it into your own infrastructure: self-hosted, on servers written in Go or TypeScript, or behind your MCP gateway. We write the guidance with your team, run the same benchmark on your tasks across the hosts your users come from, and show what changed.

[MCP engineering at Vindler](https://vindler.solutions/hire/mcp-a2a-developers)

## Structured data

```json
{"@context":"https://schema.org","@type":"Organization","@id":"https://vindler.solutions/#organization","name":"Vindler Solutions","alternateName":"Vindler","legalName":"Vindler Desenvolvimento de Sistemas de IA Ltda - EPP","url":"https://vindler.solutions","logo":"https://vindler.solutions/logo.png","description":"Vindler is a global AI engineering consultancy specializing in custom AI solutions, LLM integration, and enterprise-grade AI systems.","foundingDate":"2025-06-02","foundingLocation":{"@type":"Place","name":"São Paulo, Brazil"},"taxID":"61.102.920/0001-05","email":"contact@vindler.solutions","telephone":"+1-646-846-5339","numberOfEmployees":{"@type":"QuantitativeValue","minValue":1,"maxValue":10},"areaServed":[{"@type":"Country","name":"United States"},{"@type":"Place","name":"Europe"},{"@type":"Country","name":"Brazil"}],"knowsAbout":["Multi-agent systems","Retrieval-augmented generation","Voice AI agents","LangChain","LangGraph","LiveKit","AWS Bedrock","Model Context Protocol","LLM observability and evaluation"],"founder":{"@type":"Person","@id":"https://vindler.solutions/about#carlos-dutra","name":"Carlos Dutra","jobTitle":"Founder and CEO","url":"https://vindler.solutions/about","sameAs":["https://www.linkedin.com/in/carlosdutra","https://github.com/cdutr"]},"contactPoint":{"@type":"ContactPoint","contactType":"Customer Support","email":"contact@vindler.solutions","telephone":"+1-646-846-5339","url":"https://vindler.solutions/contact","availableLanguage":["English","Portuguese","Spanish"]},"address":[{"@type":"PostalAddress","addressLocality":"São Paulo","addressRegion":"SP","addressCountry":"BR","streetAddress":"Av. Paulista, 1636"},{"@type":"PostalAddress","addressLocality":"New York","addressRegion":"NY","addressCountry":"US","streetAddress":"524 Broadway","postalCode":"10012"}],"sameAs":["https://www.linkedin.com/company/vindler-tech/","https://github.com/vindler-solutions","https://clutch.co/profile/vindler-solutions","https://www.wikidata.org/wiki/Q141018871","https://www.crunchbase.com/organization/vindler-solutions","https://www.g2.com/products/vindler-solutions/reviews","https://www.designrush.com/agency/profile/vindler-solutions"],"memberOf":[{"@type":"Organization","name":"Brazilian-American Chamber of Commerce, Inc.","url":"https://brazilcham.com/","sameAs":"https://www.linkedin.com/company/brazilian-american-chamber-of-commerce-inc./"},{"@type":"ProgramMembership","programName":"NVIDIA Inception","hostingOrganization":{"@type":"Organization","name":"NVIDIA","url":"https://www.nvidia.com/en-us/startups/"}}],"hasOfferCatalog":{"@type":"OfferCatalog","name":"AI Engineering Services","itemListElement":[{"@type":"Offer","itemOffered":{"@type":"Service","name":"AI Engineering","description":"Custom AI systems development from prototyping to deployment."}},{"@type":"Offer","itemOffered":{"@type":"Service","name":"Custom ChatBots & Agents","description":"Intelligent, multilingual, and domain-specific conversational AI."}},{"@type":"Offer","itemOffered":{"@type":"Service","name":"AI Architecture Consultancy","description":"Designing scalable, secure, and ethical AI infrastructure for enterprises."}},{"@type":"Offer","itemOffered":{"@type":"Service","name":"Training & Team Building","description":"Upskill your team or recruit top-tier AI talent."}}]}}
```

```json
{"@context":"https://schema.org","@type":"SoftwareSourceCode","name":"mcp-intent","description":"Open-source entry tool for MCP servers in Python, TypeScript and Go. The agent's first call states its task, your server answers with the steps and the rules for that task, and you get a record of what agents come to do. In our benchmark, agents passed about half the tasks without the rules and 94-98% with mcp-intent on Claude Code.","url":"https://vindler.solutions/mcp-intent","codeRepository":"https://github.com/vindler-solutions/mcp-intent","programmingLanguage":["Python","TypeScript","Go"],"runtimePlatform":"Python 3.11+, Node.js, Go","license":"https://www.apache.org/licenses/LICENSE-2.0","author":{"@type":"Organization","name":"Vindler Solutions","url":"https://vindler.solutions"}}
```

```json
{"@context":"https://schema.org","@type":"WebPage","name":"mcp-intent: an Intent-First Entry Tool for MCP Servers | Vindler","description":"Open-source entry tool for MCP servers in Python, TypeScript and Go. The agent's first call states its task, your server answers with the steps and the rules for that task, and you get a record of what agents come to do. In our benchmark, agents passed about half the tasks without the rules and 94-98% with mcp-intent on Claude Code.","url":"https://vindler.solutions/mcp-intent","isPartOf":{"@type":"WebSite","@id":"https://vindler.solutions/#website","name":"Vindler Solutions","url":"https://vindler.solutions/"},"publisher":{"@type":"Organization","@id":"https://vindler.solutions/#organization","name":"Vindler Solutions","url":"https://vindler.solutions"}}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://vindler.solutions"},{"@type":"ListItem","position":2,"name":"mcp-intent","item":"https://vindler.solutions/mcp-intent"}]}
```

```json
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Why not add an intent parameter to every tool, like other MCP analytics tools do?","acceptedAnswer":{"@type":"Answer","text":"Injected parameters change your tool schemas. Required ones have broken production tools, they fail ChatGPT Apps with default settings, and Anthropic's directory policy asks servers not to collect extra conversation data. mcp-intent asks once, at the start, in a tool the agent calls because the answer helps it. Your other tools are not touched, and nothing requires the handle."}},{"@type":"Question","name":"Do agents actually call the entry tool?","acceptedAnswer":{"@type":"Answer","text":"In our benchmark they called it first in 94 to 100% of sessions on the OpenAI Responses API with GPT-5.5 and GPT-5.4-mini, and in every session on Claude Code with Opus, Sonnet and Haiku 5.5. Other hosts (ChatGPT apps, Cursor, Gemini) are not measured yet."}},{"@type":"Question","name":"Is the gain from the guidance or just from calling a tool first?","acceptedAnswer":{"@type":"Answer","text":"From the guidance. A placebo entry tool that returned generic advice of the same length scored the same as no guidance on every model. Putting the whole rulebook in the server instructions helped on Claude Code only for rules within the first 4,096 characters, and did not appear to reach the model on the OpenAI Responses API."}},{"@type":"Question","name":"I already have a tool that returns my rules. Do I need mcp-intent?","acceptedAnswer":{"@type":"Answer","text":"Not for pass rates. In our benchmark a well-built rules tool, with each tool that changes data naming the rule topics that apply, did as well as mcp-intent on Claude Code. What mcp-intent adds is one guidance file instead of pointers spread across tool descriptions, steps per kind of task, and the record of what each agent came to do."}},{"@type":"Question","name":"What leaves my server?","acceptedAnswer":{"@type":"Answer","text":"Nothing, unless you choose. With the default keyword router, nothing leaves your server. With the Claude router, the task sentence and your family descriptions go to Anthropic under your own key. With a Cloud API key, each intent (task sentence, families, host, timing) goes to mcp-intent Cloud, and each tool call is recorded: its name, timing, the host and session signals hashed on your server, never the arguments or results. Before hashing, an IP address is cut to its network (the first three numbers of an IPv4 address), and the hashing salt changes every day. send_task_text=False keeps the sentence local and record_calls=False turns the call records off. Your steps and rules never leave your server."}},{"@type":"Question","name":"Which frameworks are supported?","acceptedAnswer":{"@type":"Answer","text":"Python 3.11+ with FastMCP 4 or the official MCP Python SDK, the official TypeScript SDK (v1 and v2), and the official Go SDK. The three packages follow one specification and pass the same test cases, including the call records behind Cloud coverage."}},{"@type":"Question","name":"What if one request asks for two things?","acceptedAnswer":{"@type":"Answer","text":"The router can name up to three families for one stated task, and the agent gets the steps and rules for each. We measured it on six two-task requests: Claude Sonnet and Haiku usually state both tasks in one sentence, and with one family per call only 0 to 11% of those runs had both tasks classified. With multi-family routing it was 100% for both, and single tasks still went to exactly one family in 94% of calls."}},{"@type":"Question","name":"What does it cost?","acceptedAnswer":{"@type":"Answer","text":"The package is free and Apache-2.0 licensed. The Claude router costs a few hundred input tokens per session on your own key. mcp-intent Cloud is free during the beta; paid plans are planned from USD 129 a month."}}]}
```
