@specstory/tnydev-mcp
Version:
MCP server for tny.dev URL shortening service - AI agent integration for link management
1,231 lines (991 loc) ⢠34.3 kB
Markdown
<div align="center">
<h1>
<img src="https://www.tny.dev/tny.svg" alt="tny.dev" height="30" style="vertical-align: middle; margin-right: 10px;">
MCP Server
</h1>
<h2>The API-first link shortener built for AI agents</h2>
<p>First-party MCP server & DXT for Claude, Cursor, and other AI assistants</p>
[](https://www.npmjs.com/package/@specstory/tnydev-mcp)
[](https://opensource.org/licenses/MIT)
[](https://uptime.betterstack.com/?utm_source=status_badge)
[](https://nodejs.org)
[](https://modelcontextprotocol.io)
[](https://www.typescriptlang.org/)
[](https://github.com/specstoryai/tnydev-mcp/pulls)
[](https://claude.ai/desktop)
[](https://claude.ai/code)
[](https://cursor.sh)
[](https://codeium.com/windsurf)
[](https://zed.dev)
[](https://code.visualstudio.com)
</div>
---
## š Why tny.dev for AI Agents?
### Optimized for bursty AI traffic. Right when your agents need them.
Built to handle spikes when agents process batches.
<div align="center">
<table>
<tr>
<td align="center">
<h3>š¤ Agent-First Design</h3>
<p>Official MCP server for Claude, Cursor, and other AI assistants. Link shortening with Natural Language that just works.</p>
</td>
<td align="center">
<h3>š° 200x More Economical</h3>
<p>500 requests/hour for just $9/month. Perfect for AI workflows that process links in bursts.</p>
</td>
<td align="center">
<h3>ā±ļø Generous Rate Limits</h3>
<p>500 requests per hour means you can scale naturally with your automation needs without hitting quotas.</p>
</td>
</tr>
</table>
</div>
## šÆ How Link Shorteners Compare
<div align="center">
| Feature | tny.dev | Bitly | Rebrandly | Short.io | TinyURL |
|---------|---------|-------|-----------|----------|---------|
| **First-party MCP Server** | ā
Native | ā ļø Third-party | ā
Native | ā None | ā ļø Third-party |
| **Claude Desktop Extension** | ā
Native .dxt | ā None | ā None | ā None | ā None |
| **Monthly Cost** | ā
**$9** | ā $199 | ā ļø $29-35 | ā ļø $19 | ā
$9.99 |
| **Hourly Rate Limit** | ā
**500/hour** | ā ļø ~69/hour* | ā ļø ~35/hour* | ā ~1.4/hour* | ā ļø ~14/hour* |
| **Bulk Operations** | ā
100/request | ā Not supported | ā
25/request | ā
1,000/request | ā Not documented |
<sub>* Effective hourly rate calculated from monthly quotas divided by 720 hours</sub>
</div>
## šØ Other Features
- **š± QR Codes**: Automatic QR code generation for all shortened URLs
- **š Analytics**: Get detailed click analytics for your shortened links
- **š Link Management**: List all your shortened links with pagination
- **šÆ Rate Limit Awareness**: Real-time quota tracking in every response
- **š¤ Natural Language**: Built for how AI agents actually work
- **š Custom Domains**: Use your own domain for branded short URLs (Developer tier)
- **⨠Custom Slugs**: Create memorable short URLs with custom slugs (Developer tier)
## š Quick Start
### Option 1: Claude Desktop Extension (Easiest)
<div align="center">
<a href="https://github.com/specstoryai/tnydev-mcp/releases/latest/download/tnydev-mcp.dxt">
<img src="https://img.shields.io/badge/Download%20Desktop%20Extension-ā-purple?style=for-the-badge" alt="Download Extension">
</a>
</div>
#### Installation Steps:
1. **Download the Extension**
- Click the button above, or
- Go to [Releases](https://github.com/specstoryai/tnydev-mcp/releases) and download `tnydev-mcp.dxt`
2. **Install in Claude Desktop**
- **Method 1**: Drag and drop the `.dxt` file into Claude Desktop
- **Method 2**: In Claude Desktop, go to Settings ā Extensions ā Install Extension ā Select the `.dxt` file
3. **Configure Your API Key**
- After installation, click on the extension settings
- Enter your tny.dev API key (get one at [tny.dev/account](https://www.tny.dev/account))
- Optionally add your domain ID for custom domains
4. **Start Using**
- The tools are now available in your conversation
- Try: "Shorten this URL for me: https://example.com"
### Option 2: npm Package (For Developers)
```bash
# In your MCP client configuration, use:
npx -y @specstory/tnydev-mcp
```
### Option 3: Local Installation
1. Get a tny.dev API key from your [account settings](https://www.tny.dev/account)
2. Clone this repository and navigate to `mcp-server`
3. Run: `npm install && npm run build`
4. Set your API key: `echo "TNY_DEV_API_KEY=your_key_here" > .env`
5. Configure your MCP client (see [Installation](#installation) below)
6. Start using the tools in your AI assistant!
## š Prerequisites
### For Desktop Extension
- Claude Desktop v0.7.0 or higher
- A tny.dev account with API access
### For npm/Manual Installation
- Node.js 18 or higher
- A tny.dev account with API access (developer tier recommended)
- An MCP-compatible client (Claude Desktop, Claude Code, Cursor, or VS Code)
## š Getting Started with tny.dev
### 1. Get Your API Key (30 seconds)
Visit [tny.dev](https://www.tny.dev) ā Sign up ā [Account Settings](https://www.tny.dev/account) ā Create API Key
### 2. Choose Your Plan
| Plan | Price | Rate Limit | Best For |
|------|-------|------------|----------|
| **Free** | $0 | 50/hour | Testing & personal projects |
| **Developer** | $9/mo | 500/hour | AI agents & automation |
### 3. Developer Plan Benefits
- ā
**10x more requests** - Handle bursty AI traffic
- ā
**Custom domains** - Use your own branded URLs
- ā
**Custom slugs** - Create memorable short links
- ā
**Bulk operations** - Process up to 100 URLs at once
- ā
**Webhooks** - Real-time event notifications
- ā
**Extra API keys** - Separate keys for different environments
## š Custom Domains (Developer Tier)
To use custom domains with the MCP server:
1. **Add a Custom Domain**: In your tny.dev account, navigate to the Domains section and add your custom domain
2. **Verify Domain**: Complete the DNS verification process
3. **Get Domain ID**: Once verified, copy your domain ID (format: `your_domain_id_here`)
4. **Configure MCP Server**: Either:
- Set `TNY_DEV_DEFAULT_DOMAIN_ID` environment variable for global default
- Pass `domainId` parameter when creating short URLs
- Tool parameter takes precedence over environment variable
## š¦ Installation
### Local Setup
1. Clone or download this repository
2. Navigate to the `mcp-server` directory:
```bash
cd mcp-server
```
3. Install dependencies:
```bash
npm install
```
4. Build the TypeScript code:
```bash
npm run build
```
5. Create your environment file:
```bash
cp .env.example .env
```
6. Edit `.env` and add your tny.dev API key:
```
TNY_DEV_API_KEY=your_api_key_here
# Optional: For custom domain support (Developer tier)
TNY_DEV_DEFAULT_DOMAIN_ID=your_domain_id_here
```
## š§ Installation Methods
### š Quick Install
<div align="center">
<table>
<tr>
<td align="center" width="25%">
<a href="https://github.com/specstoryai/tnydev-mcp/releases/latest/download/tnydev-mcp.dxt">
<img src="https://img.shields.io/badge/Claude-Desktop-7c3aed?style=for-the-badge&logo=anthropic&logoColor=white" alt="Claude Desktop">
</a>
<br>
<sub><b>Claude Desktop</b></sub>
<br>
<sub>Download .dxt extension</sub>
</td>
<td align="center" width="25%">
<a href="https://cursor.com/install-mcp?name=tny-dev&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40specstory%2Ftnydev-mcp%22%5D%2C%22env%22%3A%7B%22TNY_DEV_API_KEY%22%3A%22your_api_key_here%22%7D%7D">
<img src="https://img.shields.io/badge/Cursor-IDE-00C4B3?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJMMyA3VjE3TDEyIDIyTDIxIDE3VjdMMTIgMloiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPg==&logoColor=white" alt="Cursor">
</a>
<br>
<sub><b>Cursor</b></sub>
<br>
<sub>One-click install</sub>
</td>
<td align="center" width="25%">
<a href="https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%7B%22name%22%3A%22tny-dev%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40specstory%2Ftnydev-mcp%22%5D%2C%22env%22%3A%7B%22TNY_DEV_API_KEY%22%3A%22your_api_key_here%22%7D%7D">
<img src="https://img.shields.io/badge/VS_Code-Editor-0078d7?style=for-the-badge&logo=visual-studio-code&logoColor=white" alt="VS Code">
</a>
<br>
<sub><b>VS Code</b></sub>
<br>
<sub>Quick setup</sub>
</td>
<td align="center" width="25%">
<a href="https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%7B%22name%22%3A%22tny-dev%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40specstory%2Ftnydev-mcp%22%5D%2C%22env%22%3A%7B%22TNY_DEV_API_KEY%22%3A%22your_api_key_here%22%7D%7D">
<img src="https://img.shields.io/badge/VS_Code-Insiders-1ba672?style=for-the-badge&logo=visual-studio-code&logoColor=white" alt="VS Code Insiders">
</a>
<br>
<sub><b>VS Code Insiders</b></sub>
<br>
<sub>Preview build</sub>
</td>
</tr>
</table>
<p align="center">
<sub>š” <b>Note:</b> For VS Code and Cursor, remember to replace <code>your_api_key_here</code> with your actual <a href="https://www.tny.dev/account">tny.dev API key</a></sub>
</p>
</div>
### š„ļø Claude Desktop Extension (Recommended)
The easiest way to use tny.dev in Claude Desktop:
1. Download the latest `tnydev-mcp.dxt` from [Releases](https://github.com/specstoryai/tnydev-mcp/releases)
2. Open Claude Desktop
3. Drag and drop the `.dxt` file into Claude Desktop
4. Configure your API key in the extension settings
5. Done! No terminal or JSON editing required
**Benefits:**
- ā
One-click installation
- ā
Automatic updates
- ā
Secure API key storage
- ā
User-friendly configuration UI
### š ļø Manual MCP Configuration
For advanced users who prefer manual configuration:
<details>
<summary><b>š± Claude Desktop (Manual)</b></summary>
#### Using npx (Recommended)
Edit your Claude Desktop configuration:
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
#### Local installation
```json
{
"mcpServers": {
"tny-dev": {
"command": "node",
"args": ["/absolute/path/to/tinylink/mcp-server/dist/index.js"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
**Alternative**: Use .env file instead of hardcoding the API key:
```json
{
"mcpServers": {
"tny-dev": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/absolute/path/to/tinylink/mcp-server"
}
}
}
```
Restart Claude Desktop for changes to take effect.
</details>
<details>
<summary><b>šÆ Cursor</b></summary>
#### Using npx (Recommended)
Cursor supports multiple configuration methods:
**Method 1: Project-specific configuration**
Create `.cursor/mcp.json` in your project root:
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
**Method 2: VS Code settings**
Add to your `.vscode/settings.json` or User Settings:
```json
{
"cursor.mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
#### Local installation
```json
{
"mcpServers": {
"tny-dev": {
"command": "node",
"args": ["/absolute/path/to/tinylink/mcp-server/dist/index.js"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
**Note:** Restart Cursor after making configuration changes.
</details>
<details>
<summary><b>š Windsurf</b></summary>
#### Using npx (Recommended)
Add to your Windsurf settings:
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
#### Local installation
```json
{
"mcpServers": {
"tny-dev": {
"command": "node",
"args": ["/absolute/path/to/tinylink/mcp-server/dist/index.js"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
</details>
<details>
<summary><b>š¤ Cline (VS Code Extension)</b></summary>
#### Using npx (Recommended)
Add to your VSCode settings (`.vscode/settings.json` or User Settings):
```json
{
"cline.mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
#### Local installation
```json
{
"cline.mcpServers": {
"tny-dev": {
"command": "node",
"args": ["/absolute/path/to/tinylink/mcp-server/dist/index.js"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
For Cursor specifically, you can also create `.cursor/mcp.json` in your project root:
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
</details>
<details>
<summary><b>š» VS Code (with Continue, Codeqwen, or other AI extensions)</b></summary>
#### Using npx (Recommended)
Add to your VS Code settings (`settings.json`):
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
**Note:** The exact configuration key may vary by extension:
- Continue: `continue.mcpServers`
- Codeqwen: `codeqwen.mcpServers`
- Check your extension's documentation for the correct key
#### Local installation
```json
{
"mcpServers": {
"tny-dev": {
"command": "node",
"args": ["/absolute/path/to/tinylink/mcp-server/dist/index.js"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
</details>
<details>
<summary><b>ā” Zed</b></summary>
#### Using npx (Recommended)
Add to your Zed settings:
```json
{
"language_models": {
"mcp": {
"servers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here"
}
}
}
}
}
}
```
#### Local installation
```json
{
"language_models": {
"mcp": {
"servers": {
"tny-dev": {
"command": "node",
"args": ["/absolute/path/to/tinylink/mcp-server/dist/index.js"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here"
}
}
}
}
}
}
```
</details>
<details>
<summary><b>š Claude Code</b></summary>
#### Using npx (Recommended)
Add as a locally-scoped server using the CLI:
```bash
claude mcp add tny-dev -s local -e TNY_DEV_API_KEY=your_api_key_here -- npx -y @specstory/tnydev-mcp
```
Or create a `.mcp.json` file in your project root:
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
#### Local installation
```bash
claude mcp add tny-dev -s local -e TNY_DEV_API_KEY=your_api_key_here -- node /absolute/path/to/tinylink/mcp-server/dist/index.js
```
</details>
<details>
<summary><b>š¤ Roo Coder</b></summary>
#### Using npx (Recommended)
Add to your Roo Coder settings:
```json
{
"roo.mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
#### Local installation
```json
{
"roo.mcpServers": {
"tny-dev": {
"command": "node",
"args": ["/absolute/path/to/tinylink/mcp-server/dist/index.js"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
</details>
<details>
<summary><b>šØ Void</b></summary>
#### Using npx (Recommended)
Add to your Void configuration:
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
#### Local installation
```json
{
"mcpServers": {
"tny-dev": {
"command": "node",
"args": ["/absolute/path/to/tinylink/mcp-server/dist/index.js"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
</details>
<details>
<summary><b>š ļø Other MCP Clients</b></summary>
#### Using npx (Recommended)
Most MCP clients support a similar configuration format:
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
#### Local installation
```json
{
"mcpServers": {
"tny-dev": {
"command": "node",
"args": ["/absolute/path/to/tinylink/mcp-server/dist/index.js"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
Check your client's documentation for the specific configuration file location and format.
</details>
### š Security Best Practices
**Important**: Never commit configuration files containing API keys to version control.
**Recommended approaches:**
1. **Environment Variables** (Most Secure)
```bash
export TNY_DEV_API_KEY="your_api_key_here"
export TNY_DEV_DEFAULT_DOMAIN_ID="your_domain_id_here"
```
2. **Secure Key Storage**
- Use a password manager for API keys
- Use system keychain/credential manager
- Use environment-specific `.env` files (never commit)
3. **Git Security**
```bash
# Add to .gitignore
.env
.env.local
**/claude_desktop_config.json
**/.cursor/mcp.json
.vscode/settings.json
```
4. **Keys**
- Use different keys for different environments
- Monitor key usage in your tny.dev dashboard
## š” AI Agent Use Cases
See how AI assistants naturally use tny.dev in real conversations ā no code required:
### Traditional API Approach vs. MCP Server
<div align="center">
<table>
<tr>
<td valign="top" width="50%">
#### ā Traditional API Approach
```python
# Step 1: Write code to call API
import requests
def shorten_url(url):
response = requests.post(
'https://www.tny.dev/api/v1/shorten',
headers={
'X-API-Key': 'tnyl_your_api_key_here',
'Content-Type': 'application/json'
},
json={'url': url}
)
return response.json()
# Step 2: Process each link manually
links = [...] # Your list of links
shortened = [shorten_url(link) for link in links]
# Step 3: Format and organize results
# More code needed...
```
</td>
<td valign="top" width="50%">
#### ā
With tny.dev MCP Server
```
š¬ You: "I'm writing a blog post about React
hooks. Please shorten these documentation
links and organize them by hook type."
š¤ Claude: "I'll shorten those React
documentation links and organize them by
hook type for you..."
[Automatically processes all links using MCP]
```
**No code required!** Just natural conversation.
</td>
</tr>
</table>
</div>
### Common AI Agent Workflows
#### š Campaign Analytics
> "Show me which links from yesterday's campaign got the most clicks"
#### ā” Bulk Processing
> "Shorten all the URLs in this documentation and create a table of contents"
#### š”ļø Link Management
> "Update all campaign links to use our new landing page"
#### šÆ Smart Organization
> "Group these product links by category and create trackable short URLs for each"
## š ļø Available Tools
For detailed API documentation, visit the [tny.dev API Docs](https://www.tny.dev/api-docs).
### 1. shorten_url
Create a shortened URL with support for custom domains and slugs (Developer tier feature).
**Parameters:**
- `url` (required): The URL to shorten
- `customSlug` (optional): Custom slug for the short URL (3-50 chars, alphanumeric + hyphens/underscores) - requires domainId
- `domainId` (optional): Domain ID for custom domain usage - required when using customSlug
**Examples:**
```
# Basic usage
Use the shorten_url tool to create a short link for https://example.com/very/long/url
# With custom domain and slug
Use the shorten_url tool to create a short link for https://example.com with customSlug "my-link" and domainId "your_domain_id_here"
# With custom domain only (random slug)
Use the shorten_url tool to create a short link for https://example.com with domainId "your_domain_id_here"
```
**Note:** Custom domains and slugs require a Developer tier subscription. You can configure a default domain ID using the `TNY_DEV_DEFAULT_DOMAIN_ID` environment variable.
### 2. get_link_analytics
Get click analytics for a shortened link.
**Parameters:**
- `slug` (required): The slug of the shortened URL
**Example:**
```
Get analytics for the link with slug "abc123"
```
### 3. list_links
List all shortened links created with your API key.
**Parameters:**
- `page` (optional): Page number (default: 1)
- `limit` (optional): Number of links per page (1-100, default: 20)
**Example:**
```
Show me all my shortened links
```
## ā” Rate Limits & Pricing
### Simple, Transparent Pricing
| | Free | Developer |
|---|---|---|
| **Monthly Cost** | $0 | $9 |
| **Hourly Rate Limit** | 50/hour | 500/hour |
| **Effective Cost** | - | $0.018/request |
| **Compared to Bitly** | - | **95% cheaper** |
> š” **Pro Tip**: The server displays remaining quota in each response to help you track usage in real-time.
## āļø Configuration Examples
<details>
<summary><b>Basic Configuration</b></summary>
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here" // Optional
}
}
}
}
```
</details>
<details>
<summary><b>With Custom Domain (Developer Tier)</b></summary>
```json
{
"mcpServers": {
"tny-dev": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "your_api_key_here",
"TNY_DEV_DEFAULT_DOMAIN_ID": "your_domain_id_here"
}
}
}
}
```
</details>
<details>
<summary><b>Development/Testing Configuration</b></summary>
```json
{
"mcpServers": {
"tny-dev": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/path/to/tinylink/mcp-server",
"env": {
"DEBUG": "true",
"TNY_DEV_BASE_URL": "https://staging.tny.dev/api/v1" // Optional staging URL
}
}
}
}
```
</details>
<details>
<summary><b>Multiple Environments</b></summary>
```json
{
"mcpServers": {
"tny-dev-prod": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "prod_key_here"
}
},
"tny-dev-test": {
"command": "npx",
"args": ["-y", "@specstory/tnydev-mcp"],
"env": {
"TNY_DEV_API_KEY": "test_key_here",
"TNY_DEV_BASE_URL": "https://staging.tny.dev/api/v1"
}
}
}
}
```
</details>
## šØ Development
### Prerequisites for Development
- Node.js 18+
- npm or yarn
- TypeScript knowledge
### Setup
```bash
# Clone the repository
git clone https://github.com/yourusername/tinylink.git
cd tinylink/mcp-server
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Add your API key to .env
echo "TNY_DEV_API_KEY=your_key_here" >> .env
# Build the project
npm run build
```
### Development Commands
```bash
# Run in development mode with auto-reload
npm run dev
# Build the project
npm run build
# Run linting
npm run lint
# Run type checking
npm run typecheck
# Start the built server
npm start
```
### Testing the Server
```bash
# Test manually with debug output
DEBUG=true TNY_DEV_API_KEY=your_key node dist/index.js
# Test with a custom base URL
TNY_DEV_BASE_URL=https://staging.tny.dev/api/v1 npm start
```
### Project Structure
```
mcp-server/
āāā src/
ā āāā index.ts # Main server entry point
ā āāā client.ts # API client implementation
ā āāā types.ts # TypeScript type definitions
ā āāā handlers/ # Tool handlers
ā āāā shorten.ts # URL shortening handler
ā āāā analytics.ts # Analytics handler
ā āāā links.ts # Links listing handler
āāā dist/ # Compiled JavaScript (generated)
āāā package.json # Project configuration
āāā tsconfig.json # TypeScript configuration
āāā .env.example # Environment template
āāā README.md # This file
```
## š Troubleshooting
<details>
<summary><b>Common Issues for All Clients</b></summary>
### Server Not Appearing in Client
- ā
Ensure the configuration file is valid JSON (check for trailing commas)
- ā
Verify the absolute path to the server is correct
- ā
Check that Node.js is installed and in your system PATH
- ā
Restart your client application after configuration changes
- ā
Enable debug mode: `DEBUG=true` in environment
### API Key Issues
- ā
Verify your API key is correctly set in the configuration or `.env` file
- ā
Check that your API key is active in your [Account](https://www.tny.dev/account) settings
- ā
Ensure there are no extra spaces or quotes around the API key
- ā
Test the server manually: `TNY_DEV_API_KEY=your_key node dist/index.js`
### Connection Errors
- ā
Run `npm run build` to ensure the server is compiled
- ā
Check for error messages in the client's developer console
- ā
Try running the server standalone to see error output
- ā
Verify Node.js version is 18 or higher: `node --version`
### Rate Limit Errors
- ā¹ļø The server displays remaining quota in each response
- ā¹ļø Free tier: 50 requests/hour, Developer tier: 500 requests/hour
- ā¹ļø Rate limits reset every hour from first request
- ā¹ļø Consider upgrading at [tny.dev Plans](https://www.tny.dev/plans)
</details>
<details>
<summary><b>Claude Desktop Specific</b></summary>
### Configuration File Location
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
### Common Issues
- **Server not loading**: Check Claude Desktop logs in Console.app (macOS) or Event Viewer (Windows)
- **Permission denied**: Ensure Claude Desktop has permission to execute Node.js
- **Path issues**: Use absolute paths, avoid `~` or environment variables in paths
</details>
<details>
<summary><b>Cursor Specific</b></summary>
### Configuration Priority
1. `.cursor/mcp.json` (project-specific)
2. VS Code User Settings
3. VS Code Workspace Settings
### Common Issues
- **Multiple configs**: Check all possible config locations
- **Extension conflicts**: Disable other MCP extensions temporarily
- **Reload required**: Use Command Palette > "Developer: Reload Window"
</details>
<details>
<summary><b>VS Code Extensions Specific</b></summary>
### Finding the Right Config Key
- Continue: `continue.mcpServers`
- Codeqwen: `codeqwen.mcpServers`
- Cline: `cline.mcpServers`
- Check extension docs for exact key
### Common Issues
- **Settings sync**: Disable settings sync temporarily if having issues
- **Extension updates**: Ensure extensions are up to date
- **Workspace trust**: Ensure workspace is trusted
</details>
<details>
<summary><b>Platform-Specific Issues</b></summary>
### macOS/Linux
- ā
Ensure execute permissions: `chmod +x dist/index.js`
- ā
Check `.env` file permissions: `chmod 600 .env`
- ā
Use full paths, not `~/` in configurations
### Windows
- ā
Use forward slashes or double backslashes: `C:/path/to/server` or `C:\\path\\to\\server`
- ā
Run as Administrator if permission issues persist
- ā
Ensure Node.js is in system PATH, not just user PATH
- ā
If using WSL, use Windows paths in config, not WSL paths
### Docker/Dev Containers
- ā
Mount the MCP server directory as a volume
- ā
Ensure Node.js is installed in the container
- ā
Use container paths in configuration
</details>
## š License
MIT
## š¦ Downloads & Releases
### Desktop Extension (.dxt)
- **Latest Release**: [Download tnydev-mcp.dxt](https://github.com/specstoryai/tnydev-mcp/releases/latest/download/tnydev-mcp.dxt)
- **All Releases**: [GitHub Releases](https://github.com/specstoryai/tnydev-mcp/releases)
- **Auto-Updates**: Extensions update automatically in Claude Desktop
### npm Package
- **Package**: [@specstory/tnydev-mcp](https://www.npmjs.com/package/@specstory/tnydev-mcp)
- **Install**: `npm install -g @specstory/tnydev-mcp`
- **Direct Use**: `npx @specstory/tnydev-mcp`
## š Resources
### Documentation
- š [tny.dev API Documentation](https://www.tny.dev/api-docs)
- š [MCP Protocol Specification](https://modelcontextprotocol.io)
- š [tny.dev Developer Portal](https://www.tny.dev/developers)
### Community
- š¬ [GitHub Discussions](https://github.com/specstoryai/tnydev-mcp/discussions)
- š [Report Issues](https://github.com/specstoryai/tnydev-mcp/issues)
- š [Feature Requests](https://github.com/specstoryai/tnydev-mcp/issues/new?labels=enhancement)
### Related Projects
- [tny.dev Web App](https://www.tny.dev)
- [tny.dev API Client Libraries](https://www.tny.dev/developers/libraries)
- [MCP Servers Directory](https://github.com/modelcontextprotocol/servers)
## š¬ Support
### Getting Help
| Issue Type | Where to Get Help |
|------------|-------------------|
| š MCP Server Issues | [GitHub Issues](https://github.com/specstoryai/tnydev-mcp/issues) |
| š API/Account Issues | [tny.dev Support](https://www.tny.dev/support) |
| š± Claude Desktop | [Claude Help Center](https://claude.ai/help) |
| š» Client-Specific | Check client's documentation |
### Quick Links
- **Status Page**: [status.tny.dev](https://status.tny.dev)
- **API Status**: Check the [tny.dev Status Page](https://status.tny.dev)
- **Account Dashboard**: [tny.dev/account](https://www.tny.dev/account)
## š Ready for Agent-First Development?
<div align="center">
<h3>Get native AI integration with our first-party MCP server</h3>
<p>Just $9/month for 500 requests/hour - <strong>95% cheaper than Bitly</strong></p>
<a href="https://www.tny.dev/developers">
<img src="https://img.shields.io/badge/Get%20Your%20API%20Key-ā-purple?style=for-the-badge" alt="Get Your API Key">
</a>
</div>
---
## š¤ Contributing
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
### Development Workflow
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## š Acknowledgments
- Built with [Model Context Protocol SDK](https://github.com/modelcontextprotocol/sdk)
- Powered by [tny.dev](https://www.tny.dev) - The API-first link shortener built for AI agents
- Compatible with [Claude](https://claude.ai) and other MCP clients