Provides access to Lens Protocol data and functionality, enabling retrieval of account profiles, posts, followers/following relationships, search capabilities for accounts and posts, and information about applications and groups within the Lens Protocol ecosystem.
Lens Protocol MCP Server
A Model Context Protocol (MCP) server that provides access to Lens Protocol data and functionality. This server enables AI tools to interact with the Lens Protocol ecosystem through standardized MCP interfaces.
Features
Tools (Actions)
- fetch_account - Fetch Lens Protocol account/profile by address
- fetch_posts - Fetch posts with optional filters (by author, pagination)
- fetch_followers - Get followers of a specific account
- fetch_following - Get accounts that a specific account follows
- search_accounts - Search for profiles (limited in public mode)
- search_posts - Search for posts (limited in public mode)
- fetch_apps - Fetch Lens Protocol applications
- fetch_groups - Fetch groups from the protocol
- fetch_usernames - Fetch username information
Resources (Data Access)
- lens://account/{address} - Account/profile information
- lens://post/{id} - Post/publication data
- lens://app/{address} - Application information
- lens://group/{address} - Group information
Installation
Usage
Starting the Server
Local (stdio) Mode
Remote HTTP Mode
The server supports both stdio (for local use) and HTTP (for remote access) transports.
Configuration
Set environment variables:
LENS_ENVIRONMENT
: Set to "testnet" for testnet, defaults to mainnetPORT
: HTTP server port (default: 3000)
Example MCP Tool Calls
Fetch Account
Fetch Posts
Fetch Followers
MCP Client Configuration
Local Server Configuration
Add this server to your MCP client configuration:
Remote Server Configuration
For remote HTTP access:
Development
Running in Development Mode
Testing
Docker Deployment
Architecture
The server is built using:
- @lens-protocol/client@canary - Official Lens Protocol TypeScript SDK
- @modelcontextprotocol/sdk - MCP server implementation
- Bun - Fast JavaScript runtime and package manager
Limitations
- Search functionality is limited in public client mode (requires authenticated session)
- Some advanced features require authentication which is not implemented in this server
- Rate limiting depends on Lens Protocol API limits
Contributing
- Fork the repository
- Create a feature branch
- Make changes
- Test with
bun test.ts
- Submit a pull request
License
MIT License
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables AI tools to interact with the Lens Protocol decentralized social network ecosystem. Supports fetching profiles, posts, followers, searching content, and accessing social graph data through standardized MCP interfaces.
Related MCP Servers
- AsecurityAlicenseAqualityEnables AI assistants to interact with Meilisearch via the Model Context Protocol, allowing comprehensive index, document, and search management through a standardized interface.Last updated -6809MIT License
- AsecurityFlicenseAqualityImplements the Model Context Protocol (MCP) to provide AI models with a standardized interface for connecting to external data sources and tools like file systems, databases, or APIs.Last updated -1133
- AsecurityAlicenseAqualityEnables AI assistants to interact with LinkedIn data through the Model Context Protocol, allowing profile searches, job discovery, messaging, and network analytics.Last updated -285513MIT License
- -securityAlicense-qualityEnables AI applications to interact with decentralized storage through a standardized Model Context Protocol interface, allowing file uploads, retrievals, and identity management.Last updated -12Apache 2.0