How to Use the Troops MCP in LangChain
Chain together HR workflows in LangChain by linking MCP tool calls to manage candidates and jobs.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Troops MCP to LangChain
Create your Vinkius account to connect Troops to LangChain and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Build recruitment pipelines with the Troops MCP Server.
Use `create_job` to register a new open position, then immediately call `create_candidate` if you find someone who matches. The output of defining the job offer feeds directly into the candidate creation step. You can build multi-step reasoning chains that manage an entire hiring sequence. For example, your agent first uses `get_candidate` to pull details, and then passes those results to generate a contract draft using `generate_contract`.
Track job status and candidate records in LangChain.
`list_jobs` lets you filter existing job offers by their current status—active, pending, or closed. If the search yields results, your agent can then iterate through them to pull specific data points using `get_candidate`, checking each person's file. This makes it easy for your ReAct agent to manage complex workflows. You don't just get a list; you get actionable data that drives the next tool call in the chain.
Process HR paperwork and timesheets using the MCP Server.
To finalize employment, your agent can run `generate_contract` to draft the document, followed by `sign_contract` which executes the signing action. This whole process is one continuous chain. After hiring, you keep things moving with `submit_timesheet`. By chaining these operations, you ensure that every necessary HR step—from job opening to paid time off—is executed in sequence.
Set up Troops MCP in LangChain
Prerequisites
- Python 3.10+ installed
-
langchain-mcp-adapters+langgraphpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChainBaseToolobjects. - 2
Connect via HTTP transport
Use
MultiServerMCPClientwith"transport": "http"pointing to your Vinkius endpoint. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Create a ReAct agent
Pass the discovered tools to
create_react_agent()from LangGraph. The agent automatically routes Troops tool calls through the MCP protocol. - 4
Run with any LLM
Swap
ChatOpenAIforChatAnthropic,ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
async with MultiServerMCPClient({
"troops-mcp": {
"transport": "http",
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
}
}) as client:
tools = client.get_tools()
agent = create_react_agent(
ChatOpenAI(model="gpt-4o"),
tools,
)
result = await agent.ainvoke({
"messages": "List recent Troops transactions"
})
print(result["messages"][-1].content) Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Troops. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Troops MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Troops MCP today
We host it, we monitor it, we maintain it. You just paste one token.