agentity-mcp
MCP (Model Context Protocol) plugin for Agentity. Wrap any MCP server to inject Agentity identity into tool calls — enabling scoped, verifiable agent-to-tool requests.
Installation
pip install agentity-mcp
Usage
from agentity_mcp import McpServerWrapper
# Wrap an MCP server with Agentity identity
wrapper = McpServerWrapper()
print(f"Agent DID: {wrapper.agent_did}")
print(f"Scopes: {wrapper.agent_scope}")
# Get signed headers for any MCP request
headers = wrapper.get_headers(method="POST", path="/tools/call", body=b'{}')
# {
# "Agentity-Token": "<base64(AID)>.<base64(sig)>",
# "Agentity-Nonce": "<uuid-v4>",
# "Agentity-Timestamp": "<ISO-8601>",
# }
Custom keypair and identity
from agentity_sdk import AgentKeyPair
from agentity_mcp import McpServerWrapper
kp = AgentKeyPair()
aid = kp.create_identity(
owner_did="did:agentity:human:alice",
scopes=["mcp:tool:call", "mcp:resource:read"],
ttl_days=30,
)
wrapper = McpServerWrapper(keypair=kp, identity=aid)
Default scopes
When no identity is provided, McpServerWrapper auto-creates one with scopes:
mcp:tool:callmcp:resource:read
API
| Method / Property | Description |
|---|---|
McpServerWrapper(keypair?, identity?) |
Create wrapper, auto-generates identity if omitted |
.get_headers(method, path, body?) |
Get signed Agentity headers for an MCP request |
.agent_did |
The agent's DID string |
.agent_scope |
The agent's scope list |
License: Apache 2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agentity_mcp-0.1.1.tar.gz
(2.6 kB
view details)
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 agentity_mcp-0.1.1.tar.gz.
File metadata
- Download URL: agentity_mcp-0.1.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20f783592ac42cf0b576fee4706ee1e1396f4ff3d8c421589684a4a946778484
|
|
| MD5 |
ae8bc466edd4fd390e52dab509307189
|
|
| BLAKE2b-256 |
5acf4e2f596f3a76ba54828e106fef915e3f4e4edcd8d255c28bbbc9c0474cb4
|
File details
Details for the file agentity_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agentity_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eae5d3f463fc6e025b6cd1c090f8d5fabe0ca0a4387d48b5a191d5e649b97896
|
|
| MD5 |
c9a947986169ad3132812d8602295960
|
|
| BLAKE2b-256 |
d8aa690049ed6637e1a0d94b7140db12d9fb5e0db8f816ed60fae32d331fd30f
|