tokportal-mcp
Officiallangchain-tokportal
TokPortal을 위한 LangChain / LangGraph 통합입니다.
TokPortal은 관리형 소셜 인프라 API입니다. 16개 이상 국가의 인간 계정 관리자가 생성하고, 워밍업하고, 운영하는 실제 TikTok, Instagram, YouTube 계정을 REST API와 MCP 서버로 노출합니다. 계정별 OAuth가 없고, 하루 25개 게시물 상한이 없으며, 앱 검토도 필요 없습니다.
이 패키지는 여러분의 에이전트가 TokPortal을 사용하는 두 가지 방법을 제공합니다:
모드 | 제공 기능 | 사용 시기 |
네이티브 도구 ( |
| 단순 동기 에이전트, 런타임 시 MCP 의존성 불필요 |
MCP 도구 ( |
| 전체 API 표면, 비동기 에이전트 |
설치
pip install langchain-tokportal
# optional, for the LangGraph example below
pip install langchain langchain-openaihttps://app.tokportal.com/developer에서 API 키를 받아 내보내세요:
export TOKPORTAL_API_KEY=sk_...Related MCP server: Outpost
빠른 시작 (네이티브 도구)
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": ...}}모든 도구는 JSON 문자열을 반환합니다(원시 TokPortal data 엔벨로프, 또는 status, code, request_id, retryable 필드가 포함된 {"error": {...}} 객체 — 모델이 스스로 수정할 수 있도록).
LangGraph 에이전트 예제 (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())동기 전용 코드 경로는 toolkit.get_mcp_tools()를 호출할 수 있습니다(asyncio.run 래핑).
MCP 연결 직접 사용
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()은 https://app.tokportal.com/api/ext/mcp를 가리키며 Authorization: Bearer <api_key>를 포함하는 Streamable-HTTP 연결 딕셔너리를 반환합니다.
도구 참조 (네이티브)
도구 | REST 작업 |
|
|
|
|
|
|
|
|
|
|
|
|
일반적인 흐름: get_credit_balance → create_bundle (초안) → configure_bundle_video × N → publish_bundle → get_bundle 폴링 또는 웹훅 구독.
리소스
API 문서: https://developers.tokportal.com
MCP 서버: https://developers.tokportal.com/mcp (원격
https://app.tokportal.com/api/ext/mcp, stdionpx -y tokportal-mcp)Python SDK: https://github.com/tokportal/tokportal-python
라이선스
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