- Home
- MCP servers
- Twitter MCP Bridge Server
Twitter MCP Bridge Server
- typescript
22
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"vrknetha-aisdk-mcp-bridge": {
"command": "npx",
"args": [
"-y",
"@enescinar/twitter-mcp"
],
"env": {
"API_KEY": "YOUR_TWITTER_API_KEY",
"ACCESS_TOKEN": "YOUR_TWITTER_ACCESS_TOKEN",
"API_SECRET_KEY": "YOUR_TWITTER_API_SECRET",
"FIRE_CRAWL_API_KEY": "YOUR_FIRECRAWL_API_KEY",
"FIRE_CRAWL_API_URL": "https://api.firecrawl.com",
"ACCESS_TOKEN_SECRET": "YOUR_TWITTER_ACCESS_TOKEN_SECRET"
}
}
}
}You use the AISDK MCP Bridge to connect MCP servers with AI models, enabling tool execution across multiple MCP servers from your AI workflows. This bridge streamlines running server-side MCP tools inside your AI prompts, while keeping configuration modular and decoupled from your code.
How to use
Initialize the MCP service in your application code to prepare tool access across all configured MCP servers. Retrieve the available tools from the connected MCP servers, or scope to a specific server, and then pass those tools to your AI model so it can invoke them as needed. When you finish, clean up resources to gracefully close all server connections.
Typical usage flow: initialize MCP, fetch tools, use the tools with your AI model, and finally call cleanup to release resources. You can target all servers or just a single server by name to reduce surface area during tool selection.
How to install
Prerequisites: Node.js 20.x or higher and npm 7.x or higher.
Install the bridge package from your project root.
Configuration
Configure one or more MCP servers in an mcp.config.json file at your project root. Each server runs independently and can use stdio for local execution or be interacted with via an HTTP URL if you migrate to a remote MCP server.
Security and best practices
Keep API keys and secrets in environment variables or a secure secret store. Do not hard-code credentials in your source files. Use the bridge’s environment variable support to inject keys at runtime.
Troubleshooting and notes
If you encounter initialization or communication issues, enable debug logging to get verbose insight into server startup, tool registration, and execution details. Review your environment configuration and ensure that each configured MCP server is reachable and that its command arguments match what the server expects.
Available tools
initializeMcp
Initialize the MCP service with optional debug settings to establish the MCP environment and server readiness.
getMcpTools
Retrieve AI SDK compatible tools from configured MCP servers, with optional server scoping.
cleanupMcp
Clean up MCP resources and close all server connections when you are finished.
executeMcpFunction
Execute a specific function on an MCP server directly, given the server name, function name, and arguments.