Skip to main content

gatecore-langchain

gatecore-langchain provides three LangChain tools for GateCore marketplace discovery and procurement, plus helpers that execute a procured capability through GateCore's signed gateway. The adapter contains transport and configuration only; GateCore services enforce identity, policy, trust, pricing, funding, delegation, and settlement.

The MCP tools support public full-mode GateCore endpoints only. read mode passes the server's fail-closed procurement error through unchanged. off mode is unsupported because it does not replace the adapter's legacy placeholder identity with the MCP credential identity.

Install from the GateCore monorepo

python -m pip install -e ./libs/sdk -e ./libs/adapters/gatecore-langchain

Install from PyPI

python -m pip install gatecore-langchain

Configuration

Discovery and procurement require:

GATECORE_MCP_URL=https://mcp.gatecoreai.com/mcp
GATECORE_MCP_KEY=gcmk_...

execute_procured and aexecute_procured validate these variables lazily on first use:

GATECORE_GATEWAY_URL=https://api.gatecoreai.com
GATECORE_BEARER_TOKEN=...
GATECORE_AGENT_ID=agent:example
GATECORE_ACCESS_GRANT_ID=grant:example
GATECORE_KEY_ID=key:example
GATECORE_PRIVATE_KEY_PATH=/secure/path/agent-key.pem

Set exactly one of GATECORE_PRIVATE_KEY_PATH or GATECORE_PRIVATE_KEY_PEM.

Quick start

Copy-paste complete. The only value to substitute is your MCP access key; a free Developer key (1,000 governed transactions a month, no card) is minted at app.gatecoreai.com/developer/portal.

import os

os.environ["GATECORE_MCP_URL"] = "https://mcp.gatecoreai.com/mcp"
os.environ["GATECORE_MCP_KEY"] = "gcmk_..."  # your key from the developer portal

from gatecore_langchain import GateCoreToolkit

tools = GateCoreToolkit().get_tools()
for tool in tools:
    print(tool.name, "-", tool.description.splitlines()[0])

Discovery and procurement run over these two variables alone. Executing a procured capability through the signed gateway uses execute_procured and the gateway variables below:

from gatecore_langchain import GateCoreToolkit, execute_procured

tools = GateCoreToolkit().get_tools()
procure_result = tools[2].invoke({"listing_id": "listing:example"})
decision = execute_procured(procure_result, {"query": "example"})

All tools are async-native through LangChain's async invocation methods. Their synchronous bridge uses asyncio.run() and therefore must not be called from a thread that already owns a running event loop; use ainvoke() in async applications.

Release files for gatecore-langchain 0.1.3

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

Source distribution (sdist)

Source distribution for gatecore-langchain 0.1.3
File Size Uploaded
gatecore_langchain-0.1.3.tar.gz 15.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gatecore-langchain 0.1.3
File Interpreter ABI Platform
gatecore_langchain-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 29.0 kB

Release files / gatecore_langchain-0.1.3.tar.gz

Download URL gatecore_langchain-0.1.3.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4c272ec9d3067a858692b36cf15af5a34800c1a78f88f3314b4a11cef00845ef
BLAKE2b-256 checksum
How to use checksums
5d441f9a964abe251a294770797e907b73b9bc5eaab5c2af985483999e46192d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / gatecore_langchain-0.1.3-py3-none-any.whl

Download URL gatecore_langchain-0.1.3-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96acf5629c9e0aedf69f5e691c07de31d187e3e8a701c6f5e04c3b3d64470783
BLAKE2b-256 checksum
How to use checksums
2949bbc7ee3e8fc7eebf6489cd94593c2c5cf240f98e9ae5accf0cd318afa22d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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