mcp-resource-tool-adapter
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 throughread_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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_resource_tool_adapter-0.1.0.tar.gz.
File metadata
- Download URL: mcp_resource_tool_adapter-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0350e110ad16b6fd30b6b531931942d4008146b49ddd66dab63581bc4155b4b
|
|
| MD5 |
91ff2fb448c6b86b34ab70e7e9f7eb95
|
|
| BLAKE2b-256 |
656a665c93c7f028e5199e3cebec62af6c87c93fa9c4c41278ea3f3f53923f41
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_resource_tool_adapter-0.1.0.tar.gz -
Subject digest:
b0350e110ad16b6fd30b6b531931942d4008146b49ddd66dab63581bc4155b4b - Sigstore transparency entry: 2217650394
- Sigstore integration time:
-
Permalink:
vineef/mcp-resource-tool-adapter@02a9cf39766d09ec4054b096e0d8d9683ba0702c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vineef
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02a9cf39766d09ec4054b096e0d8d9683ba0702c -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_resource_tool_adapter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_resource_tool_adapter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a99bc701c4312972e5f7173b284c6cb1b0acbbbd25b117446ce0d2afe352513d
|
|
| MD5 |
104bfb93821f2572dbdc8544b1846662
|
|
| BLAKE2b-256 |
026f8a9a9b7f7b6f5e89673089c6f57ca4e8d92415f2e02f32b145c9b00ede2a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_resource_tool_adapter-0.1.0-py3-none-any.whl -
Subject digest:
a99bc701c4312972e5f7173b284c6cb1b0acbbbd25b117446ce0d2afe352513d - Sigstore transparency entry: 2217650463
- Sigstore integration time:
-
Permalink:
vineef/mcp-resource-tool-adapter@02a9cf39766d09ec4054b096e0d8d9683ba0702c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vineef
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02a9cf39766d09ec4054b096e0d8d9683ba0702c -
Trigger Event:
release
-
Statement type: