MCP Servers
How Noir reports the tools, resources and prompts of Model Context Protocol servers written with the Python and TypeScript SDKs.
Noir reports what a Model Context Protocol (MCP) server offers its clients. A tool's arguments are chosen by a model, often from text an outside party wrote, and they can reach a shell, a file path, an SQL query or an outbound request just as an HTTP parameter can.
Each tool, resource and prompt is one endpoint, with the inputs it accepts.
Endpoint model
MCP entry points are endpoints with method = "MCP" and protocol = "mcp". The URL names the server and the capability:
| URL shape | meaning |
|---|---|
mcp://<server>/tools/<name> |
a tool a client can call |
mcp://<server>/resources/<name> |
a resource or resource template a client can read |
mcp://<server>/prompts/<name> |
a prompt a client can request |
The server name is the one the code declares (FastMCP("weather"), new McpServer({ name: "weather" })). If Noir cannot read it, the URL uses the variable the server is bound to, or for TypeScript the package name. Characters that would break a URL become -, so Demo Server is addressed as Demo-Server. The declared name is kept in metadata.server.
Inputs are parameters:
| param_type | meaning |
|---|---|
json |
an argument of a tool or a prompt |
path |
a variable of a resource URI template (users://{user_id}/profile) |
query |
a query variable of a resource URI template (search://docs{?q,page}) |
A resource's own URI or URI template is in metadata.uri.
MCP mcp://weather/tools/get_forecast
○ body: {"city":"","days":""}
MCP mcp://weather/resources/station
○ path: station_id
○ uri: stations://{station_id}/latest
A tool registered under a name Noir could not read to a string, such as a constant imported from a package outside the scan, is still reported. Its last URL segment is the expression in braces (mcp://ctx/tools/{TOOL_NAME}) and the endpoint carries resolution: {name: unresolved}.
Supported SDKs
| Language | Technology | What is read |
|---|---|---|
| Python | python_fastmcp |
FastMCP and the official SDK's mcp.server.fastmcp: @mcp.tool, @mcp.resource, @mcp.prompt, the call forms mcp.tool(name="x")(fn) and mcp.tool(fn), and mcp.add_tool(fn). HTTP routes added with @mcp.custom_route are reported as ordinary HTTP endpoints. |
| Python | python_mcp |
The official mcp package: MCPServer with the same decorators, and the low-level Server, whose tools are declared as Tool(name=..., inputSchema={...}). |
| JavaScript / TypeScript | js_mcp |
The official SDK, both @modelcontextprotocol/sdk and @modelcontextprotocol/server: registerTool, registerResource, registerPrompt, the older tool, resource and prompt overloads, and the low-level Server, whose tools are objects with a name and an inputSchema. |
Arguments come from the function signature in Python and from the input schema in TypeScript: a Zod shape, z.object({...}) or a JSON Schema literal. Parameters the framework injects, such as a FastMCP Context, are not arguments.
Registration is often written away from where the server is built. In Python, Noir follows a server that is imported from another module, passed to a function as a parameter, kept on self, or built from a subclass of the SDK's server class. In TypeScript, every file of a package that depends on the SDK is read, and so is a package that depends on it through one workspace package.
Querying
# Every tool, resource and prompt
noir query --protocol mcp .
# Tools whose arguments reach a command, a file or an outbound request
noir query --protocol mcp --sink command_exec,file_io,outbound_http .
# Follow one tool to its handler and sinks
noir trace "MCP mcp://weather/tools/get_forecast" .
# Fail a pull request that adds a tool
noir scan . --diff-ref origin/main --fail-on added
Output behavior
MCP endpoints stay in the structured inventory (JSON, JSONL, YAML, TOML, SARIF, Markdown table, mermaid, HTML). They are left out of HTTP-shaped output and delivery (cURL, HTTPie, PowerShell, OpenAPI 2.0 / 3.0, Postman, and active probe / proxy delivery): a client reaches them over JSON-RPC, so there is no HTTP request to write down.
Notes and limitations
- Go, Java, Kotlin, C# and Rust SDKs are not read yet.
- A server that registers tools through its own abstraction (a
defineToolhelper, a class per tool collected at startup) is not followed. - Authentication set on the server or its transport is not attached to each tool as a guard.
- In the low-level API a tool's handler is a branch of one shared call handler, so those tools carry no handler or callees.