Skip to main content

mcp-resource-tool-adapter

CI

mcp-resource-tool-adapter

Expose MCP resources through generic tools for MCP clients and models that cannot call resources/read directly.

Why?

Some OpenAI-compatible LLM runtimes support tool calls but do not implement the MCP resource protocol. This package keeps standard MCP resources available while exposing a generic read_resource(uri) compatibility tool.

Installation

pip install mcp-resource-tool-adapter

Example

from mcp.server.fastmcp import FastMCP
from mcp_resource_tool_adapter import ResourceToolAdapter

mcp = FastMCP("example-server")
resources = ResourceToolAdapter(mcp)

@resources.resource("robot://current_state")
def get_robot_state():
    return {"battery_percent": 87, "mode": "standing"}

resources.register_tools()

mcp.run(transport="stdio")

A tool-only client can then call:

{
  "uri": "robot://current_state"
}

through the read_resource tool.

Available compatibility tools

  • read_resource(uri): reads one registered resource.
  • list_resources(): lists URIs that can be read through read_resource.

Scope

This package does not handle robot control, ROS2, authentication, caching, authorization, or resource freshness. Those remain responsibilities of the application server.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_resource_tool_adapter-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_resource_tool_adapter-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_resource_tool_adapter-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mcp_resource_tool_adapter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b0350e110ad16b6fd30b6b531931942d4008146b49ddd66dab63581bc4155b4b
MD5 91ff2fb448c6b86b34ab70e7e9f7eb95
BLAKE2b-256 656a665c93c7f028e5199e3cebec62af6c87c93fa9c4c41278ea3f3f53923f41

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_resource_tool_adapter-0.1.0.tar.gz:

Publisher: publish.yml on vineef/mcp-resource-tool-adapter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_resource_tool_adapter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_resource_tool_adapter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a99bc701c4312972e5f7173b284c6cb1b0acbbbd25b117446ce0d2afe352513d
MD5 104bfb93821f2572dbdc8544b1846662
BLAKE2b-256 026f8a9a9b7f7b6f5e89673089c6f57ca4e8d92415f2e02f32b145c9b00ede2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_resource_tool_adapter-0.1.0-py3-none-any.whl:

Publisher: publish.yml on vineef/mcp-resource-tool-adapter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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