tokportal-mcp
Officiallangchain-tokportal
LangChain / LangGraph-Integration für TokPortal.
TokPortal ist die verwaltete soziale Infrastruktur-API: echte TikTok-, Instagram- und YouTube-Konten, die von menschlichen Account-Managern in über 16 Ländern erstellt, aufgewärmt und betrieben werden – bereitgestellt als REST-API und MCP-Server. Kein OAuth pro Konto, kein 25-Posts/Tag-Limit, keine App-Überprüfung.
Dieses Paket bietet Ihren Agenten zwei Möglichkeiten, TokPortal zu steuern:
Modus | Was Sie erhalten | Wann verwenden |
Native Tools ( | 6 handgeschriebene | Einfache synchrone Agenten, keine MCP-Abhängigkeit zur Laufzeit |
MCP-Tools ( | Jedes Tool des entfernten TokPortal MCP-Servers (90+ Operationen: Uploads, Warming, Analysen, Webhooks, Kommentare, Sperren…) geladen über | Vollständige API-Oberfläche, asynchrone Agenten |
Installation
pip install langchain-tokportal
# optional, for the LangGraph example below
pip install langchain langchain-openaiHolen Sie sich einen API-Schlüssel unter https://app.tokportal.com/developer und exportieren Sie ihn:
export TOKPORTAL_API_KEY=sk_...Related MCP server: Outpost
Schnellstart (native Tools)
from langchain_tokportal import TokPortalToolkit
toolkit = TokPortalToolkit.from_api_key() # reads TOKPORTAL_API_KEY
tools = toolkit.get_tools()
for tool in tools:
print(tool.name)
# tokportal_get_credit_balance
# tokportal_create_bundle
# tokportal_configure_bundle_video
# tokportal_publish_bundle
# tokportal_get_bundle
# tokportal_list_accounts
print(tools[0].invoke({})) # -> {"data": {"balance": ...}}Jedes Tool gibt einen JSON-String zurück (das rohe TokPortal data-Envelope oder ein {"error": {...}}-Objekt mit status, code, request_id und retryable, damit das Modell sich selbst korrigieren kann).
LangGraph-Agentenbeispiel (langchain.agents.create_agent, LangChain 1.x)
import asyncio
from langchain_openai import ChatOpenAI
from langchain.agents import create_agent
from langchain_tokportal import TokPortalToolkit
SYSTEM = (
"You operate TokPortal, a managed social infrastructure API. "
"Always check the credit balance before creating bundles. "
"A bundle must be published for a human account manager to start working on it."
)
async def main() -> None:
toolkit = TokPortalToolkit.from_api_key()
# "native" = 6 SDK tools, "mcp" = full remote MCP tool set, "all" = both
tools = await toolkit.aget_tools("mcp")
agent = create_agent(ChatOpenAI(model="gpt-4.1"), tools, system_prompt=SYSTEM)
result = await agent.ainvoke(
{
"messages": [
(
"user",
"Order one new TikTok account in the US with 3 video slots and "
"advanced warming on the terms 'home workout', 'protein snacks', "
"'gym motivation'. Publish it and tell me the bundle id.",
)
]
}
)
print(result["messages"][-1].content)
asyncio.run(main())Nur-synchrone Codepfade können toolkit.get_mcp_tools() aufrufen (umhüllt asyncio.run).
Verwenden der MCP-Verbindung direkt
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_tokportal import mcp_connection
client = MultiServerMCPClient({"tokportal": mcp_connection("sk_...")})
tools = await client.get_tools()mcp_connection() gibt ein Streamable-HTTP-Verbindungsdict zurück, das auf https://app.tokportal.com/api/ext/mcp mit Authorization: Bearer <api_key> verweist.
Tool-Referenz (nativ)
Tool | REST-Operation |
|
|
|
|
|
|
|
|
|
|
|
|
Typischer Ablauf: get_credit_balance → create_bundle (Entwurf) → configure_bundle_video × N → publish_bundle → get_bundle abfragen oder Webhooks abonnieren.
Ressourcen
API-Dokumentation: https://developers.tokportal.com
MCP-Server: https://developers.tokportal.com/mcp (remote
https://app.tokportal.com/api/ext/mcp, stdionpx -y tokportal-mcp)Python SDK: https://github.com/tokportal/tokportal-python
Support: team@tokportal.com
Lizenz
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceEnables AI agents to create, schedule, and manage social media posts across 10 platforms via a unified API.
- Alicense-qualityCmaintenanceSocial media API and MCP server for AI agents that enables publishing to X, Instagram, LinkedIn, Reddit, Bluesky, and Threads from a single endpoint.1MIT
- AlicenseAqualityBmaintenanceMCP server to manage social media accounts from AI assistants, enabling post creation, scheduling, publishing, and media uploads across multiple platforms.13231MIT
- AlicenseAqualityCmaintenanceMCP server for QPost that lets AI agents schedule and publish video/image posts to YouTube, TikTok, and Instagram via QPost's REST API.7507MIT
Related MCP Connectors
Connect any AI agent to 11+ social platforms: schedule, publish & track posts via hosted MCP.
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tokportal/langchain-tokportal'
If you have feedback or need assistance with the MCP directory API, please join our Discord server