A free TypeScript SDK for building agentic AI apps — with instant access to MCP servers.How it works?
# Install dependencies
npm install toolsdk axios openai dotenv
import OpenAI from 'openai';
import { ToolSDKApiClient } from 'toolsdk/api';
// Initialize Client
const toolSDK = new ToolSDKApiClient({ apiKey: process.env.TOOLSDK_AI_API_KEY });
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
// Get Tools
const searchMCP = await toolSDK.package('@toolsdk.ai/tavily-mcp', {
TAVILY_API_KEY: process.env.TAVILY_API_KEY,
});
const emailMCP = await toolSDK.package('@toolsdk.ai/mcp-send-email', {
RESEND_API_KEY: process.env.RESEND_API_KEY,
});
const searchTool = await searchMCP.getOpenAISDKTool('tavily-search');
const emailTool = await emailMCP.getOpenAISDKTool('send-email');
const messages = [{
role: 'user',
content: 'Help me search for the latest AI news and send it to john@example.com',
}];
const completion = await openai.chat.completions.create({
model: 'gpt-4.1',
messages,
tools: [searchTool, emailTool],
});
const toolMap = { 'tavily-search': searchMCP, 'send-email': emailMCP };
// Execute Tool Calls
for (const toolCall of completion.choices[0].message.tool_calls) {
const { name: toolKey, arguments: argsStr } = toolCall.function;
const inputData = JSON.parse(argsStr);
const toolContent = await toolMap[toolKey].run({ toolKey, inputData });
messages.push(
{ role: 'assistant', tool_calls: [toolCall] },
{ role: 'tool', content: JSON.stringify(toolContent), tool_call_id: toolCall.id },
);
}
const finalResponse = await openai.chat.completions.create({
model: 'gpt-4.1',
messages,
});
console.log(finalResponse);
More details and complete examples on - GitHub Example
Featured
Uncategorized
Aggregators
Art & Culture
Browser Automation
Cloud Platforms
Code Execution
Coding Agents
Command Line
Communication
Customer Data Platforms
Databases
Data Platforms
Developer Tools
Data Science Tools
Embedded System
File Systems
Finance & Fintech
Gaming
Knowledge & Memory
Location Services
Marketing
Monitoring
Search & Data Extraction
Security
Sports
Support & Service Management
Translation Services
Travel & Transportation
Version Control
Other Tools and Integrations
24
62
14
89
142
367
185
17
141
289
13
18
732
3.1k
16
396
2.2k
601
14
40