{"_id":"trademark-mcp-server","name":"trademark-mcp-server","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"trademark-mcp-server","version":"1.0.0","description":"A Model Context Protocol (MCP) server that provides tools for searching and retrieving USPTO trademark information using the TSDR API.","main":"dist/index.js","exports":{".":"./dist/index.js","./server":"./dist/server.js"},"bin":{"trademark-mcp-server":"dist/bin.js"},"keywords":["mcp","trademark","uspto","tsdr","api","model-context-protocol"],"author":{"name":"Jordan Burke","email":"jordan.burke@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/jordanburke/trademark-mcp-server.git"},"bugs":{"url":"https://github.com/jordanburke/trademark-mcp-server/issues"},"homepage":"https://github.com/jordanburke/trademark-mcp-server#readme","dependencies":{"fastmcp":"^3.13.0","zod":"^3.25.76"},"devDependencies":{"@eslint/js":"^9.32.0","@types/node":"^22.17.0","@typescript-eslint/eslint-plugin":"^8.38.0","@typescript-eslint/parser":"^8.38.0","@vitest/coverage-v8":"^3.2.4","eslint":"^9.32.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.3","prettier":"^3.6.2","tsup":"^8.5.0","tsx":"^4.20.3","typescript":"^5.9.2","vitest":"^3.2.4"},"scripts":{"build":"tsup","build:prod":"SKIP_DTS=true tsup","inspect":"pnpm build && npx @modelcontextprotocol/inspector dist/bin.js","dev":"pnpm build && pnpm inspect","start":"pnpm build && npx trademark-mcp-server","serve":"pnpm build && node dist/server.js","serve:dev":"tsx watch src/server.ts","format":"prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\"","format:check":"prettier --check \"src/**/*.{ts,tsx,js,jsx,json}\"","lint":"eslint \"src/**/*.{ts,tsx}\"","lint:fix":"eslint \"src/**/*.{ts,tsx}\" --fix","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:ui":"vitest --ui"},"_id":"trademark-mcp-server@1.0.0","types":"./dist/index.d.ts","_integrity":"sha512-55ycCOkawj26sz5gGl/udw0b8++CQ5GINBM+BIV4ppKX3VR+evdPHAV6/Nf44rNgUAlwJXSHCyZcLQ3lTXg9+Q==","_resolved":"/private/var/folders/x2/qy0xl5dd691dl327z_ls6yth0000gn/T/e88189de6f9b0a7535bbe4abc23298d9/trademark-mcp-server-1.0.0.tgz","_from":"file:trademark-mcp-server-1.0.0.tgz","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-55ycCOkawj26sz5gGl/udw0b8++CQ5GINBM+BIV4ppKX3VR+evdPHAV6/Nf44rNgUAlwJXSHCyZcLQ3lTXg9+Q==","shasum":"d36850f941c7b7f0a06853da54ae3b289b56e957","tarball":"https://registry.npmjs.org/trademark-mcp-server/-/trademark-mcp-server-1.0.0.tgz","fileCount":9,"unpackedSize":42260,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD3IA01qvSMsz6KZyD7XapGpR5257wHt1628+zt+0iVAQIgFi9LOH3adc1iBIBBzZ6QLhN+uztMKUXe21b9OtJd5cg="}]},"_npmUser":{"name":"jordanburke","email":"jordan.burke@gmail.com"},"directories":{},"maintainers":[{"name":"jordanburke","email":"jordan.burke@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trademark-mcp-server_1.0.0_1754319236484_0.9066588903017936"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-04T14:53:56.483Z","1.0.0":"2025-08-04T14:53:56.719Z","modified":"2025-08-04T14:53:57.004Z"},"maintainers":[{"name":"jordanburke","email":"jordan.burke@gmail.com"}],"description":"A Model Context Protocol (MCP) server that provides tools for searching and retrieving USPTO trademark information using the TSDR API.","homepage":"https://github.com/jordanburke/trademark-mcp-server#readme","keywords":["mcp","trademark","uspto","tsdr","api","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/jordanburke/trademark-mcp-server.git"},"author":{"name":"Jordan Burke","email":"jordan.burke@gmail.com"},"bugs":{"url":"https://github.com/jordanburke/trademark-mcp-server/issues"},"license":"MIT","readme":"# Trademark MCP Server\n\nA Model Context Protocol (MCP) server that provides tools for searching and retrieving USPTO trademark information using the TSDR API.\n\n## Features\n\nThis MCP server provides the following tools:\n\n- **trademark_search_by_serial**: Search for trademark information using an 8-digit serial number\n- **trademark_search_by_registration**: Search for trademark information using a 7-8 digit registration number\n- **trademark_status**: Get comprehensive status information for a trademark (HTML format)\n- **trademark_image**: Retrieve trademark image URLs\n- **trademark_documents**: Get document bundle URLs for a trademark\n\n## Installation\n\n```bash\npnpm install\npnpm build\n```\n\n## ⚠️ API Key Required\n\n**Important**: The USPTO TSDR API requires an API key since October 2020. You must:\n\n1. **Register** at [USPTO Developer Portal](https://developer.uspto.gov/)\n2. **Get your API key** from your account dashboard  \n3. **Set environment variable**: `USPTO_API_KEY=your_api_key_here`\n\nWithout an API key, all requests will return 401 Unauthorized errors.\n\n## Usage\n\n### Using npx (Recommended)\n\nYou can run the server directly using npx without installing:\n\n```bash\n# Set your API key first\nexport USPTO_API_KEY=your_api_key_here\n\n# Then run the server\nnpx trademark-mcp-server\n```\n\nThis will start the MCP server in stdio mode, ready to receive MCP protocol messages.\n\n### As an MCP Server (stdio)\n\nIf you have the package installed locally:\n\n```bash\npnpm start\n# or directly\nnode dist/bin.js\n```\n\n### Using the Shell Script\n\nA convenience shell script is provided:\n\n```bash\n./start-mcp-server.sh\n```\n\n### As an HTTP Server\n\n```bash\n# Set your API key first\nexport USPTO_API_KEY=your_api_key_here\n\n# Then run the server\npnpm serve\n# or directly\nnode dist/server.js\n```\n\nThe HTTP server will run on port 8080 by default (configurable via `PORT` environment variable):\n- Health check: `http://localhost:8080/health`\n- MCP endpoint: `http://localhost:8080/mcp`\n\n### Development\n\n```bash\n# Set your API key first\nexport USPTO_API_KEY=your_api_key_here\n\n# Run in development mode with file watching\npnpm serve:dev\n\n# Run with MCP Inspector for debugging and testing\npnpm inspect\n# or use the convenience script\n./inspect-server.sh\n\n# Run tests\npnpm test\n\n# Lint and format\npnpm lint\npnpm format\n```\n\n### Testing with MCP Inspector\n\nThe MCP Inspector provides a web-based interface for testing MCP servers:\n\n```bash\n# Start the inspector (opens browser at http://localhost:5173)\npnpm inspect\n\n# Or use the standalone script\n./inspect-server.sh\n```\n\nThe inspector allows you to:\n- **Test all tools** interactively through a web UI\n- **View server capabilities** and available tools\n- **Send requests** and see responses in real-time\n- **Debug issues** with detailed logging\n- **Validate** MCP protocol compliance\n\n## API Endpoints Used\n\nThis server uses the USPTO TSDR (Trademark Status & Document Retrieval) API:\n\n- Base URL: `https://tsdrapi.uspto.gov/ts/cd`\n- **Status Info (JSON)**: `/casestatus/sn[SERIAL]/info.json` or `/casestatus/rn[REGISTRATION]/info.json`\n- **Status Info (HTML)**: `/casestatus/sn[SERIAL]/content.html`\n- **Trademark Images**: `/rawImage/[SERIAL]`\n- **Document Bundles**: `/casedocs/bundle.pdf?sn=[SERIAL]`\n\n### Getting an API Key\n\n1. Visit [USPTO Developer Portal](https://developer.uspto.gov/)\n2. Create an account or log in\n3. Navigate to your account dashboard\n4. Generate a new API key for TSDR access\n5. Copy your API key for use with this server\n\nFor questions about API keys, contact: `APIhelp@uspto.gov`\n\n### Rate Limits\n\n- General API calls: 60 requests per minute per API key\n- PDF/ZIP downloads: 4 requests per minute per API key\n\n## Example Usage\n\nYou can test these examples using the MCP Inspector (`pnpm inspect`) or by calling the tools directly.\n\n### Search by Serial Number\n\n```typescript\n// Example serial number: 78787878\n{\n  \"name\": \"trademark_search_by_serial\",\n  \"arguments\": {\n    \"serialNumber\": \"78787878\"\n  }\n}\n```\n\n### Search by Registration Number\n\n```typescript\n// Example registration number: 1234567\n{\n  \"name\": \"trademark_search_by_registration\", \n  \"arguments\": {\n    \"registrationNumber\": \"1234567\"\n  }\n}\n```\n\n### Get Trademark Image\n\n```typescript\n{\n  \"name\": \"trademark_image\",\n  \"arguments\": {\n    \"serialNumber\": \"78787878\"\n  }\n}\n```\n\n### Test with Real Data\n\nTry these working examples in the MCP Inspector:\n- **Apple trademark**: Serial number `78462704`\n- **Nike trademark**: Serial number `72016902`\n- **Microsoft trademark**: Serial number `78213220`\n\n## Configuration for Claude Desktop\n\n### Using npx (Recommended)\n\nAdd this to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"trademark-mcp-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"trademark-mcp-server\"],\n      \"env\": {\n        \"USPTO_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n### Using Local Installation\n\nIf you have the package installed locally:\n\n```json\n{\n  \"mcpServers\": {\n    \"trademark-mcp-server\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/trademark-mcp-server/dist/bin.js\"],\n      \"env\": {\n        \"USPTO_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n### Using Shell Script\n\nYou can also use the provided shell script:\n\n```json\n{\n  \"mcpServers\": {\n    \"trademark-mcp-server\": {\n      \"command\": \"/path/to/trademark-mcp-server/start-mcp-server.sh\",\n      \"env\": {\n        \"USPTO_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n## License\n\nMIT\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Run tests and linting: `pnpm test && pnpm lint`\n5. Submit a pull request\n\n## API Reference\n\nFor more information about the USPTO TSDR API, visit:\n- [USPTO Developer Portal](https://developer.uspto.gov/api-catalog/tsdr-data-api)\n- [TSDR API Swagger Documentation](https://developer.uspto.gov/swagger/tsdr-api-v1)","readmeFilename":"README.md","_rev":"1-c1e012f1f35dc4e7e0f6f2b8805d84b6"}