mirror of
https://github.com/mcp-use/mcp-use.git
synced 2026-09-14 18:06:01 +08:00
53af5dfc12
The rules block instructs coding agents to import server APIs from mcp-use/server. That subpath was removed before v2 went stable, so an agent following this rule writes an import that does not resolve. Points at the package root instead and says the subpath is gone, since the rule is competing with v1 examples the model has already seen.
70 lines
3.7 KiB
JSON
70 lines
3.7 KiB
JSON
{
|
|
"$schema": "https://context7.com/schema/context7.json",
|
|
"url": "https://context7.com/mcp-use/mcp-use",
|
|
"public_key": "pk_DHbfCHmtCxcbCOAR8Q9HX",
|
|
"projectTitle": "mcp-use - The fullstack MCP framework to develop MCP Apps for ChatGPT / Claude & MCP Servers for AI",
|
|
"description": "Fullstack MCP framework for TypeScript and Python. Build MCP Apps for ChatGPT and Claude, MCP Servers, MCP Clients, and MCP Agents with end-to-end type safety, a built-in Inspector, OAuth, and one-command deploy.",
|
|
"folders": [
|
|
"docs/home",
|
|
"docs/typescript/server",
|
|
"docs/guides",
|
|
"docs/python/server",
|
|
"docs/typescript/getting-started",
|
|
"docs/python/getting-started",
|
|
"docs/typescript/client",
|
|
"docs/python/client",
|
|
"docs/typescript/agent",
|
|
"docs/python/agent",
|
|
"docs/python/integration",
|
|
"docs/python/development",
|
|
"docs/inspector",
|
|
"docs/tunneling",
|
|
"examples",
|
|
"libraries/python/examples",
|
|
"libraries/typescript/packages/client/examples",
|
|
"libraries/typescript/packages/server/examples"
|
|
],
|
|
"excludeFolders": [
|
|
"docs/snippets",
|
|
"docs/images",
|
|
"docs/home/redirects",
|
|
"docs/typescript/changelog",
|
|
"docs/python/changelog",
|
|
"libraries/typescript/packages/client/examples/conformance",
|
|
"**/dist",
|
|
"**/build",
|
|
"**/coverage",
|
|
"**/node_modules"
|
|
],
|
|
"excludeFiles": [
|
|
"README.md",
|
|
"CONTRIBUTING.md",
|
|
"TESTING.md",
|
|
"CHANGELOG.md",
|
|
"changelog.md",
|
|
"CHANGELOG.mdx",
|
|
"changelog.mdx",
|
|
"LICENSE.md",
|
|
"license.md",
|
|
"CODE_OF_CONDUCT.md",
|
|
"code_of_conduct.md"
|
|
],
|
|
"rules": [
|
|
"mcp-use is a fullstack MCP framework. Lead with building MCP Apps for ChatGPT and Claude, then production MCP Servers.",
|
|
"Use the TypeScript MCP Server and MCP Apps docs as the primary source for new app and server code.",
|
|
"Use Python server, client, and agent docs for Python SDK examples. Avoid mixing TypeScript and Python APIs.",
|
|
"MCPAgent plus an LLM is the Agent capability only. Do not present connecting an LLM to an MCP server as the headline use case.",
|
|
"Prefer concept-anchored API examples from the docs tree over install/run shell snippets or example README files.",
|
|
"For views, prefer the MCP Apps flow using useToolContext, useViewState, useCallTool, useFiles, and ModelContext from mcp-use/react.",
|
|
"For server examples, prefer MCPServer tools, resources, prompts, response helpers, OAuth providers, middleware, session management, Inspector, and deployment docs.",
|
|
"Every tool should set explicit annotations readOnlyHint, openWorldHint, and destructiveHint; add outputSchema when returning structured content or widget props.",
|
|
"Import server APIs from the mcp-use package root and React hooks/components from mcp-use/react; there is no mcp-use/server subpath in v2. Avoid internal package paths unless docs explicitly require them.",
|
|
"For new TypeScript MCP servers or apps, scaffold with npx create-mcp-use-app instead of hand-rolling MCPServer boilerplate, package.json, or widget build setup.",
|
|
"Tool handlers should use Zod schemas with describe fields and return response helpers such as text(), object(), widget(), and error() instead of raw objects or thrown errors.",
|
|
"Views should use useToolContext<Name>() and branch on pending, ready, or error before reading structured output.",
|
|
"Use useViewState() for JSON-serializable model-visible state, useCallTool() for view-initiated tool calls, and ModelContext to describe what the user is seeing.",
|
|
"Verify tools and widgets with mcp-use client and mcp-use client screenshot during development, especially before shipping widget changes.",
|
|
"Never hardcode secrets. Read API keys and configuration from environment variables and document required variables in .env.example."
|
|
]
|
|
}
|