Liner
Use Liner's OAuth-backed MCP search and research tools from Convex actions with the access token kept in Convex env.
git clone https://github.com/mjkang-estrella/liner-convex.git
cd liner-convexThis upstream package has not been adapted or qualified for Bijection. Read the original documentation before adopting it.
Description
Use Liner's OAuth-backed MCP search and research tools from Convex actions with the access token kept in Convex env.
Explore the package README for API concepts, configuration, and examples. Check the Bijection source for adaptation-specific setup.
Review the source and its dependencies before adopting this package. Source availability does not establish npm publication or runtime qualification.
Getting started
- Get the source at the revision above and read its package documentation.
- Check the required Bijection SDK version, dependencies, and external service credentials.
- Follow the package setup instructions and the guide to using components.
- Exercise the component in your deployment according to your project’s verification rules.
Open source
Maintained source: mjkang-estrella/liner-convex. License: See repository. Consult the repository for license terms, notices, and contributor attribution.
From the upstream publisher
Convex component for Liner OAuth MCP search and research tools
Explore the demo ↗Upstream overview
From the upstream package documentation.
Liner Convex wraps Liner's OAuth-backed MCP tools as a reusable Convex Component. Convex actions can call web search, scholar search, Quick Answer Agent, Search Agent, and Deep Research Agent while keeping LINER_MCP_ACCESS_TOKEN in Convex environment configuration. MCP tool responses are normalized into JavaScript objects for use in Convex apps.
Use cases
From the upstream package documentation.
- Build source-backed chat and copilot answers with current web results and citations.
- Power RAG pipelines with fresh web or scholarly retrieval from Convex actions.
- Generate citation-rich research reports through Liner Deep Research Agent.
- Add quick factual answers and source-backed search to support or knowledge-base workflows.
- Call Liner's OAuth-backed MCP tools from Convex without exposing the access token to client code.
How it works
From the upstream package documentation.
The component wraps Liner's OAuth-backed remote MCP server in Convex actions. You configure it in convex.config.ts with LINER_MCP_ACCESS_TOKEN from Convex environment variables, then instantiate a LinerClient in your actions.
The client provides methods like searchWeb() for structured web results, searchScholar() for academic sources, quickAnswerAgent() for short source-backed factual answers, searchAgent() for cited synthesis, and deepResearchAgent() for multi-step research. Each method performs a server-side MCP tools/call request to Liner with OAuth Bearer authentication.
MCP text content is parsed as JSON when possible. Search results include normalized request_id and total_count aliases, and agent event arrays are aggregated into text, answer, references, message metadata, and raw events for use in Convex apps.
Upstream package FAQ
How does the Liner Convex component handle streaming responses?
The Liner Convex component automatically parses Server-Sent Events from streaming endpoints and returns aggregated results containing text, reasoning, references, and metadata. You get structured data instead of managing stream parsing yourself.
What search capabilities does the Liner component provide?
The Liner Convex component provides web search, academic scholar search, quick answers, AI search, and deep research capabilities. Each method returns structured results with citations, and you can filter by country, language, and date ranges.
How do I secure my Liner API key with this component?
The Liner Convex component stores your API key in Convex environment variables through the component configuration. Set LINER_API_KEY in your Convex dashboard or CLI, and the component handles authentication without exposing credentials to client code.
What's the difference between AI Search and Deep Research in the Liner component?
AI Search provides quick grounded answers with sources, while Deep Research generates comprehensive citation-rich reports. The Liner Convex component offers both regular and Pro versions of each, with Deep Research being more suitable for long-form research tasks.
Use with agents and CLI
Give your coding agent the component’s source identity and setup guidance.
Help me integrate Liner with Bijection.
Read: https://bijection.com/components/liner-convex/SKILL.md
Check SDK compatibility and dependency availability.
Follow this project's execution and verification rules.Upstream README.md
View repository ↗Documentation from mjkang-estrella/liner-convex, recorded October 23, 2026. APIs and setup may differ in the Bijection adaptation.
Liner Convex
Use Liner's OAuth-backed MCP tools from Convex actions.
This component calls Liner's remote Streamable HTTP MCP server from Convex and exposes the current Liner MCP tool surface:
search_websearch_scholarquick_answer_agentsearch_agentdeep_research_agent
Quick Start
1. Install the Component
npm install liner-convex
2. Configure Convex
Add the component to your convex/convex.config.ts:
import { defineApp } from "convex/server";
import { v } from "convex/values";
import liner from "liner-convex/convex.config";
const app = defineApp({
env: {
LINER_MCP_ACCESS_TOKEN: v.string(),
},
});
app.use(liner, {
name: "liner",
env: {
LINER_MCP_ACCESS_TOKEN: app.env.LINER_MCP_ACCESS_TOKEN,
},
});
export default app;
3. Set Up Environment Variables
Liner MCP now authenticates with OAuth. Store an OAuth access token that has the mcp scope in Convex environment configuration:
| Variable | Description |
|---|---|
LINER_MCP_ACCESS_TOKEN | OAuth access token for Liner MCP with scope mcp |
You can set it from the CLI:
npx convex env set LINER_MCP_ACCESS_TOKEN <oauth-access-token>
Do not store a Liner API key here. Static API-key authentication is no longer supported for the Liner MCP server.
4. Use the Component
import { action } from "./_generated/server";
import { components } from "./_generated/api";
import { LinerClient } from "liner-convex";
const liner = new LinerClient(components.liner);
export const searchNews = action({
handler: async (ctx) => {
return await liner.searchWeb(ctx, {
query: "recent AI regulation updates",
limit: 10,
});
},
});
export const answerWithSources = action({
handler: async (ctx) => {
return await liner.searchAgent(ctx, {
messages: [
{
role: "user",
content: "What are the latest developments in quantum computing?",
},
],
});
},
});
export const researchBrief = action({
handler: async (ctx) => {
return await liner.deepResearchAgent(ctx, {
messages: [
{
role: "user",
content: "Compare recent frontier AI model launches.",
},
],
});
},
});
API Reference
searchWeb(ctx, args)
Call Liner MCP tool search_web for structured web results.
await liner.searchWeb(ctx, {
query: "recent AI regulation updates",
limit: 10,
});
Parameters:
query- Search query string.limit- Optional maximum result count.
searchScholar(ctx, args)
Call Liner MCP tool search_scholar for academic results.
await liner.searchScholar(ctx, {
query: "retrieval augmented generation evaluation",
limit: 5,
});
quickAnswerAgent(ctx, args)
Call Liner MCP tool quick_answer_agent for a short source-backed factual answer.
await liner.quickAnswerAgent(ctx, {
messages: [{ role: "user", content: "What is the capital of France?" }],
});
searchAgent(ctx, args)
Call Liner MCP tool search_agent for a source-backed synthesized answer with citations.
await liner.searchAgent(ctx, {
messages: [{ role: "user", content: "Summarize today's chip export news." }],
});
deepResearchAgent(ctx, args)
Call Liner MCP tool deep_research_agent for multi-step citation-rich research.
await liner.deepResearchAgent(ctx, {
messages: [
{
role: "user",
content: "Compare the effectiveness of mRNA vs protein subunit vaccines.",
},
],
});
MCP Result Normalization
The component sends JSON-RPC tools/call requests to:
https://platform.liner.com/api/v1/mcp
MCP text content is parsed as JSON when possible. Search results are returned with both original MCP fields and normalized request_id / total_count aliases. Agent event arrays are aggregated into:
{
answer: string;
text: string;
message_id?: unknown;
request_id?: unknown;
trace_id?: unknown;
references: unknown[];
events: unknown[];
}
Requirements
- Liner account with OAuth access to MCP
- OAuth access token with
mcpscope - Convex 1.39.1 or later
How It Works
This component wraps Liner MCP calls inside a Convex component. Your actions call LinerClient, which runs component actions that:
- Read
LINER_MCP_ACCESS_TOKENfrom component environment configuration. - Call Liner's MCP
tools/callmethod over Streamable HTTP. - Normalize MCP tool text content into JavaScript objects.
- Return results to the calling action.
The OAuth access token stays in Convex env, not in client-visible code.
Development
npm install
npm run build
npm test
npm run typecheck
npm run lint
Work against a live deployment with the example app:
npm run dev
See example/README.md for a walkthrough.