{"_id":"@clicksend/langchain-clicksend-mcp","_rev":"4-151e27bea034504185081b4edbaa10c4","name":"@clicksend/langchain-clicksend-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@clicksend/langchain-clicksend-mcp","version":"0.1.0","license":"MIT","_id":"@clicksend/langchain-clicksend-mcp@0.1.0","maintainers":[{"name":"clicksendmatt","email":"support@clicksend.com"},{"name":"pauldclicksend","email":"pauld@clicksend.com"},{"name":"poechen","email":"poe.chen@clicksend.com"},{"name":"asim-clicksend","email":"asim.suvedi@clicksend.com"},{"name":"callum-p","email":"callum@callumpember.com"},{"name":"jaxom-clicksend","email":"Jaxom@clicksend.com"}],"dist":{"shasum":"9a2b69d48daf595df00a97a965241a85d6f559ed","tarball":"https://registry.npmjs.org/@clicksend/langchain-clicksend-mcp/-/langchain-clicksend-mcp-0.1.0.tgz","fileCount":7,"integrity":"sha512-1pV/zTbs7A4YBZKqr4aK5vLEOFfyinETnB2UtP8FaVvERtC/Ewrs4L0/dEb9z+rLNWmDFiNRlnWndQSzVJtWow==","signatures":[{"sig":"MEUCIAnTSKAUjEGq3Dehw3zn2moJVenNN+kfrs0hq4XkaBnKAiEA7jlH3Bz3KqVViewoQVf/fEaM0aD7qLHRxs7rys136Iw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8016},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"ec9e0af393bb5fd50938d970ebb821274f760e8f","scripts":{"test":"vitest","build":"tsup src/index.ts --format esm,cjs --dts","prepublishOnly":"npm run build"},"_npmUser":{"name":"asim-clicksend","email":"asim.suvedi@clicksend.com"},"_npmVersion":"10.9.2","description":"LangChain MCP integration for ClickSend","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@langchain/core":"^1.1.4","@langchain/mcp-adapters":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^1.6.0","typescript":"^5.9.3","@types/node":"^25.0.3"},"peerDependencies":{"langchain":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/langchain-clicksend-mcp_0.1.0_1767746758227_0.15168372747014613","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-01-07T00:45:58.226Z","modified":"2026-08-11T05:11:27.872Z","0.1.0":"2026-01-07T00:45:58.373Z"},"license":"MIT","description":"LangChain MCP integration for ClickSend","maintainers":[{"email":"support@clicksend.com","name":"clicksendmatt"},{"email":"pauld@clicksend.com","name":"pauldclicksend"},{"email":"poe.chen@clicksend.com","name":"poechen"},{"email":"callum@callumpember.com","name":"callum-p"},{"email":"Jaxom@clicksend.com","name":"jaxom-clicksend"},{"email":"nihara@clicksend.com","name":"niharacs"}],"readme":"# @clicksend/langchain-clicksend-mcp\n\nLangChain integration for ClickSend via Model Context Protocol (MCP).\n\nThis package provides LangChain tools that wrap the [ClickSend MCP Server](https://www.npmjs.com/package/@clicksend/clicksend-mcp-server), enabling you to send SMS, MMS, and other ClickSend communications through LangChain agents.\n\n## Installation\n\n```bash\nnpm install @clicksend/langchain-clicksend-mcp\n```\n\n## Prerequisites\n\nYou need a ClickSend account with API credentials:\n- **Username**: Your ClickSend account username\n- **API Key**: Your ClickSend API key\n\nGet your credentials from the [ClickSend Dashboard](https://dashboard.clicksend.com/).\n\n## Usage\n\n### Basic Example\n\n```typescript\nimport { createClickSendTools } from \"@langchain/clicksend-mcp\";\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport { AgentExecutor, createToolCallingAgent } from \"langchain/agents\";\nimport { ChatPromptTemplate } from \"@langchain/core/prompts\";\n\n// Initialize ClickSend tools\nconst tools = await createClickSendTools({\n  username: process.env.CLICKSEND_USERNAME!,\n  apiKey: process.env.CLICKSEND_API_KEY!,\n});\n\n// Create an agent with the tools\nconst llm = new ChatOpenAI({\n  model: \"gpt-4\",\n  temperature: 0,\n});\n\nconst prompt = ChatPromptTemplate.fromMessages([\n  [\"system\", \"You are a helpful assistant with access to ClickSend communication tools.\"],\n  [\"human\", \"{input}\"],\n  [\"placeholder\", \"{agent_scratchpad}\"],\n]);\n\nconst agent = createToolCallingAgent({\n  llm,\n  tools,\n  prompt,\n});\n\nconst agentExecutor = new AgentExecutor({\n  agent,\n  tools,\n});\n\n// Send an SMS\nconst result = await agentExecutor.invoke({\n  input: \"Send an SMS to +1234567890 saying 'Hello from LangChain!'\"\n});\n\nconsole.log(result.output);\n```\n\n### Available Tools\n\nThe integration automatically exposes all tools from the ClickSend MCP server, which typically include:\n\n- **send_sms**: Send SMS messages\n- **send_mms**: Send MMS messages  \n- **get_sms_history**: Retrieve SMS history\n- **get_account_balance**: Check account balance\n- And more...\n\nThe exact tools available depend on the ClickSend MCP server version.\n\n### Configuration\n\n```typescript\nimport { createClickSendTools } from \"@clicksend/langchain-clicksend-mcp\";\n\nconst tools = await createClickSendTools({\n  username: \"your-clicksend-username\",\n  apiKey: \"your-clicksend-api-key\",\n});\n```\n\n#### Options\n\n- `username` (required): Your ClickSend account username\n- `apiKey` (required): Your ClickSend API key\n\n### Environment Variables\n\nFor security, use environment variables to store credentials:\n\n```bash\nexport CLICKSEND_USERNAME=\"your-username\"\nexport CLICKSEND_API_KEY=\"your-api-key\"\n```\n\n```typescript\nconst tools = await createClickSendTools({\n  username: process.env.CLICKSEND_USERNAME!,\n  apiKey: process.env.CLICKSEND_API_KEY!,\n});\n```\n\n## Advanced Usage\n\n### Direct MCP Client Access\n\nIf you need more control, you can access the underlying MCP client:\n\n```typescript\nimport { createClickSendMCPClient } from \"@clicksend/langchain-clicksend-mcp\";\n\nconst client = createClickSendMCPClient({\n  username: process.env.CLICKSEND_USERNAME!,\n  apiKey: process.env.CLICKSEND_API_KEY!,\n});\n\n// Get tools\nconst tools = await client.getTools();\n\n// Access the raw MCP client\n// ... additional MCP operations\n```\n\n## Testing\n\n```bash\nnpm test\n```\n\nMake sure to set the required environment variables before running tests:\n\n```bash\nexport CLICKSEND_USERNAME=\"your-test-username\"\nexport CLICKSEND_API_KEY=\"your-test-api-key\"\nnpm test\n```\n\n## Building\n\n```bash\nnpm run build\n```\n\n## License\n\nMIT\n\n## Related\n\n- [ClickSend MCP Server](https://www.npmjs.com/package/@clicksend/clicksend-mcp-server)\n- [LangChain](https://js.langchain.com/)\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n\n","readmeFilename":"README.md"}