Skip to main content

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:call
  • mcp: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

Metadata

Release files for agentity-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentity-mcp 0.1.1
File Size Uploaded Provenance
agentity_mcp-0.1.1.tar.gz 2.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agentity-mcp 0.1.1
File Interpreter ABI Platform
agentity_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.1 kB

Release files / agentity_mcp-0.1.1.tar.gz

Download URL agentity_mcp-0.1.1.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
20f783592ac42cf0b576fee4706ee1e1396f4ff3d8c421589684a4a946778484
BLAKE2b-256 checksum
How to use checksums
5acf4e2f596f3a76ba54828e106fef915e3f4e4edcd8d255c28bbbc9c0474cb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / agentity_mcp-0.1.1-py3-none-any.whl

Download URL agentity_mcp-0.1.1-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eae5d3f463fc6e025b6cd1c090f8d5fabe0ca0a4387d48b5a191d5e649b97896
BLAKE2b-256 checksum
How to use checksums
d8aa690049ed6637e1a0d94b7140db12d9fb5e0db8f816ed60fae32d331fd30f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for agentity-mcp 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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